lw-cdp-ui 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/lwCronSelect/index.vue +215 -0
- package/dist/components/lwForm/index.vue +14 -10
- package/dist/components/lwFormView/index.vue +179 -153
- package/dist/components/lwFormView/textToPassword.vue +11 -1
- package/dist/components/lwLayout/components/tags.vue +9 -0
- package/dist/components/lwSearch/index.vue +1 -1
- package/dist/components/lwTableForm/index.vue +2 -2
- package/dist/lw-cdp-ui.esm.js +5177 -3616
- package/dist/lw-cdp-ui.esm.js.map +1 -1
- package/dist/lw-cdp-ui.umd.js +19 -14
- package/dist/lw-cdp-ui.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-input v-model="showInput"
|
|
3
|
+
placeholder="CRON">
|
|
4
|
+
|
|
5
|
+
<template #append>
|
|
6
|
+
<el-popover placement="top"
|
|
7
|
+
:width="380"
|
|
8
|
+
:visible="visible"
|
|
9
|
+
trigger="click">
|
|
10
|
+
<template #reference>
|
|
11
|
+
<el-button @click="visible = true">选择</el-button>
|
|
12
|
+
</template>
|
|
13
|
+
<div class="select-model">
|
|
14
|
+
<el-select v-model="setData.curType"
|
|
15
|
+
placeholder="选择类型"
|
|
16
|
+
@change="changeInt"
|
|
17
|
+
style="margin-right: 5px;min-width: 80px;width: 80px">
|
|
18
|
+
<el-option label="每天"
|
|
19
|
+
:value="3" />
|
|
20
|
+
<el-option label="每月"
|
|
21
|
+
:value="4" />
|
|
22
|
+
<el-option label="每周"
|
|
23
|
+
:value="5" />
|
|
24
|
+
</el-select>
|
|
25
|
+
|
|
26
|
+
<el-select v-if="setData.curType === 4"
|
|
27
|
+
v-model="setData.day"
|
|
28
|
+
multiple
|
|
29
|
+
allow-clear
|
|
30
|
+
placeholder="日期"
|
|
31
|
+
@change="changeDay"
|
|
32
|
+
:max-tag-count="1"
|
|
33
|
+
style="margin-right: 5px; min-width: 120px">
|
|
34
|
+
<el-option label="最后一天"
|
|
35
|
+
value="L" />
|
|
36
|
+
<el-option v-for="item in 31"
|
|
37
|
+
:key="item"
|
|
38
|
+
:label="item"
|
|
39
|
+
:value="item"
|
|
40
|
+
:disabled="setData.day.indexOf('L') !== -1" />
|
|
41
|
+
</el-select>
|
|
42
|
+
|
|
43
|
+
<el-select v-if="setData.curType === 5"
|
|
44
|
+
v-model="setData.weeks"
|
|
45
|
+
multiple
|
|
46
|
+
allow-clear
|
|
47
|
+
placeholder="星期"
|
|
48
|
+
@change="changeWeeks"
|
|
49
|
+
:max-tag-count="1"
|
|
50
|
+
style="margin-right: 5px; min-width: 120px">
|
|
51
|
+
<el-option label="周日"
|
|
52
|
+
value="1"
|
|
53
|
+
:disabled="setData.weeks.indexOf('?') !== -1" />
|
|
54
|
+
<el-option label="周一"
|
|
55
|
+
value="2"
|
|
56
|
+
:disabled="setData.weeks.indexOf('?') !== -1" />
|
|
57
|
+
<el-option label="周二"
|
|
58
|
+
value="3"
|
|
59
|
+
:disabled="setData.weeks.indexOf('?') !== -1" />
|
|
60
|
+
<el-option label="周三"
|
|
61
|
+
value="4"
|
|
62
|
+
:disabled="setData.weeks.indexOf('?') !== -1" />
|
|
63
|
+
<el-option label="周四"
|
|
64
|
+
value="5"
|
|
65
|
+
:disabled="setData.weeks.indexOf('?') !== -1" />
|
|
66
|
+
<el-option label="周五"
|
|
67
|
+
value="6"
|
|
68
|
+
:disabled="setData.weeks.indexOf('?') !== -1" />
|
|
69
|
+
<el-option label="周六"
|
|
70
|
+
value="7"
|
|
71
|
+
:disabled="setData.weeks.indexOf('?') !== -1" />
|
|
72
|
+
</el-select>
|
|
73
|
+
|
|
74
|
+
<el-time-picker v-model="setData.timeData"
|
|
75
|
+
placeholder="时分秒"
|
|
76
|
+
value-format="HH:mm:ss"
|
|
77
|
+
style="min-width: 100px" />
|
|
78
|
+
|
|
79
|
+
</div>
|
|
80
|
+
<div style="margin-top: 10px; text-align: right;">
|
|
81
|
+
<el-button @click="visible = false">取消</el-button>
|
|
82
|
+
<el-button type="primary"
|
|
83
|
+
@click="changeOk">确定</el-button>
|
|
84
|
+
</div>
|
|
85
|
+
</el-popover>
|
|
86
|
+
</template>
|
|
87
|
+
</el-input>
|
|
88
|
+
</template>
|
|
89
|
+
|
|
90
|
+
<script>
|
|
91
|
+
/**
|
|
92
|
+
* 秒 分 时 日 月 周
|
|
93
|
+
* *
|
|
94
|
+
*/
|
|
95
|
+
import { defineComponent, ref, computed } from 'vue';
|
|
96
|
+
|
|
97
|
+
export default defineComponent({
|
|
98
|
+
name: 'lwCronSelect',
|
|
99
|
+
props: {
|
|
100
|
+
disabled: Boolean,
|
|
101
|
+
modelValue: {
|
|
102
|
+
type: String,
|
|
103
|
+
default: ''
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
setup(props, { emit }) {
|
|
107
|
+
const dataList = computed(() => {
|
|
108
|
+
return props.modelValue ? props.modelValue.split(' ') : ['*', '*', '*', '*', '*', '?']
|
|
109
|
+
})
|
|
110
|
+
const showInput = ref(props.modelValue)
|
|
111
|
+
const visible = ref(false)
|
|
112
|
+
|
|
113
|
+
const changeInt = (val) => {
|
|
114
|
+
switch (val) {
|
|
115
|
+
case 3:
|
|
116
|
+
dataList.value[3] = '*'
|
|
117
|
+
dataList.value[4] = '*'
|
|
118
|
+
dataList.value[5] = '*'
|
|
119
|
+
break
|
|
120
|
+
case 4:
|
|
121
|
+
dataList.value[4] = '*'
|
|
122
|
+
dataList.value[5] = '*'
|
|
123
|
+
break
|
|
124
|
+
case 5:
|
|
125
|
+
dataList.value[5] = '?'
|
|
126
|
+
break
|
|
127
|
+
}
|
|
128
|
+
setData.value.day = []
|
|
129
|
+
setData.value.weeks = []
|
|
130
|
+
setData.value.month = []
|
|
131
|
+
setData.value.timeData = ''
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const setData = ref({
|
|
135
|
+
curType: dataList.value[4] !== '*' ? 4 : dataList.value[5] === '?' ? 3 : 5,
|
|
136
|
+
day: dataList.value[3] === '*' ? [] : dataList.value[3]?.split(','),
|
|
137
|
+
month: dataList.value[4] === '*' ? [] : dataList.value[4]?.split(','),
|
|
138
|
+
weeks: dataList.value[5] === '?' ? [] : dataList.value[5]?.split(','),
|
|
139
|
+
timeData: dataList.value[0] === '*' ? '' : `${dataList.value[2]}:${dataList.value[1]}:${dataList.value[0]}`
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
// 选择日期
|
|
145
|
+
const changeDay = (val) => {
|
|
146
|
+
if (val.indexOf('L') !== -1) {
|
|
147
|
+
setData.value.day = ['L']
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// 选择日期
|
|
151
|
+
const changeWeeks = (val) => {
|
|
152
|
+
if (val.indexOf('?') !== -1) {
|
|
153
|
+
setData.value.weeks = ['?']
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const changeCron = () => {
|
|
158
|
+
emit('update:modelValue', showInput.value)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// 确定选择
|
|
162
|
+
const changeOk = () => {
|
|
163
|
+
console.log(setData.value.timeData)
|
|
164
|
+
const time = setData.value.timeData ? setData.value.timeData.split(':') : ['*', '*', '*']
|
|
165
|
+
dataList.value[0] = time[2] === "*" ? time[2] : parseInt(time[2], 10).toString()
|
|
166
|
+
dataList.value[1] = time[1] === "*" ? time[1] : parseInt(time[1], 10).toString()
|
|
167
|
+
dataList.value[2] = time[0] === "*" ? time[0] : parseInt(time[0], 10).toString()
|
|
168
|
+
|
|
169
|
+
dataList.value[3] = setData.value.day.length > 0 ? setData.value.day.toString() : '*'
|
|
170
|
+
dataList.value[4] = setData.value.month.length > 0 ? setData.value.month.toString() : '*'
|
|
171
|
+
dataList.value[5] = setData.value.weeks.length > 0 ? setData.value.weeks.toString() : '?'
|
|
172
|
+
|
|
173
|
+
if (dataList.value[3] === '*' && dataList.value[5] !== '?') {
|
|
174
|
+
dataList.value[3] = '?'
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
showInput.value = `${dataList.value[0]} ${dataList.value[1]} ${dataList.value[2]} ${dataList.value[3]} ${dataList.value[4]} ${dataList.value[5]}`
|
|
178
|
+
|
|
179
|
+
emit('update:modelValue', showInput.value)
|
|
180
|
+
visible.value = false
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return {
|
|
184
|
+
setData,
|
|
185
|
+
showInput,
|
|
186
|
+
visible,
|
|
187
|
+
changeInt,
|
|
188
|
+
changeOk,
|
|
189
|
+
changeCron,
|
|
190
|
+
changeDay,
|
|
191
|
+
changeWeeks
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
</script>
|
|
196
|
+
|
|
197
|
+
<style lang="scss" scoped>
|
|
198
|
+
.CronSelect {
|
|
199
|
+
margin: 5px 0;
|
|
200
|
+
width: 100%;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.select-model {
|
|
204
|
+
display: flex;
|
|
205
|
+
width: 100%;
|
|
206
|
+
|
|
207
|
+
.item-select {
|
|
208
|
+
margin-right: 5px;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
:deep(.arco-popconfirm-icon) {
|
|
213
|
+
display: none;
|
|
214
|
+
}
|
|
215
|
+
</style>
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
</template>
|
|
66
66
|
<!-- upload -->
|
|
67
67
|
<template v-else-if="item.component=='upload'">
|
|
68
|
-
<
|
|
68
|
+
<template v-for="(_item, _index) in item.options.items"
|
|
69
69
|
:key="_index">
|
|
70
70
|
<template v-if="item.name">
|
|
71
71
|
<el-form-item :prop="_item.name">
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
</el-form-item>
|
|
81
81
|
</template>
|
|
82
82
|
|
|
83
|
-
</
|
|
83
|
+
</template>
|
|
84
84
|
</template>
|
|
85
85
|
<!-- checkbox -->
|
|
86
86
|
<template v-else-if="item.component=='checkbox'">
|
|
@@ -176,6 +176,7 @@
|
|
|
176
176
|
:shortcuts="item.options.shortcuts"
|
|
177
177
|
:disabled-date="item.options.disabledDate"
|
|
178
178
|
:default-time="item.options.defaultTime"
|
|
179
|
+
:disabled="item.options.disabled"
|
|
179
180
|
:value-format="item.options.valueFormat"
|
|
180
181
|
:placeholder="item.options.placeholder || '请选择'"></el-date-picker>
|
|
181
182
|
</template>
|
|
@@ -188,6 +189,7 @@
|
|
|
188
189
|
:shortcuts="item.options.shortcuts"
|
|
189
190
|
:disabled-date="item.options.disabledDate"
|
|
190
191
|
:default-time="item.options.defaultTime"
|
|
192
|
+
:disabled="item.options.disabled"
|
|
191
193
|
:value-format="item.options.valueFormat"
|
|
192
194
|
:placeholder="item.options.placeholder || '请选择'"></el-date-picker>
|
|
193
195
|
</template>
|
|
@@ -197,11 +199,12 @@
|
|
|
197
199
|
<template v-else-if="item.component=='number'">
|
|
198
200
|
<template v-if="item?.options?.name">
|
|
199
201
|
<el-input-number v-model="form[item.name][item.options.name]"
|
|
202
|
+
:disabled="item.options.disabled"
|
|
200
203
|
v-bind="{
|
|
201
|
-
min: item?.options?.min
|
|
202
|
-
max: item?.options?.max
|
|
203
|
-
step: item?.options?.step
|
|
204
|
-
precision: item?.options?.precision
|
|
204
|
+
min: item?.options?.min,
|
|
205
|
+
max: item?.options?.max,
|
|
206
|
+
step: item?.options?.step|| 1,
|
|
207
|
+
precision: item?.options?.precision,
|
|
205
208
|
placeholder: item?.options?.placeholder || ''
|
|
206
209
|
}"
|
|
207
210
|
controls-position="right">
|
|
@@ -213,11 +216,12 @@
|
|
|
213
216
|
</template>
|
|
214
217
|
<template v-else>
|
|
215
218
|
<el-input-number v-model="form[item.name]"
|
|
219
|
+
:disabled="item.options.disabled"
|
|
216
220
|
v-bind="{
|
|
217
|
-
min: item?.options?.min
|
|
218
|
-
max: item?.options?.max
|
|
219
|
-
step: item?.options?.step
|
|
220
|
-
precision: item?.options?.precision
|
|
221
|
+
min: item?.options?.min,
|
|
222
|
+
max: item?.options?.max,
|
|
223
|
+
step: item?.options?.step|| 1,
|
|
224
|
+
precision: item?.options?.precision,
|
|
221
225
|
placeholder: item?.options?.placeholder || ''
|
|
222
226
|
}"
|
|
223
227
|
controls-position="right">
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-skeleton v-if="renderLoading || Object.keys(form).length==0"
|
|
3
3
|
animated />
|
|
4
|
-
<el-
|
|
5
|
-
|
|
6
|
-
:size="config.size">
|
|
4
|
+
<el-row :gutter="20"
|
|
5
|
+
v-else>
|
|
7
6
|
<template v-for="(item, index) in config.formItems">
|
|
8
7
|
<template v-if="!hideHandle(item)">
|
|
9
8
|
<template v-if="item.component == 'divider'">
|
|
10
|
-
<el-
|
|
11
|
-
|
|
9
|
+
<el-col :span="item.span || 24"
|
|
10
|
+
:class="{topPadding: index !== 0}">
|
|
11
|
+
<div class="top-title-body">
|
|
12
12
|
<span class="title-name">{{ item.label }}</span>
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
<slot :name="item.options?.component"></slot>
|
|
14
|
+
</div>
|
|
15
|
+
</el-col>
|
|
15
16
|
</template>
|
|
16
|
-
<el-
|
|
17
|
-
|
|
18
|
-
<
|
|
17
|
+
<el-col v-else
|
|
18
|
+
:span="item.span">
|
|
19
|
+
<div class="span-item"
|
|
20
|
+
:class="[config.labelPosition]">
|
|
19
21
|
<span v-if="item.label"
|
|
22
|
+
:style="{minWidth: config.labelWidth}"
|
|
20
23
|
class="title-item">
|
|
21
24
|
{{ item.label }}
|
|
22
25
|
<el-tooltip v-if="item.tips"
|
|
@@ -24,163 +27,166 @@
|
|
|
24
27
|
<el-icon><el-icon-question-filled /></el-icon>
|
|
25
28
|
</el-tooltip>:
|
|
26
29
|
</span>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
<!-- input -->
|
|
31
|
+
<template
|
|
32
|
+
v-if="item.component=='input' || item.component=='number'">
|
|
33
|
+
<template v-if="item?.options?.name">
|
|
34
|
+
<textToPassword v-model="form[item.name][item.options.name]"
|
|
35
|
+
:width="config.labelWidth"
|
|
36
|
+
:password="item?.options?.password" />
|
|
37
|
+
</template>
|
|
38
|
+
<template v-else>
|
|
39
|
+
<textToPassword v-model="form[item.name]"
|
|
40
|
+
:password="item?.options?.password" />
|
|
41
|
+
</template>
|
|
33
42
|
</template>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
43
|
+
<!-- upload -->
|
|
44
|
+
<template v-else-if="item.component=='upload'">
|
|
45
|
+
<el-col v-for="(_item, _index) in item.options.items"
|
|
46
|
+
:key="_index">
|
|
47
|
+
<template v-if="item.name">
|
|
48
|
+
<el-image style="width: 100px; height: 100px"
|
|
49
|
+
:src="form[item.name][_item.name]"
|
|
50
|
+
:fit="contain" />
|
|
51
|
+
</template>
|
|
52
|
+
<template v-else>
|
|
53
|
+
<el-image style="width: 100px; height: 100px"
|
|
54
|
+
:src="form[_item.name]"
|
|
55
|
+
:fit="contain" />
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
</el-col>
|
|
37
59
|
</template>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<template v-else-if="item.component=='upload'">
|
|
41
|
-
<el-col v-for="(_item, _index) in item.options.items"
|
|
42
|
-
:key="_index">
|
|
60
|
+
<!-- checkbox -->
|
|
61
|
+
<template v-else-if="item.component=='checkbox'">
|
|
43
62
|
<template v-if="item.name">
|
|
44
|
-
|
|
45
|
-
:src="form[item.name][_item.name]"
|
|
46
|
-
:fit="contain" />
|
|
63
|
+
{{ form[item.name][_item.name] }}
|
|
47
64
|
</template>
|
|
48
65
|
<template v-else>
|
|
49
|
-
|
|
50
|
-
:src="form[_item.name]"
|
|
51
|
-
:fit="contain" />
|
|
66
|
+
{{ form[_item.name] }}
|
|
52
67
|
</template>
|
|
53
|
-
|
|
54
|
-
</el-col>
|
|
55
|
-
</template>
|
|
56
|
-
<!-- checkbox -->
|
|
57
|
-
<template v-else-if="item.component=='checkbox'">
|
|
58
|
-
<template v-if="item.name">
|
|
59
|
-
{{ form[item.name][_item.name] }}
|
|
60
68
|
</template>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
</template>
|
|
65
|
-
<!-- checkboxGroup -->
|
|
66
|
-
<template v-else-if="item.component=='checkboxGroup'">
|
|
67
|
-
{{ form[item.name] }}
|
|
68
|
-
</template>
|
|
69
|
-
<!-- switch -->
|
|
70
|
-
<template v-else-if="item.component=='switch'">
|
|
71
|
-
<template v-if="item?.options?.name">
|
|
72
|
-
{{ form[item.name][item.options.name] ? item.options.true || '是' : item.options.false || '否' }}
|
|
73
|
-
</template>
|
|
74
|
-
<template v-else>
|
|
75
|
-
{{ form[item.name] ? item.options.true || '是' : item.options.false || '否' }}
|
|
69
|
+
<!-- checkboxGroup -->
|
|
70
|
+
<template v-else-if="item.component=='checkboxGroup'">
|
|
71
|
+
{{ form[item.name] }}
|
|
76
72
|
</template>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
{{getKeyToLabel(form[item.name], item.options.items)}}
|
|
73
|
+
<!-- switch -->
|
|
74
|
+
<template v-else-if="item.component=='switch'">
|
|
75
|
+
<template v-if="item?.options?.name">
|
|
76
|
+
{{ form[item.name][item.options.name] ? item.options.true || '是' : item.options.false || '否' }}
|
|
77
|
+
</template>
|
|
78
|
+
<template v-else>
|
|
79
|
+
{{ form[item.name] ? item.options.true || '是' : item.options.false || '否' }}
|
|
80
|
+
</template>
|
|
86
81
|
</template>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
82
|
+
<!-- select -->
|
|
83
|
+
<template
|
|
84
|
+
v-else-if="item.component=='select' || item.component=='radio'">
|
|
85
|
+
<template v-if="item?.options?.name">
|
|
86
|
+
{{getKeyToLabel(form[item.name][item.options.name], item.options.items)}}
|
|
87
|
+
</template>
|
|
88
|
+
<template v-else>
|
|
89
|
+
{{getKeyToLabel(form[item.name], item.options.items)}}
|
|
90
|
+
</template>
|
|
94
91
|
</template>
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
92
|
+
<!-- cascader -->
|
|
93
|
+
<template v-else-if="item.component=='cascader'">
|
|
94
|
+
<template v-if="item?.options?.name">
|
|
95
|
+
<el-cascader v-model="form[item.name][item.options.name]"
|
|
96
|
+
:options="item.options.items"
|
|
97
|
+
clearable></el-cascader>
|
|
98
|
+
</template>
|
|
99
|
+
<template v-else>
|
|
100
|
+
<el-cascader v-model="form[item.name]"
|
|
101
|
+
:options="item.options.items"
|
|
102
|
+
clearable></el-cascader>
|
|
103
|
+
</template>
|
|
99
104
|
</template>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
{{ dayjs(form[item.name][item.options.name]).format(item.options.valueFormat || 'YYYY-MM-DD HH:mm:ss') }}
|
|
105
|
+
<!-- date -->
|
|
106
|
+
<template v-else-if="item.component=='date'">
|
|
107
|
+
<template v-if="item?.options?.name">
|
|
108
|
+
{{ dayjs(form[item.name][item.options.name]).format(item.options.valueFormat || 'YYYY-MM-DD HH:mm:ss') }}
|
|
105
109
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
</template>
|
|
111
|
+
<template v-else>
|
|
112
|
+
{{ dayjs(form[item.name]).format(item.options.valueFormat || 'YYYY-MM-DD HH:mm:ss') }}
|
|
113
|
+
</template>
|
|
110
114
|
|
|
111
|
-
</template>
|
|
112
|
-
<!-- color -->
|
|
113
|
-
<template v-else-if="item.component=='color'">
|
|
114
|
-
<template v-if="item?.options?.name">
|
|
115
|
-
<el-color-picker disabled
|
|
116
|
-
v-model="form[item.name][item.options.name]" />
|
|
117
|
-
</template>
|
|
118
|
-
<template v-else>
|
|
119
|
-
<el-color-picker disabled
|
|
120
|
-
v-model="form[item.name]" />
|
|
121
115
|
</template>
|
|
116
|
+
<!-- color -->
|
|
117
|
+
<template v-else-if="item.component=='color'">
|
|
118
|
+
<template v-if="item?.options?.name">
|
|
119
|
+
<el-color-picker disabled
|
|
120
|
+
v-model="form[item.name][item.options.name]" />
|
|
121
|
+
</template>
|
|
122
|
+
<template v-else>
|
|
123
|
+
<el-color-picker disabled
|
|
124
|
+
v-model="form[item.name]" />
|
|
125
|
+
</template>
|
|
122
126
|
|
|
123
|
-
</template>
|
|
124
|
-
<!-- rate -->
|
|
125
|
-
<template v-else-if="item.component=='rate'">
|
|
126
|
-
<template v-if="item?.options?.name">
|
|
127
|
-
<el-rate disabled
|
|
128
|
-
v-model="form[item.name][item.options.name]"></el-rate>
|
|
129
|
-
</template>
|
|
130
|
-
<template v-else>
|
|
131
|
-
<el-rate disabled
|
|
132
|
-
v-model="form[item.name]"></el-rate>
|
|
133
127
|
</template>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
v-model="form[item.name]"
|
|
145
|
-
:marks="item.options.marks"></el-slider>
|
|
128
|
+
<!-- rate -->
|
|
129
|
+
<template v-else-if="item.component=='rate'">
|
|
130
|
+
<template v-if="item?.options?.name">
|
|
131
|
+
<el-rate disabled
|
|
132
|
+
v-model="form[item.name][item.options.name]"></el-rate>
|
|
133
|
+
</template>
|
|
134
|
+
<template v-else>
|
|
135
|
+
<el-rate disabled
|
|
136
|
+
v-model="form[item.name]"></el-rate>
|
|
137
|
+
</template>
|
|
146
138
|
</template>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
<!-- tags -->
|
|
151
|
-
<template v-else-if="item.component=='tags'">
|
|
152
|
-
<div class="tags-list">
|
|
139
|
+
<!-- slider -->
|
|
140
|
+
<template v-else-if="item.component=='slider'">
|
|
153
141
|
<template v-if="item?.options?.name">
|
|
154
|
-
<el-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
</el-tag>
|
|
158
|
-
|
|
142
|
+
<el-slider disabled
|
|
143
|
+
v-model="form[item.name][item.options.name]"
|
|
144
|
+
:marks="item.options.marks"></el-slider>
|
|
159
145
|
</template>
|
|
160
146
|
<template v-else>
|
|
161
|
-
<el-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
</el-tag>
|
|
147
|
+
<el-slider disabled
|
|
148
|
+
v-model="form[item.name]"
|
|
149
|
+
:marks="item.options.marks"></el-slider>
|
|
165
150
|
</template>
|
|
166
151
|
|
|
167
|
-
</
|
|
168
|
-
|
|
152
|
+
</template>
|
|
153
|
+
|
|
154
|
+
<!-- tags -->
|
|
155
|
+
<template v-else-if="item.component=='tags'">
|
|
156
|
+
<div class="tags-list">
|
|
157
|
+
<template v-if="item?.options?.name">
|
|
158
|
+
<el-tag v-for="tag in form[item.name][item?.options?.name]"
|
|
159
|
+
:key="tag">
|
|
160
|
+
{{ tag }}
|
|
161
|
+
</el-tag>
|
|
162
|
+
|
|
163
|
+
</template>
|
|
164
|
+
<template v-else>
|
|
165
|
+
<el-tag v-for="tag in form[item.name]"
|
|
166
|
+
:key="tag">
|
|
167
|
+
{{ tag }}
|
|
168
|
+
</el-tag>
|
|
169
|
+
</template>
|
|
169
170
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
171
|
+
</div>
|
|
172
|
+
</template>
|
|
173
|
+
|
|
174
|
+
<!-- 没有组件是component值 就是插槽名称 -->
|
|
175
|
+
<template v-else>
|
|
176
|
+
<slot :name="item.component">
|
|
177
|
+
<el-tag type="danger">
|
|
178
|
+
[{{item.component}}]
|
|
179
|
+
没有这个默认组件也未自定义插槽内容</el-tag>
|
|
180
|
+
</slot>
|
|
181
|
+
</template>
|
|
182
|
+
<div v-if="item.message"
|
|
183
|
+
class="el-form-item-msg">{{item.message}}</div>
|
|
184
|
+
</div>
|
|
185
|
+
</el-col>
|
|
180
186
|
</template>
|
|
181
187
|
</template>
|
|
182
188
|
|
|
183
|
-
</el-
|
|
189
|
+
</el-row>
|
|
184
190
|
</template>
|
|
185
191
|
|
|
186
192
|
<script>
|
|
@@ -330,20 +336,40 @@ export default {
|
|
|
330
336
|
}
|
|
331
337
|
</script>
|
|
332
338
|
<style lang="scss" scoped>
|
|
333
|
-
.
|
|
334
|
-
margin-
|
|
339
|
+
.topPadding {
|
|
340
|
+
margin-top: 20px;
|
|
335
341
|
}
|
|
336
|
-
.
|
|
337
|
-
|
|
338
|
-
|
|
342
|
+
.top-title-body {
|
|
343
|
+
display: flex;
|
|
344
|
+
justify-content: space-between;
|
|
345
|
+
width: 100%;
|
|
346
|
+
.title-name {
|
|
347
|
+
font-size: 18px;
|
|
348
|
+
font-weight: bold;
|
|
349
|
+
margin-bottom: 10px;
|
|
350
|
+
}
|
|
339
351
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
352
|
+
|
|
353
|
+
.span-item {
|
|
354
|
+
display: inline-flex;
|
|
355
|
+
align-items: flex-start;
|
|
356
|
+
gap: 10px;
|
|
357
|
+
flex-wrap: wrap;
|
|
343
358
|
margin-bottom: 10px;
|
|
359
|
+
line-height: 24px;
|
|
360
|
+
font-size: 14px;
|
|
361
|
+
width: 100%;
|
|
362
|
+
&.top {
|
|
363
|
+
flex-direction: column;
|
|
364
|
+
}
|
|
365
|
+
&.right {
|
|
366
|
+
.title-item {
|
|
367
|
+
text-align: right;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
.title-item {
|
|
371
|
+
color: #7c7c7c;
|
|
372
|
+
display: inline-block;
|
|
373
|
+
}
|
|
344
374
|
}
|
|
345
|
-
.title-item {
|
|
346
|
-
color: #7c7c7c;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
375
|
</style>
|