imeik-bizui 2.2.6 → 2.2.7
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/bizui/src/CommonRegionCascader/index.vue +45 -2
- package/dist/imeik-bizui.common.js +66 -61
- package/dist/imeik-bizui.common.js.gz +0 -0
- package/dist/imeik-bizui.umd.js +66 -61
- package/dist/imeik-bizui.umd.js.gz +0 -0
- package/dist/imeik-bizui.umd.min.js +1 -1
- package/dist/imeik-bizui.umd.min.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
区域级联选择器组件
|
|
3
|
+
|
|
4
|
+
用途:
|
|
5
|
+
1. 支持区域级联选择
|
|
6
|
+
2. 支持单选和多选
|
|
7
|
+
3. 支持展开收起
|
|
8
|
+
4. 支持指定某个区域节点
|
|
9
|
+
5. 支持指定某个区域节点以后是否展示根节点
|
|
10
|
+
|
|
11
|
+
属性说明:
|
|
12
|
+
value: 选择器的值
|
|
13
|
+
multiple: 是否多选
|
|
14
|
+
emitPath: 是否返回选中节点的完整路径
|
|
15
|
+
expandTrigger: 次级菜单的展开方式
|
|
16
|
+
checkStrictly: 是否严格的遵守父子节点不互相关联
|
|
17
|
+
isView: 是否仅展示文字
|
|
18
|
+
level: 指定层级,字符串类型,需要注意的是省对应的是‘2’
|
|
19
|
+
placeholder: 占位符
|
|
20
|
+
...attrs: 其他属性会透传给el-cascader
|
|
21
|
+
props: 级联选择器配置 默认值为:
|
|
22
|
+
{
|
|
23
|
+
label: 'name',
|
|
24
|
+
value: 'code',
|
|
25
|
+
children: 'subRegin',
|
|
26
|
+
expandTrigger: 'hover',
|
|
27
|
+
checkStrictly: true,
|
|
28
|
+
emitPath: false,
|
|
29
|
+
multiple: false
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
使用示例:
|
|
33
|
+
<CommonRegionCascader
|
|
34
|
+
v-model="formConfig.props.regionCodes"
|
|
35
|
+
multiple
|
|
36
|
+
:show-all-levels="false"
|
|
37
|
+
></CommonRegionCascader>
|
|
38
|
+
-->
|
|
1
39
|
<template>
|
|
2
40
|
<el-cascader v-if="!isView" v-model="myValue" :props="props" :options="options" :placeholder="placeholder" clearable filterable v-bind="$attrs" @change="handleChange"></el-cascader>
|
|
3
41
|
<div v-else>{{ myLabel || '-' }}</div>
|
|
@@ -29,6 +67,10 @@ export default {
|
|
|
29
67
|
type: Boolean,
|
|
30
68
|
default: false
|
|
31
69
|
},
|
|
70
|
+
multiple: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: false
|
|
73
|
+
},
|
|
32
74
|
props: {
|
|
33
75
|
type: Object,
|
|
34
76
|
default() {
|
|
@@ -38,7 +80,8 @@ export default {
|
|
|
38
80
|
children: 'subRegin',
|
|
39
81
|
expandTrigger: 'hover',
|
|
40
82
|
checkStrictly: this.checkStrictly,
|
|
41
|
-
emitPath: this.emitPath
|
|
83
|
+
emitPath: this.emitPath,
|
|
84
|
+
multiple: this.multiple
|
|
42
85
|
}
|
|
43
86
|
}
|
|
44
87
|
}
|
|
@@ -143,7 +186,7 @@ export default {
|
|
|
143
186
|
} else {
|
|
144
187
|
// 多选情况,value是code数组
|
|
145
188
|
const labels = []
|
|
146
|
-
value.forEach(code => {
|
|
189
|
+
value.forEach((code) => {
|
|
147
190
|
const label = this.findLabelByCode(options, code)
|
|
148
191
|
if (label) {
|
|
149
192
|
labels.push(label)
|