resolver-egretimp-plus 0.0.87 → 0.0.89
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/const/index.js +2 -1
- package/dist/h5/index.js +3 -2
- package/dist/web/index.js +76 -75
- package/package.json +1 -1
- package/scripts/webpack.config.js +1 -0
- package/src/components/packages-H5/CustomComponentTableH5.vue +1 -1
- package/src/components/packages-web/ElCheckbox.vue +8 -2
- package/src/components/packages-web/ElSelect.vue +13 -7
- package/src/rules/eventsSupplement.js +4 -0
package/package.json
CHANGED
|
@@ -50,6 +50,12 @@ const checkboxProps = computed(() => {
|
|
|
50
50
|
return ret
|
|
51
51
|
})
|
|
52
52
|
const attrs = useAttrs()
|
|
53
|
+
|
|
54
|
+
// 值是list 还是,连起来的string
|
|
55
|
+
const isStrVal = computed(() => {
|
|
56
|
+
// valueType 值为 list 或者 string
|
|
57
|
+
return props.config?.valueType !== 'list'
|
|
58
|
+
})
|
|
53
59
|
// 是否为多选
|
|
54
60
|
const isMutiple = computed(() => {
|
|
55
61
|
return props.options && props.options.length
|
|
@@ -60,14 +66,14 @@ const proxyValue = computed({
|
|
|
60
66
|
get() {
|
|
61
67
|
if (isMutiple.value) {
|
|
62
68
|
const val = modelValue.value || ''
|
|
63
|
-
return val ? val.split(',') : []
|
|
69
|
+
return val ? (isStrVal.value ? val.split(',') : val) : []
|
|
64
70
|
} else {
|
|
65
71
|
return modelValue.value
|
|
66
72
|
}
|
|
67
73
|
},
|
|
68
74
|
set(val) {
|
|
69
75
|
if (isMutiple.value) {
|
|
70
|
-
modelValue.value = val.join(',')
|
|
76
|
+
modelValue.value = isStrVal.value ? val.join(',') : val
|
|
71
77
|
} else {
|
|
72
78
|
modelValue.value = val
|
|
73
79
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
2
|
<ElSelect class="custom-self-select" v-bind="{...attrs, ...selectProps }" v-model="value" @clear="clear">
|
|
4
3
|
<ElOption v-for="option in props.options"
|
|
5
4
|
:key="option.columnValue"
|
|
@@ -21,11 +20,22 @@ const props = defineProps({
|
|
|
21
20
|
})
|
|
22
21
|
const attrs = useAttrs()
|
|
23
22
|
|
|
23
|
+
// 值是list 还是,连起来的string
|
|
24
|
+
const isStrVal = computed(() => {
|
|
25
|
+
// valueType 值为 list 或者 string
|
|
26
|
+
return props.config?.valueType !== 'list'
|
|
27
|
+
})
|
|
28
|
+
// 是否为多选
|
|
29
|
+
const isMutiple = computed(() => {
|
|
30
|
+
return props.multiple == '1'
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
|
|
24
34
|
const value = computed({
|
|
25
35
|
get() {
|
|
26
36
|
if (isMutiple.value) {
|
|
27
37
|
const val = modelValue.value || ''
|
|
28
|
-
return val ? val.split(',') : []
|
|
38
|
+
return val ? (isStrVal.value ? val.split(',') : val) : []
|
|
29
39
|
} else {
|
|
30
40
|
if (modelValue.value !== null && modelValue.value !== undefined) {
|
|
31
41
|
if (props.options?.some(item => item.columnValue == modelValue.value)) {
|
|
@@ -42,16 +52,12 @@ const value = computed({
|
|
|
42
52
|
},
|
|
43
53
|
set(val) {
|
|
44
54
|
if (isMutiple.value) {
|
|
45
|
-
modelValue.value = val.join(',')
|
|
55
|
+
modelValue.value = isStrVal.value ? val.join(',') : val
|
|
46
56
|
} else {
|
|
47
57
|
modelValue.value = val
|
|
48
58
|
}
|
|
49
59
|
}
|
|
50
60
|
})
|
|
51
|
-
// 是否为多选
|
|
52
|
-
const isMutiple = computed(() => {
|
|
53
|
-
return props.multiple == '1'
|
|
54
|
-
})
|
|
55
61
|
|
|
56
62
|
const selectProps = computed(() => {
|
|
57
63
|
const attrs = Object.keys(ElSelect.props).reduce((ret, key) => {
|
|
@@ -223,7 +223,9 @@ const allInitEvents = {
|
|
|
223
223
|
// const oldDisplayType = labelInfo && labelInfo.displayType
|
|
224
224
|
// oldDisplayTypes.push(oldDisplayType)
|
|
225
225
|
labelInfo && (labelInfo.displayType = '1')
|
|
226
|
+
labelInfo && (labelInfo.hidden = '0')
|
|
226
227
|
labelInfo && labelInfo.refConfig && (labelInfo.refConfig.displayType = '1')
|
|
228
|
+
labelInfo && labelInfo.refConfig && (labelInfo.refConfig.hidden = '0')
|
|
227
229
|
})
|
|
228
230
|
// 有的事件在不满足条件的情况下,需要进行恢复
|
|
229
231
|
return () => {
|
|
@@ -236,7 +238,9 @@ const allInitEvents = {
|
|
|
236
238
|
configs.forEach((labelInfo, idx) => {
|
|
237
239
|
// const oldDisplayType = oldDisplayTypes[idx]
|
|
238
240
|
labelInfo && (labelInfo.displayType = '0')
|
|
241
|
+
labelInfo && (labelInfo.hidden = '1')
|
|
239
242
|
labelInfo && labelInfo.refConfig && (labelInfo.refConfig.displayType = '0')
|
|
243
|
+
labelInfo && labelInfo.refConfig && (labelInfo.refConfig.hidden = '1')
|
|
240
244
|
})
|
|
241
245
|
}, 0)
|
|
242
246
|
}
|