resolver-egretimp-plus 0.0.81 → 0.0.82
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
|
@@ -11,6 +11,10 @@ const lang = inject('lang')
|
|
|
11
11
|
const label = computed(() => {
|
|
12
12
|
return lang.value.indexOf('zh') > -1 ? (props.config?.labelZh || props.config?.metaNameZh) : (props.config?.labelEn || props.config?.metaNameEn)
|
|
13
13
|
})
|
|
14
|
+
// 是否为多选
|
|
15
|
+
const isMutiple = computed(() => {
|
|
16
|
+
return props.options && props.options.length
|
|
17
|
+
})
|
|
14
18
|
|
|
15
19
|
const checkboxGroupProps = computed(() => {
|
|
16
20
|
return {
|
|
@@ -28,18 +32,36 @@ const checkboxProps = computed(() => {
|
|
|
28
32
|
}
|
|
29
33
|
})
|
|
30
34
|
const attrs = useAttrs()
|
|
31
|
-
const
|
|
35
|
+
const modelValue = defineModel()
|
|
36
|
+
|
|
37
|
+
const proxyValue = computed({
|
|
38
|
+
get() {
|
|
39
|
+
if (isMutiple.value) {
|
|
40
|
+
const val = modelValue.value || ''
|
|
41
|
+
return val ? val.split(',') : []
|
|
42
|
+
} else {
|
|
43
|
+
return modelValue.value
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
set(val) {
|
|
47
|
+
if (isMutiple.value) {
|
|
48
|
+
modelValue.value = val.join(',')
|
|
49
|
+
} else {
|
|
50
|
+
modelValue.value = val
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
})
|
|
32
54
|
|
|
33
55
|
const onChange = ({ detail }) => {
|
|
34
|
-
|
|
56
|
+
proxyValue.value = detail.value
|
|
35
57
|
}
|
|
36
58
|
const onSigleChange = ({ detail }) => {
|
|
37
|
-
|
|
59
|
+
proxyValue.value = detail.value ? '1' : '0'
|
|
38
60
|
}
|
|
39
61
|
</script>
|
|
40
62
|
|
|
41
63
|
<template>
|
|
42
|
-
<cmi-checkbox-group :value="
|
|
64
|
+
<cmi-checkbox-group :value="proxyValue" @change="onChange" v-if="isMutiple" v-bind="{...attrs, ...checkboxGroupProps}">
|
|
43
65
|
<cmi-checkbox
|
|
44
66
|
class="mr-20"
|
|
45
67
|
v-for="option in props.options" :key="option.columnValue"
|
|
@@ -49,7 +71,7 @@ const onSigleChange = ({ detail }) => {
|
|
|
49
71
|
{{lang.indexOf('zh') > -1 ? option.columnDesc_zh : option.columnDesc}}
|
|
50
72
|
</cmi-checkbox>
|
|
51
73
|
</cmi-checkbox-group>
|
|
52
|
-
<cmi-checkbox v-else v-bind="{...attrs, ...checkboxProps}" :checked="
|
|
74
|
+
<cmi-checkbox v-else v-bind="{...attrs, ...checkboxProps}" :checked="proxyValue === '1'" :value="proxyValue" @change="onSigleChange">
|
|
53
75
|
{{ label }}
|
|
54
76
|
</cmi-checkbox>
|
|
55
77
|
</template>
|
|
@@ -189,7 +189,7 @@ function normalTableRowValue(row) {
|
|
|
189
189
|
>
|
|
190
190
|
</cmi-table-column>
|
|
191
191
|
</cmi-table>
|
|
192
|
-
<div v-if="pageable && normalPageTotal >
|
|
192
|
+
<div v-if="pageable && normalPageTotal > 3" :style="{'justify-content': pageAlignEnmu[pageAlign || PAGE_RIGHT]}" style="margin-bottom: 12px;">
|
|
193
193
|
<cmi-pagination
|
|
194
194
|
:key="normalPageTotal"
|
|
195
195
|
v-bind="{...paginationProps, ...pagenationEvents}"
|