resolver-egretimp-plus 0.1.92 → 0.1.93
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/package.json
CHANGED
|
@@ -24,6 +24,16 @@ const props = defineProps({
|
|
|
24
24
|
isPointer: {
|
|
25
25
|
type: [String, Number]
|
|
26
26
|
},
|
|
27
|
+
// 多选的分割符号
|
|
28
|
+
separator: {
|
|
29
|
+
type: [String],
|
|
30
|
+
default: ','
|
|
31
|
+
},
|
|
32
|
+
// 多选显示时候 分隔的符号
|
|
33
|
+
separatorDesc: {
|
|
34
|
+
type: [String],
|
|
35
|
+
default: null
|
|
36
|
+
},
|
|
27
37
|
showMoney: {
|
|
28
38
|
type: [String, Number],
|
|
29
39
|
default: ''
|
|
@@ -161,14 +171,14 @@ function selectFormat(value) {
|
|
|
161
171
|
// 在满足多选,并且不是str格式的时候,就表示value为数组类型,取反就表示不满足的时候,需要转换成数组格式进行计算
|
|
162
172
|
if (!(multiple && !isStrVal)) {
|
|
163
173
|
try {
|
|
164
|
-
valList = valList ? (valList?.split(
|
|
174
|
+
valList = valList ? (valList?.split(props.separator) || []) : []
|
|
165
175
|
} catch (error) {
|
|
166
176
|
debugger
|
|
167
177
|
}
|
|
168
178
|
}
|
|
169
179
|
return valList?.reduce((ret, val) => {
|
|
170
180
|
const str = props?.options?.find(item => item.columnValue == val)?.[lang?.value?.indexOf('zh') > -1 ? 'columnDesc_zh' : 'columnDesc'] || ''
|
|
171
|
-
return `${ret}${ret ?
|
|
181
|
+
return `${ret}${ret ? (props.separatorDesc || props.separator) : ''}${str}`
|
|
172
182
|
}, '')
|
|
173
183
|
}
|
|
174
184
|
|