Commit f5e51b98 by 胡悦

提交组件

1 parent fd1c7a9f
import GLCombiForm from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLCombiForm.install = function(Vue) {
Vue.component(GLCombiForm.name, GLCombiForm)
}
// 默认导出组件
export default GLCombiForm
\ No newline at end of file
/**
* 时间控件-限制月份
*/
export const beforeRangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
export const afterRangePickerOptions = {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate() - 1))
if (date < yesterday) {
return true
}
return false
}
}
<!-- 搜索 -->
<template>
<div class="glsx-combi-formwrap">
<div class="glsx-combi-form">
<GLSearch @onOk="handleOkFn" @onRest="handleRestFn">
<el-form :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :style="{ ...item.style }" :prop="item.name">
<GLSearchItem>
<div slot="name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
<span class="tips-icon"></span>
</el-tooltip>
{{ item.label }}:
</span>
<span v-else-if="!item.isHide && item.label" slot="label">
<span class="combi-form-label" :style="{ width: '112px', 'padding-right': isEdit ? '12px' : labelPaddingRight + 'px' }">{{ item.label }}:</span>
</span>
<!-- // select 组件 作为label -->
<div v-if="item.type === 'selectInput'" id="selectlabel">
<el-select v-model="searchSelectObj[item.selectName].attr" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
</div>
</div>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<span v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span>
<div v-else-if="item.type === 'input'">
<el-input :placeholder="item.placeholder || '请输入' + item.label" :prefix-icon="item.prefixIcon" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)">
<span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span>
<span v-if="item.append" slot="append">{{ item.append }}</span>
</el-input>
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
<!-- 选择-输入框 -->
<el-input class="select-inp" v-else-if="item.type === 'selectInput'" :placeholder="'请输入' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label" :maxlength="item.maxlength" v-model.trim="searchSelectObj[item.selectName].value" :clearable="item.isClear || false">
<!-- <el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" slot="prepend" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select> -->
</el-input>
<!-- 选择-时间选择框 -->
<!-- <template v-else-if="item.type === 'selectDatePicker'">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
<el-date-picker v-model="searchSelectObj[item.selectName].value" :type="item.dateType || 'daterange'" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOption[item.pickerOptions]"></el-date-picker>
</template> -->
<!-- 双选择框 -->
<!-- <template v-else-if="item.type === 'selectDouble'">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
<el-select v-model="searchSelectObj[item.selectName].value" :placeholder="'请选择' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label">
<el-option label="全部" value=""></el-option>
<el-option v-for="subItem in item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]"></el-option>
</el-select>
</template> -->
<!-- 选择框 -->
<div v-else-if="item.type === 'select'">
<el-select v-model="formObj[item.name]" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
<el-option v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]" :disabled="subItem.isDisabled || false"></el-option>
</el-select>
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
<!-- radio -->
<el-radio-group v-else-if="item.type === 'radio'" v-model="formObj[item.name]" :disabled="item.isDisabled" @change="item.handleRadioChange">
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group>
<el-date-picker v-else-if="item.type === 'datePicker'" v-bind="item.datePickerAttrs ? item.datePickerAttrs : {}" v-on="item.datePickerListeners ? item.datePickerListeners : {}" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :disabled="item.isDisabled" :value-format="item.valueFormat" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]"></el-date-picker>
</GLSearchItem>
</el-form-item>
</template>
<slot name="footer"></slot>
</el-form>
</GLSearch>
</div>
</div>
</template>
<script>
import GLSearch from '../../GlSearch'
import GLSearchItem from '../../GlSearchItem'
import { beforeRangePickerOptions, afterRangePickerOptions } from './common'
export default {
name: 'GLCombiForm',
data() {
return {
pickerOption: {
beforeRangePickerOptions: beforeRangePickerOptions,
afterRangePickerOptions: afterRangePickerOptions
},
isImgVisible: false,
dialogObj: {
url: '',
uploadType: 'img'
}
}
},
props: {
isBlock: {
type: Boolean,
default: false
},
// defaultWidth: {
// type: String,
// default: '215px'
// },
formRef: {
type: String,
default: 'formRef'
},
isEdit: {
type: Boolean,
default: false
},
// labelWidth: {
// type: Number,
// // 默认是四个字符长度
// default: 56
// },
labelPaddingRight: {
type: Number,
default: 0
},
formData: {
type: Array,
default: () => []
},
formObj: {
type: Object,
default: () => {}
},
hasTitle: {
type: Boolean,
default: true
},
formRules: {
type: Object,
default: () => {}
},
// 搜索+输入框/搜索组合组件,搜索栏绑值
searchSelectObj: {
type: Object,
default: () => {}
}
},
mounted() {},
components: {
GLSearch,
GLSearchItem
},
methods: {
//gl-search 方法
handleOkFn() {
this.$emit('handleOk')
},
handleRestFn() {
this.$emit('handleRest')
},
// 选择框-添加其他属性
selectAddAttr(value, targetItem) {
targetItem.changeAttr && targetItem.changeAttr(value, targetItem)
},
handleInputDown(e, item) {
if (e.keyCode === 13 && item.hasOwnProperty('keyFn')) {
item.keyFn()
}
},
handleInputBlur(e, item) {
item.inputBlur && item.inputBlur(e, item)
}
}
}
</script>
<style lang="scss">
.glsx-combi-formwrap {
/* .glsx-combi-form {
min-width: 922px;
} */
.glsx-combi-form .glsx-combi-form-block {
width: 100%;
}
.glsx-combi-form .isBlock {
display: block !important;
}
/* .glsx-combi-form .el-form-item {
width: 65%;
} */
@media screen and (max-width: 1062px) {
.glsx-combi-form .el-form-item--small {
width: 100%;
}
.glsx-combi-form .el-form-item--small .el-form-item__content {
width: 100%;
}
.search-list {
width: 100%;
}
}
@media screen and (min-width: 1062px) and (max-width: 1440px) {
.glsx-combi-form .el-form-item--small {
width: 50%;
}
.glsx-combi-form .el-form-item--small .el-form-item__content {
width: 100%;
}
.search-list {
width: 100%;
}
}
@media screen and (min-width: 1440px) and (max-width: 1720px) {
.glsx-combi-form .el-form-item--small {
width: 33.33%;
}
.glsx-combi-form .el-form-item--small .el-form-item__content {
width: 100%;
}
.search-list {
width: 100%;
}
}
@media screen and (min-width: 1720px) {
.glsx-combi-form .el-form-item--small {
width: 25%;
}
.glsx-combi-form .el-form-item--small .el-form-item__content {
width: 100%;
}
.search-list {
width: 100%;
}
}
// .glsx-combi-form .el-form-item--small {
// width: 100%;
// }
// .glsx-combi-form .el-form-item--small .el-form-item__content {
// width: 100%;
// }
// .glsx-combi-form .el-form-item--small .el-form-item__content .search-item {
// width: 100%;
// }
// .glsx-combi-form .el-form-item--small .el-form-item__content .search-item .el-input {
// width: 100%;
// }
.glsx-combi-form .el-form-item--small.el-form-item {
margin: 0;
}
.glsx-combi-form .el-form-item--small .el-form-item__label {
padding: 0;
}
/* .glsx-combi-form .el-form-item--small .el-form-item__content {
width: calc(100% - 85px);
} */
.glsx-combi-form .el-col {
margin-bottom: 10px;
}
.glsx-combi-form .el-select {
width: 100%;
}
.glsx-combi-form .item-height {
height: 37px;
}
.glsx-combi-form input::-webkit-outer-spin-button,
.glsx-combi-form input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
.glsx-combi-form input[type='number'] {
-moz-appearance: textfield !important;
}
.glsx-combi-form .input-with-select .el-input-group__prepend {
background-color: #fff;
}
/* 提示图标 */
.glsx-combi-form .tips-block {
position: relative;
}
.glsx-combi-form .tips-label {
margin-right: 20px;
}
.glsx-combi-form .tips-icon {
position: absolute;
display: inline-block;
width: 12px;
height: 12px;
top: 3px;
right: 14px;
margin-right: 4px;
cursor: pointer;
border: 1px dotted #7f7f7f;
border-radius: 50%;
}
.glsx-combi-form .tips-icon::before {
content: '?';
position: absolute;
width: 8px;
height: 8px;
top: -8px;
left: 1px;
font-size: 10px;
}
/* .glsx-combi-form .tips {
margin: 0;
} */
.glsx-combi-form .combi-form-label {
display: inline-block;
box-sizing: border-box;
}
/* 图片上传 */
.glsx-combi-form .photo-top-tips {
/* height: 36px; */
margin: 0 0;
color: #999999;
}
.glsx-combi-form .img-w-h {
width: 80px;
height: 80px;
}
.glsx-combi-form .activity-img {
position: relative;
color: #999999;
background-color: #f7f7f7;
border: 1px dotted #d9d9d9;
cursor: pointer;
}
.glsx-combi-form .activity-Input {
position: absolute;
top: 0;
left: 0;
}
.glsx-combi-form .muti-imgs {
display: inline-block;
position: relative;
}
.activity-img .add {
position: absolute;
top: 40%;
font-size: 40px;
left: 50%;
transform: translate3d(-50%, -50%, 0);
}
.activity-img .number {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
}
#selectlabel {
.el-select {
width: 100% !important;
.el-input__inner {
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
}
}
.select-inp {
.el-input__inner {
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}
}
.muti-imgs .img-btns {
display: none;
height: 100%;
position: absolute;
width: 80px;
height: 80px;
left: 0;
top: 0;
z-index: 2;
color: #fff;
background: rgba(0, 0, 0, 0.5);
}
.glsx-combi-form .el-icon-delete,
.glsx-combi-form .el-icon-zoom-in {
cursor: pointer;
}
.muti-imgs .img-btns .btn-item {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.muti-imgs .img-btns .btn-item {
display: flex;
width: 70%;
justify-content: space-around;
}
.muti-imgs:hover .img-btns {
display: block;
}
.glsx-combi-form .dialog-img {
width: 100%;
height: 100%;
}
.glsx-combi-form .dialog-look {
text-align: center;
}
.glsx-combi-form .dialog-video {
width: 50%;
height: 50%;
}
/* 图片上传 */
.glsx-combi-form .el-tag.el-tag--info .el-tag__close {
color: #e8e8ea;
background-color: #5850ff !important;
}
.glsx-combi-form .el-tag.el-tag--info {
border-color: #5850ff;
}
.glsx-combi-form .el-tag--plain.el-tag--info .el-tag__close:hover {
background-color: #e8e8ea;
}
.glsx-combi-form .el-tag.el-tag--info .el-tag__close:hover {
background-color: #e8e8ea;
}
}
</style>
import GLSearch from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLSearch.install = function(Vue) {
Vue.component(GLSearch.name, GLSearch)
}
// 默认导出组件
export default GLSearch
\ No newline at end of file
<!-- <content> -->
<GLSearch @onOk="handleOkFn" @onRest="handleRestFn">
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-select v-model="value" size="small" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-date-picker size="small" v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</GLSearchItem>
<GLSearchItem>
<el-select v-model="selvalue" placeholder="请选择" size="small" slot="name">
<el-option v-for="item in seloptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
</GLSearch>
<el-button type="warning" @click="toggleShow(1)">显示代码</el-button>
```js {mixin:true}
{
data() {
return {
demo1: true,
//gl-search数据
input: '',
options: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎'
},
{
value: '选项4',
label: '龙须面'
},
{
value: '选项5',
label: '北京烤鸭'
}
],
value: '',
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
seloptions: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎北京烤鸭'
},
{
value: '选项4',
label: '龙须面北京烤鸭'
},
{
value: '选项5',
label: '北京烤鸭北京烤鸭'
}
],
selvalue: ''
}
},
methods:{
toggleShow(num){
// console.log(123)
this['demo' + num] = !this['demo' + num]
},
//gl-search 方法
handleOkFn() {
console.log('您点击了确定')
},
handleRestFn() {
console.log('您点击了取消')
}
}
}
```
# 用来作为 markdown 代码的示例部分
<div v-if="demo1">
```vue
<template>
<GLSearch @onOk="handleOkFn" @onRest="handleRestFn">
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-select v-model="value" size="small" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-date-picker size="small" v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</GLSearchItem>
<GLSearchItem>
<el-select v-model="selvalue" placeholder="请选择" size="small" slot="name">
<el-option v-for="item in seloptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
</GLSearch>
</template>
<script>
import {GLSearch, GLSearchItem} from 'glsx-components'
// 全局引入一次css即可
import 'glsx-components/dist/glsx-components.css'
export default {
data() {
return {
//gl-search数据
input: '',
options: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎'
},
{
value: '选项4',
label: '龙须面'
},
{
value: '选项5',
label: '北京烤鸭'
}
],
value: '',
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
seloptions: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎北京烤鸭'
},
{
value: '选项4',
label: '龙须面北京烤鸭'
},
{
value: '选项5',
label: '北京烤鸭北京烤鸭'
}
],
selvalue: ''
}
},
methods: {
handleOkFn() {
console.log('您点击了确定')
},
handleRestFn() {
console.log('您点击了取消')
}
}
}
</script>
```
</div>
<!-- </content> -->
<template>
<div class="gl-search" id="gl-search" :class="{ transTo: !expand }">
<div class="search-list">
<!-- 默认插槽 -->
<slot></slot>
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div>
<div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
</div>
<div class="gl-operate">
<div class="operate">
<el-button size="small" type="primary" @click="handleOk">查询</el-button>
<el-button size="small" @click="handleRest">重置</el-button>
<el-button type="text" size="small" @click="expandFn" v-if="hasExpand">
<span>{{ !expand ? '展开' : '收起' }}</span>
<i class="expand" :class="classIcon"></i>
</el-button>
<!-- <i class="el-icon-arrow-down expand"></i> -->
<!-- <i class="el-icon-arrow-up"></i> -->
</div>
</div>
</div>
</template>
<script>
export default {
name: 'GLSearch',
props: {},
data() {
return {
// input: '',
expand: false,
itemNum: 0,
time: null,
hasExpand: false
}
},
created() {},
mounted() {
this.getItemNum()
// 判断宽度按,是否显示展开收起
this.getClientWith()
window.addEventListener('resize', this.getClientWith, false)
},
computed: {
classIcon() {
return !this.expand ? 'el-icon-arrow-down' : 'el-icon-arrow-up'
}
},
methods: {
// 展开收起
expandFn() {
this.expand = !this.expand
},
// 获取item 输入框 的个数
getItemNum() {
const items = document.getElementById('gl-search').getElementsByClassName('search-item').length
this.itemNum = items
},
// 判断是否有展开收起标志
ifHasExpand(nowCol) {
if (this.itemNum > nowCol) {
return true
}
return false
},
// 监听函数
getClientWith() {
if (this.time) clearTimeout(this.time)
this.time = setTimeout(() => {
const clientWidth = document.documentElement.clientWidth
// console.log('clientWidth: ', clientWidth)
if (clientWidth <= 800) {
// 1列
this.hasExpand = this.ifHasExpand(1)
} else if (clientWidth <= 1440 && clientWidth > 800) {
// 2列
this.hasExpand = this.ifHasExpand(2)
} else if (clientWidth <= 1720 && clientWidth > 1440) {
// 3列
this.hasExpand = this.ifHasExpand(3)
} else {
// 4列
this.hasExpand = this.ifHasExpand(4)
}
}, 300)
},
handleOk() {
// 点击确定的回调
this.$emit('onOk')
},
handleRest() {
// 点击重置的回调
this.$emit('onRest')
}
},
components: {},
watch: {},
beforeDestroy() {
window.removeEventListener('resize', this.getClientWith, false)
this.time = null
}
}
</script>
<style lang="scss">
.gl-search {
&.transTo {
height: 52px;
}
display: flex;
justify-content: space-between;
overflow: hidden;
// @media screen and (max-width: 1062px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1062px) and (max-width: 1440px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1440px) and (max-width: 1720px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1720px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
.search-list {
.search-item {
width: 100%;
}
}
.search-list {
flex: 1;
display: flex;
flex-wrap: wrap;
.search-item {
// flex: 1;
// padding-right: 12px;
margin-bottom: 20px;
min-width: 276px;
display: flex;
align-items: center;
box-sizing: border-box;
.name {
width: 112px;
text-align: right;
font-size: 14px;
font-weight: 400;
color: #666;
}
.input {
flex: 1;
// width:100%;
}
.el-input {
width: 100%;
}
.el-select {
width: 100%;
}
.el-date-editor {
width: 100%;
}
}
}
.gl-operate {
display: flex;
align-items: flex-end;
.operate {
text-align: left;
width: 190px;
margin-bottom: 20px;
.expand {
font-size: 14px;
}
.el-button + .el-button {
margin-left: 8px;
}
}
}
}
</style>
import GLSearchItem from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLSearchItem.install = function(Vue) {
Vue.component(GLSearchItem.name, GLSearchItem)
}
// 默认导出组件
export default GLSearchItem
\ No newline at end of file
<template>
<div :style="{ 'padding-right': spacer + 'px' }" class="search-item">
<div class="name">
<!-- {{ label }} -->
<!-- name 插槽 -->
<slot name="name"></slot>
</div>
<div class="input">
<!-- 默认插槽 -->
<slot></slot>
<!-- <el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input> -->
</div>
</div>
</template>
<script>
export default {
name: 'GLSearchItem',
props: {
// 每个项间隙
spacer: {
type: Number,
default: 12
}
},
data () {
return {}
},
created () {},
mounted () {},
computed: {},
methods: {},
components: {},
watch: {}
}
</script>
/*
* @Author: your name
* @Date: 2022-03-02 15:56:07
* @LastEditTime: 2022-04-02 14:35:06
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\setup\qiankun.js
*/
import Vue from 'vue'
// import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLButton, GLTable,GLFooter } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { GLButton, GLTable, GLFooter } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import GlCombiForm from '@/components/GlCombiForm'
import render from './render'
Vue.use(ElementUI)
Vue.use(GLTable)
Vue.use(GLFooter)
Vue.use(GlCombiForm)
// import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable)
import 'glsx-components/dist/glsx-components.css'
......@@ -16,7 +26,7 @@ let routes = []
let router = null
let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, request_common, request_config,request_car, sign_common } = await fetchConfig()
const { response, request, sign, secret, request_common, request_config, request_car, sign_common } = await fetchConfig()
console.log(request)
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!