lw-cdp-ui 1.4.35 → 1.4.37
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/lwBiChart/charts/AreaChart.vue +18 -11
- package/dist/components/lwBiChart/charts/MetricCard.vue +2 -2
- package/dist/components/lwCronSelect/index.vue +82 -80
- package/dist/components/lwFormMini/FormItem.vue +66 -74
- package/dist/components/lwLayout/components/tags.vue +73 -66
- package/dist/components/lwLayout/components/topbar.vue +24 -19
- package/dist/components/lwLayout/components/userbar.vue +3 -0
- package/dist/components/lwLayout/index.vue +3 -0
- package/dist/lw-cdp-ui.esm.js +1725 -1674
- package/dist/lw-cdp-ui.umd.js +16 -16
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -78,13 +78,13 @@ export default {
|
|
|
78
78
|
yAxis: this.getYAxisOption(setting),
|
|
79
79
|
series: this.getSeriesData(setting, tables),
|
|
80
80
|
color: setting.color,
|
|
81
|
-
textStyle: setting.textStyle || {}
|
|
81
|
+
textStyle: setting.textStyle || {},
|
|
82
|
+
dataZoom: this.getDataZoomOption(setting, tables)
|
|
82
83
|
}
|
|
83
84
|
} else {
|
|
84
85
|
this.option = option
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
|
|
88
88
|
this.option && this.chart.setOption(this.option, true)
|
|
89
89
|
setTimeout(() => {
|
|
90
90
|
this.chart.resize()
|
|
@@ -123,7 +123,7 @@ export default {
|
|
|
123
123
|
defaultTooltipFormatter(params) {
|
|
124
124
|
return params
|
|
125
125
|
.map(
|
|
126
|
-
item => `
|
|
126
|
+
(item) => `
|
|
127
127
|
<div style="display:flex;align-items:center;">
|
|
128
128
|
<span style="display:inline-block;width:10px;height:10px;border-radius:50%;background:${item.color};margin-right:5px;"></span>
|
|
129
129
|
${item.seriesName}: ${item.value}
|
|
@@ -170,16 +170,16 @@ export default {
|
|
|
170
170
|
...(setting.toolbox.feature || {}),
|
|
171
171
|
saveAsImage: setting.toolbox.feature?.saveAsImage?.show
|
|
172
172
|
? {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
type: 'png',
|
|
174
|
+
pixelRatio: 2,
|
|
175
|
+
...setting.toolbox.feature.saveAsImage
|
|
176
|
+
}
|
|
177
177
|
: undefined,
|
|
178
178
|
dataView: setting.toolbox.feature?.dataView?.show
|
|
179
179
|
? {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
readOnly: true,
|
|
181
|
+
...setting.toolbox.feature.dataView
|
|
182
|
+
}
|
|
183
183
|
: undefined
|
|
184
184
|
}
|
|
185
185
|
}
|
|
@@ -212,11 +212,18 @@ export default {
|
|
|
212
212
|
if (value >= 1000) return (value / 1000).toFixed(1) + 'k'
|
|
213
213
|
return value
|
|
214
214
|
},
|
|
215
|
+
getDataZoomOption(setting, tables) {
|
|
216
|
+
if (tables?.[0].headers?.length <= 15) return undefined
|
|
215
217
|
|
|
218
|
+
return [
|
|
219
|
+
{ type: 'inside', start: 0, endValue: 15 },
|
|
220
|
+
{ start: 0, endValue: 15 }
|
|
221
|
+
]
|
|
222
|
+
},
|
|
216
223
|
getSeriesData(setting, tables) {
|
|
217
224
|
let list = []
|
|
218
225
|
tables.map((table, index) => {
|
|
219
|
-
table.rows.map(row => {
|
|
226
|
+
table.rows.map((row) => {
|
|
220
227
|
list.push({
|
|
221
228
|
name: row.name,
|
|
222
229
|
type: 'line',
|
|
@@ -170,11 +170,11 @@ export default {
|
|
|
170
170
|
const positionGroup = []
|
|
171
171
|
|
|
172
172
|
// 3. 遍历每个table,获取第i个header和对应的value
|
|
173
|
-
tables.forEach((table) => {
|
|
173
|
+
tables.forEach((table, index) => {
|
|
174
174
|
// 如果当前table的headers长度不够,跳过或用默认值
|
|
175
175
|
if (i < table.headers.length) {
|
|
176
176
|
const header = table.headers[i]
|
|
177
|
-
const metricName = table.metricName
|
|
177
|
+
const metricName = index == 0 ? setting?.title?.text || table.metricName : table.metricName
|
|
178
178
|
const value = table.rows[0].values[i]
|
|
179
179
|
|
|
180
180
|
positionGroup.push({
|
|
@@ -1,86 +1,66 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-input v-model="showInput"
|
|
3
|
-
placeholder="CRON">
|
|
4
|
-
|
|
2
|
+
<el-input v-model="showInput" placeholder="CRON">
|
|
5
3
|
<template #append>
|
|
6
|
-
<el-popover placement="top"
|
|
7
|
-
:width="380"
|
|
8
|
-
:visible="visible"
|
|
9
|
-
trigger="click">
|
|
4
|
+
<el-popover placement="top" :width="380" :visible="visible" trigger="click">
|
|
10
5
|
<template #reference>
|
|
11
6
|
<el-button @click="visible = true">选择</el-button>
|
|
12
7
|
</template>
|
|
13
8
|
<div class="select-model">
|
|
14
|
-
<el-select
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<el-option label="每月"
|
|
21
|
-
|
|
22
|
-
<el-option label="每周"
|
|
23
|
-
:value="5" />
|
|
9
|
+
<el-select
|
|
10
|
+
v-model="setData.curType"
|
|
11
|
+
placeholder="选择类型"
|
|
12
|
+
@change="changeInt"
|
|
13
|
+
style="margin-right: 5px; min-width: 80px; width: 80px">
|
|
14
|
+
<el-option label="每天" :value="3" />
|
|
15
|
+
<el-option label="每月" :value="4" />
|
|
16
|
+
<el-option label="每周" :value="5" />
|
|
24
17
|
</el-select>
|
|
25
18
|
|
|
26
|
-
<el-select
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<el-option
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
19
|
+
<el-select
|
|
20
|
+
v-if="setData.curType === 4"
|
|
21
|
+
v-model="setData.day"
|
|
22
|
+
multiple
|
|
23
|
+
allow-clear
|
|
24
|
+
placeholder="日期"
|
|
25
|
+
@change="changeDay"
|
|
26
|
+
:max-tag-count="1"
|
|
27
|
+
style="margin-right: 5px; min-width: 120px">
|
|
28
|
+
<el-option label="最后一天" value="L" />
|
|
29
|
+
<el-option
|
|
30
|
+
v-for="item in 31"
|
|
31
|
+
:key="item"
|
|
32
|
+
:label="item"
|
|
33
|
+
:value="item"
|
|
34
|
+
:disabled="setData.day.indexOf('L') !== -1" />
|
|
41
35
|
</el-select>
|
|
42
36
|
|
|
43
|
-
<el-select
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<el-option label="
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<el-option label="
|
|
58
|
-
|
|
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" />
|
|
37
|
+
<el-select
|
|
38
|
+
v-if="setData.curType === 5"
|
|
39
|
+
v-model="setData.weeks"
|
|
40
|
+
multiple
|
|
41
|
+
allow-clear
|
|
42
|
+
placeholder="星期"
|
|
43
|
+
@change="changeWeeks"
|
|
44
|
+
:max-tag-count="1"
|
|
45
|
+
style="margin-right: 5px; min-width: 120px">
|
|
46
|
+
<el-option label="周日" value="1" :disabled="setData.weeks.indexOf('?') !== -1" />
|
|
47
|
+
<el-option label="周一" value="2" :disabled="setData.weeks.indexOf('?') !== -1" />
|
|
48
|
+
<el-option label="周二" value="3" :disabled="setData.weeks.indexOf('?') !== -1" />
|
|
49
|
+
<el-option label="周三" value="4" :disabled="setData.weeks.indexOf('?') !== -1" />
|
|
50
|
+
<el-option label="周四" value="5" :disabled="setData.weeks.indexOf('?') !== -1" />
|
|
51
|
+
<el-option label="周五" value="6" :disabled="setData.weeks.indexOf('?') !== -1" />
|
|
52
|
+
<el-option label="周六" value="7" :disabled="setData.weeks.indexOf('?') !== -1" />
|
|
72
53
|
</el-select>
|
|
73
54
|
|
|
74
|
-
<el-time-picker
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
55
|
+
<el-time-picker
|
|
56
|
+
v-model="setData.timeData"
|
|
57
|
+
placeholder="时分秒"
|
|
58
|
+
value-format="HH:mm:ss"
|
|
59
|
+
style="min-width: 100px" />
|
|
79
60
|
</div>
|
|
80
|
-
<div style="margin-top: 10px; text-align: right
|
|
61
|
+
<div style="margin-top: 10px; text-align: right">
|
|
81
62
|
<el-button @click="visible = false">取消</el-button>
|
|
82
|
-
<el-button type="primary"
|
|
83
|
-
@click="changeOk">确定</el-button>
|
|
63
|
+
<el-button type="primary" @click="changeOk">确定</el-button>
|
|
84
64
|
</div>
|
|
85
65
|
</el-popover>
|
|
86
66
|
</template>
|
|
@@ -88,7 +68,7 @@
|
|
|
88
68
|
</template>
|
|
89
69
|
|
|
90
70
|
<script>
|
|
91
|
-
import { ref, computed } from 'vue'
|
|
71
|
+
import { ref, computed, watch } from 'vue'
|
|
92
72
|
|
|
93
73
|
export default {
|
|
94
74
|
name: 'lwCronSelect',
|
|
@@ -139,13 +119,35 @@ export default {
|
|
|
139
119
|
|
|
140
120
|
// 初始化setData对象,用于内部数据管理
|
|
141
121
|
const setData = ref({
|
|
142
|
-
curType:
|
|
143
|
-
day:
|
|
144
|
-
month:
|
|
145
|
-
weeks:
|
|
146
|
-
timeData:
|
|
122
|
+
curType: 3,
|
|
123
|
+
day: [],
|
|
124
|
+
month: [],
|
|
125
|
+
weeks: [],
|
|
126
|
+
timeData: ''
|
|
147
127
|
})
|
|
148
128
|
|
|
129
|
+
watch(
|
|
130
|
+
() => visible.value,
|
|
131
|
+
(val) => {
|
|
132
|
+
if (val) {
|
|
133
|
+
const values = props.modelValue ? props.modelValue.split(' ') : ['*', '*', '*', '*', '*', '?']
|
|
134
|
+
|
|
135
|
+
const hasDay = values[3] !== '*' && values[3] !== '?'
|
|
136
|
+
const hasWeek = values[5] !== '*' && values[5] !== '?'
|
|
137
|
+
|
|
138
|
+
const curType = hasDay ? 4 : hasWeek ? 5 : 3
|
|
139
|
+
|
|
140
|
+
setData.value = {
|
|
141
|
+
curType,
|
|
142
|
+
day: hasDay ? values[3].split(',') : [],
|
|
143
|
+
month: values[4] === '*' ? [] : values[4].split(','),
|
|
144
|
+
weeks: hasWeek ? values[5].split(',') : [],
|
|
145
|
+
timeData: values[0] === '*' ? '' : `${values[2]}:${values[1]}:${values[0]}`
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
|
|
149
151
|
/**
|
|
150
152
|
* 处理日期选择
|
|
151
153
|
* @param {string} val - 选择的日期值
|
|
@@ -179,9 +181,9 @@ export default {
|
|
|
179
181
|
*/
|
|
180
182
|
const changeOk = () => {
|
|
181
183
|
const time = setData.value.timeData ? setData.value.timeData.split(':') : ['*', '*', '*']
|
|
182
|
-
dataList.value[0] = time[2] ===
|
|
183
|
-
dataList.value[1] = time[1] ===
|
|
184
|
-
dataList.value[2] = time[0] ===
|
|
184
|
+
dataList.value[0] = time[2] === '*' ? time[2] : parseInt(time[2], 10).toString()
|
|
185
|
+
dataList.value[1] = time[1] === '*' ? time[1] : parseInt(time[1], 10).toString()
|
|
186
|
+
dataList.value[2] = time[0] === '*' ? time[0] : parseInt(time[0], 10).toString()
|
|
185
187
|
|
|
186
188
|
dataList.value[3] = setData.value.day.length > 0 ? setData.value.day.toString() : '*'
|
|
187
189
|
dataList.value[4] = setData.value.month.length > 0 ? setData.value.month.toString() : '*'
|
|
@@ -212,7 +214,7 @@ export default {
|
|
|
212
214
|
}
|
|
213
215
|
</script>
|
|
214
216
|
<style lang="scss" scoped>
|
|
215
|
-
.select-model{
|
|
217
|
+
.select-model {
|
|
216
218
|
display: flex;
|
|
217
219
|
}
|
|
218
|
-
</style>
|
|
220
|
+
</style>
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- 间隔标题 -->
|
|
3
|
-
<div
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
<div
|
|
4
|
+
v-if="item.component == 'divider'"
|
|
5
|
+
class="title-name title-name-divider"
|
|
6
|
+
:id="'divider-' + item.label"
|
|
7
|
+
:data-index="item.label">
|
|
7
8
|
<span>
|
|
8
9
|
{{ item.label }}
|
|
9
|
-
<el-tooltip v-if="item.tips"
|
|
10
|
-
placement="top">
|
|
10
|
+
<el-tooltip v-if="item.tips" placement="top">
|
|
11
11
|
<template #content>
|
|
12
|
-
<span style="max-width: 300px; display: inline-block
|
|
13
|
-
v-html="item.tips"></span>
|
|
12
|
+
<span style="max-width: 300px; display: inline-block" v-html="item.tips"></span>
|
|
14
13
|
</template>
|
|
15
14
|
<el-icon><el-icon-question-filled /></el-icon>
|
|
16
15
|
</el-tooltip>
|
|
@@ -19,99 +18,92 @@
|
|
|
19
18
|
</div>
|
|
20
19
|
|
|
21
20
|
<!-- 表单内容 -->
|
|
22
|
-
<el-form-item
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
<el-form-item
|
|
22
|
+
v-else
|
|
23
|
+
:class="{ 'form-item-name-null': !item?.label }"
|
|
24
|
+
:prop="getPropName(item)"
|
|
25
|
+
:rules="rulesHandle(item)">
|
|
26
26
|
<template #label>
|
|
27
27
|
{{ item.label }}
|
|
28
|
-
<el-tooltip v-if="item.tips"
|
|
29
|
-
:raw-content="item?.rawContent"
|
|
30
|
-
placement="top"
|
|
31
|
-
:content="item.tips">
|
|
28
|
+
<el-tooltip v-if="item.tips" :raw-content="item?.rawContent" placement="top" :content="item.tips">
|
|
32
29
|
<template #content>
|
|
33
|
-
<span style="max-width: 300px; display: inline-block
|
|
34
|
-
v-html="item.tips"></span>
|
|
30
|
+
<span style="max-width: 300px; display: inline-block" v-html="item.tips"></span>
|
|
35
31
|
</template>
|
|
36
32
|
<el-icon><el-icon-question-filled /></el-icon>
|
|
37
33
|
</el-tooltip>
|
|
38
34
|
</template>
|
|
39
35
|
<!-- cascader 组个组件有问题 动态加载下拉文字不会显示 -->
|
|
40
36
|
<template v-if="item.component == 'cascader'">
|
|
41
|
-
<el-cascader
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
<el-cascader
|
|
38
|
+
v-model="objItem.value"
|
|
39
|
+
style="width: 100%"
|
|
40
|
+
:props="item?.options?.props"
|
|
41
|
+
:separator="item?.options?.separator"
|
|
42
|
+
:disabled="item?.options?.disabled"
|
|
43
|
+
:placeholder="item?.options?.placeholder"
|
|
44
|
+
:options="item?.options.items"
|
|
45
|
+
clearable></el-cascader>
|
|
49
46
|
</template>
|
|
50
47
|
<!-- 动态组件 -->
|
|
51
48
|
<template v-else-if="componentType.includes(item.component)">
|
|
52
|
-
<FormComponent v-model="objItem.value"
|
|
53
|
-
:item="item"
|
|
54
|
-
:disabled="item?.options?.disabled" />
|
|
49
|
+
<FormComponent v-model="objItem.value" :item="item" :disabled="item?.options?.disabled" />
|
|
55
50
|
</template>
|
|
56
51
|
|
|
57
52
|
<!-- upload -->
|
|
58
53
|
<template v-else-if="item.component == 'upload'">
|
|
59
|
-
<template v-for="(_item, _index) in objItem?.options.items"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
54
|
+
<template v-for="(_item, _index) in objItem?.options.items" :key="_index">
|
|
55
|
+
<lw-upload
|
|
56
|
+
v-model="_item.value"
|
|
57
|
+
:height="_item?.height || item.height"
|
|
58
|
+
:width="_item?.width || item.width"
|
|
59
|
+
:maxSize="_item.maxSize"
|
|
60
|
+
:accept="_item.accept"
|
|
61
|
+
:title="_item.label"
|
|
62
|
+
:parseData="item.parseData"
|
|
63
|
+
:disabled="_item?.disabled"
|
|
64
|
+
:multiple="_item?.multiple"
|
|
65
|
+
:limit="_item?.limit"
|
|
66
|
+
:returnFile="_item?.returnFile"
|
|
67
|
+
:tip="_item?.tip"
|
|
68
|
+
:apiObj="item.apiObj"></lw-upload>
|
|
75
69
|
</template>
|
|
76
70
|
</template>
|
|
77
71
|
|
|
78
72
|
<!-- tags -->
|
|
79
73
|
<template v-else-if="item.component == 'tags'">
|
|
80
74
|
<div class="tags-list">
|
|
81
|
-
<el-tag
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
75
|
+
<el-tag
|
|
76
|
+
v-for="tag in objItem.value"
|
|
77
|
+
:key="tag"
|
|
78
|
+
:closable="!item?.options?.disabled || item?.options?.closable"
|
|
79
|
+
:disable-transitions="false"
|
|
80
|
+
@close="tagClose(tag, objItem.value)">
|
|
86
81
|
{{ tag }}
|
|
87
82
|
</el-tag>
|
|
88
|
-
<el-input
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
83
|
+
<el-input
|
|
84
|
+
v-if="tagVisible[item.name]"
|
|
85
|
+
v-model="tagValue"
|
|
86
|
+
class="w-20"
|
|
87
|
+
size="small"
|
|
88
|
+
@keyup.enter="tagInputConfirm(item, objItem.value)"
|
|
89
|
+
@blur="tagInputConfirm(item, objItem.value)" />
|
|
90
|
+
<el-button
|
|
91
|
+
v-if="!tagVisible[item.name] && !item?.options?.disabled"
|
|
92
|
+
class="button-new-tag"
|
|
93
|
+
size="small"
|
|
94
|
+
@click="tagVisible[item.name] = true">
|
|
95
|
+
+ {{ item?.options?.addText || '添加' }}
|
|
99
96
|
</el-button>
|
|
100
97
|
</div>
|
|
101
98
|
</template>
|
|
102
99
|
|
|
103
100
|
<!-- 没有组件是component值 就是插槽名称 -->
|
|
104
101
|
<template v-else>
|
|
105
|
-
<slot :name="item.component"
|
|
106
|
-
|
|
107
|
-
:formCur="form">
|
|
108
|
-
<el-tag type="danger">[{{ item.component }}]
|
|
109
|
-
没有这个默认组件也未自定义插槽内容</el-tag>
|
|
102
|
+
<slot :name="item.component" :itemCur="item" :formCur="form">
|
|
103
|
+
<el-tag type="danger">[{{ item.component }}] 没有这个默认组件也未自定义插槽内容</el-tag>
|
|
110
104
|
</slot>
|
|
111
105
|
</template>
|
|
112
|
-
<div v-if="item.message"
|
|
113
|
-
class="el-form-item-msg"
|
|
114
|
-
v-html="item.message"></div>
|
|
106
|
+
<div v-if="item.message" class="el-form-item-msg" v-html="item.message"></div>
|
|
115
107
|
</el-form-item>
|
|
116
108
|
</template>
|
|
117
109
|
|
|
@@ -150,7 +142,7 @@ export default {
|
|
|
150
142
|
watch: {
|
|
151
143
|
item: {
|
|
152
144
|
handler(val, oldVal) {
|
|
153
|
-
this.objItem = {...val, ...this.objItem}
|
|
145
|
+
this.objItem = { ...val, ...this.objItem }
|
|
154
146
|
},
|
|
155
147
|
immediate: true,
|
|
156
148
|
deep: true
|
|
@@ -158,7 +150,7 @@ export default {
|
|
|
158
150
|
form: {
|
|
159
151
|
handler(val) {
|
|
160
152
|
if (this.item.component === 'checkbox' || this.item.component === 'upload') {
|
|
161
|
-
this.objItem.options?.items?.forEach(option => {
|
|
153
|
+
this.objItem.options?.items?.forEach((option) => {
|
|
162
154
|
option.value = this.flattenObject(this.form, option.name, option.value)
|
|
163
155
|
})
|
|
164
156
|
} else {
|
|
@@ -171,7 +163,7 @@ export default {
|
|
|
171
163
|
objItem: {
|
|
172
164
|
handler(val) {
|
|
173
165
|
if (val.component === 'checkbox' || val.component === 'upload') {
|
|
174
|
-
val.options?.items?.forEach(option => {
|
|
166
|
+
val.options?.items?.forEach((option) => {
|
|
175
167
|
this.unflattenObject(this.form, option.name, option.value)
|
|
176
168
|
})
|
|
177
169
|
} else {
|
|
@@ -252,7 +244,7 @@ export default {
|
|
|
252
244
|
const requiredHandleFunc = new Function('form', `return ${item.requiredHandle.replace(/\$/g, 'form')}`)
|
|
253
245
|
const exp = requiredHandleFunc(this.form)
|
|
254
246
|
|
|
255
|
-
const requiredRule = item.rules.find(t => 'required' in t)
|
|
247
|
+
const requiredRule = item.rules.find((t) => 'required' in t)
|
|
256
248
|
if (requiredRule) {
|
|
257
249
|
requiredRule.required = exp
|
|
258
250
|
}
|
|
@@ -266,7 +258,6 @@ export default {
|
|
|
266
258
|
}
|
|
267
259
|
</script>
|
|
268
260
|
|
|
269
|
-
|
|
270
261
|
<style lang="scss" scoped>
|
|
271
262
|
.w-20 {
|
|
272
263
|
width: 100px;
|
|
@@ -294,6 +285,7 @@ export default {
|
|
|
294
285
|
}
|
|
295
286
|
:deep(.el-form-item__label) {
|
|
296
287
|
position: relative;
|
|
288
|
+
display: inline-block;
|
|
297
289
|
> .el-tooltip__trigger {
|
|
298
290
|
position: absolute;
|
|
299
291
|
right: 0;
|