@archbiz/element-ui 0.0.0-stage → 0.1.1
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/element-ui.cjs +11 -0
- package/dist/element-ui.js +5518 -0
- package/dist/style.css +1 -0
- package/package.json +50 -4
- package/src/components/ab-checkbox.vue +51 -0
- package/src/components/ab-color-picker.vue +39 -0
- package/src/components/ab-detail/ab-detail.vue +285 -0
- package/src/components/ab-detail/index.js +1 -0
- package/src/components/ab-drawer/ab-drawer.vue +50 -0
- package/src/components/ab-drawer/index.js +3 -0
- package/src/components/ab-icon/ab-icon.vue +90 -0
- package/src/components/ab-icon/index.js +1 -0
- package/src/components/ab-input-number.vue +49 -0
- package/src/components/ab-input-range.vue +90 -0
- package/src/components/ab-radio.vue +51 -0
- package/src/components/ab-router-link.vue +46 -0
- package/src/components/ab-search/ab-search.vue +168 -0
- package/src/components/ab-search/index.js +4 -0
- package/src/components/ab-select.vue +107 -0
- package/src/components/ab-table/ab-table-column.vue +131 -0
- package/src/components/ab-table/ab-table-columns.vue +62 -0
- package/src/components/ab-table/ab-table-operate.vue +160 -0
- package/src/components/ab-table/ab-table.vue +316 -0
- package/src/components/ab-table/columns.js +90 -0
- package/src/components/ab-table/footer.js +77 -0
- package/src/components/ab-table/formatter.js +2 -0
- package/src/components/ab-table/index.js +8 -0
- package/src/components/ab-table/utils.js +36 -0
- package/src/components/ab-time-period.vue +116 -0
- package/src/components/ab-time-picker.vue +38 -0
- package/src/components/ab-toolbar/ab-toolbar.vue +102 -0
- package/src/components/ab-toolbar/index.js +1 -0
- package/src/components/ab-tree-select.vue +456 -0
- package/src/components/ab-upload-file.vue +277 -0
- package/src/components/index.js +27 -0
- package/src/core/ab-form.js +25 -0
- package/src/core/alias.js +36 -0
- package/src/core/config.js +65 -0
- package/src/core/form-render.js +256 -0
- package/src/core/options.js +25 -0
- package/src/hooks/use-cache.js +75 -0
- package/src/index.js +39 -0
- package/src/makers/datePicker.js +8 -0
- package/src/makers/frame.js +23 -0
- package/src/makers/index.js +23 -0
- package/src/makers/input.js +12 -0
- package/src/makers/select.js +8 -0
- package/src/makers/slider.js +7 -0
- package/src/makers/timePicker.js +8 -0
- package/src/makers/tree.js +10 -0
- package/src/makers/upload.js +20 -0
- package/src/parsers/checkbox.js +5 -0
- package/src/parsers/colorPicker.js +29 -0
- package/src/parsers/datePicker.js +24 -0
- package/src/parsers/frame.js +17 -0
- package/src/parsers/hidden.js +11 -0
- package/src/parsers/index.js +36 -0
- package/src/parsers/input.js +15 -0
- package/src/parsers/number.js +29 -0
- package/src/parsers/radio.js +5 -0
- package/src/parsers/select.js +15 -0
- package/src/parsers/slider.js +21 -0
- package/src/parsers/switch.js +11 -0
- package/src/parsers/text.js +25 -0
- package/src/parsers/timePicker.js +12 -0
- package/src/parsers/tree.js +37 -0
- package/src/parsers/upload.js +35 -0
- package/src/plugins/ab-detail.js +7 -0
- package/src/plugins/ab-drawer.js +7 -0
- package/src/plugins/ab-form.js +14 -0
- package/src/plugins/ab-search.js +7 -0
- package/src/plugins/ab-table.js +15 -0
- package/src/plugins/ab-toolbar.js +7 -0
- package/src/rule/defaults.js +187 -0
- package/src/rule/formatter.js +218 -0
- package/src/style/index.css +356 -0
- package/src/utils/formatter.js +188 -0
- package/src/utils/router-link.js +59 -0
- package/README.md +0 -3
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-popover
|
|
3
|
+
ref="popover"
|
|
4
|
+
placement="bottom-start"
|
|
5
|
+
v-model="visible"
|
|
6
|
+
width="320"
|
|
7
|
+
:disabled="disabled"
|
|
8
|
+
trigger="manual"
|
|
9
|
+
@show="onShow"
|
|
10
|
+
@hide="onHide"
|
|
11
|
+
popper-class="ab-tree-select__popper"
|
|
12
|
+
>
|
|
13
|
+
<div class="ab-tree-select__dropdown" @mouseenter="onDropdownEnter" @mouseleave="onDropdownLeave">
|
|
14
|
+
<div v-if="filterable" class="ab-tree-select__filter">
|
|
15
|
+
<el-input v-model="filterText" size="small" placeholder="搜索..." class="ab-tree-select__filter-input" @keydown.esc.stop @keydown.tab.stop @click.stop>
|
|
16
|
+
<template slot="prefix">
|
|
17
|
+
<i class="el-icon-search" />
|
|
18
|
+
</template>
|
|
19
|
+
<template slot="suffix" v-if="filterText">
|
|
20
|
+
<i class="el-icon-circle-close" @click.stop="filterText = ''" />
|
|
21
|
+
</template>
|
|
22
|
+
</el-input>
|
|
23
|
+
</div>
|
|
24
|
+
<el-tree
|
|
25
|
+
ref="tree"
|
|
26
|
+
:data="filteredData"
|
|
27
|
+
:props="treeProps"
|
|
28
|
+
:node-key="treeProps.value"
|
|
29
|
+
:default-expanded-keys="defaultExpandedKeysInternal"
|
|
30
|
+
:show-checkbox="multiple"
|
|
31
|
+
:check-strictly="checkStrictly"
|
|
32
|
+
:highlight-current="!multiple"
|
|
33
|
+
:default-checked-keys="getDefaultCheckedKeys()"
|
|
34
|
+
:filter-node-method="filterNodeMethod"
|
|
35
|
+
@node-click="handleNodeClick"
|
|
36
|
+
@check-change="handleCheckChange"
|
|
37
|
+
@current-change="handleCurrentChange"
|
|
38
|
+
style="max-height: 300px; overflow: auto"
|
|
39
|
+
/>
|
|
40
|
+
<div v-if="filteredData.length === 0 && filterText" class="ab-tree-select__empty">无匹配数据</div>
|
|
41
|
+
</div>
|
|
42
|
+
<template slot="reference">
|
|
43
|
+
<div class="ab-tree-select__reference">
|
|
44
|
+
<!-- 单选/非多选:显示输入框 -->
|
|
45
|
+
<el-input
|
|
46
|
+
v-if="!multiple"
|
|
47
|
+
ref="input"
|
|
48
|
+
v-bind="$attrs"
|
|
49
|
+
:value="displayValue"
|
|
50
|
+
:size="currentSize"
|
|
51
|
+
:disabled="disabled"
|
|
52
|
+
:readonly="true"
|
|
53
|
+
:placeholder="placeholder"
|
|
54
|
+
@focus="handleFocus"
|
|
55
|
+
@blur="handleBlur"
|
|
56
|
+
class="ab-tree-select__input"
|
|
57
|
+
>
|
|
58
|
+
<template slot="suffix">
|
|
59
|
+
<i class="el-input__suffix-inner el-select__caret el-icon-arrow-down" :class="{ 'is-reverse': visible }" />
|
|
60
|
+
</template>
|
|
61
|
+
</el-input>
|
|
62
|
+
<!-- 多选:隐藏输入框只用于表单提交,显示标签区域作为点击容器 -->
|
|
63
|
+
<div v-else class="ab-tree-select__tags-wrapper" @click="handleClick">
|
|
64
|
+
<input type="hidden" ref="input" :name="$attrs.name" :value="Array.isArray(value) ? value.join(',') : value || ''" />
|
|
65
|
+
<div class="ab-tree-select__tags">
|
|
66
|
+
<el-tag v-if="displayLabels.length === 1" size="small" type="info" @close.stop="removeTag(displayLabels[0].value)" class="ab-tree-select__tag">
|
|
67
|
+
{{ displayLabels[0].label }}
|
|
68
|
+
</el-tag>
|
|
69
|
+
<span v-else-if="displayLabels.length > 1" class="ab-tree-select__tag-multiple">
|
|
70
|
+
<el-tag size="small" type="info" class="ab-tree-select__first-tag" @close.stop="removeTag(displayLabels[0].value)">
|
|
71
|
+
{{ displayLabels[0].label }}
|
|
72
|
+
</el-tag>
|
|
73
|
+
<el-tag size="small" type="info" class="ab-tree-select__count-tag"> +{{ displayLabels.length - 1 }} </el-tag>
|
|
74
|
+
</span>
|
|
75
|
+
<span v-else class="ab-tree-select__placeholder">{{ placeholder }}</span>
|
|
76
|
+
<i class="el-select__caret el-icon-arrow-down" :class="{ 'is-reverse': visible }" />
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</template>
|
|
81
|
+
</el-popover>
|
|
82
|
+
</template>
|
|
83
|
+
|
|
84
|
+
<script>
|
|
85
|
+
export default {
|
|
86
|
+
name: "AbTreeSelect",
|
|
87
|
+
inheritAttrs: false,
|
|
88
|
+
props: {
|
|
89
|
+
value: {
|
|
90
|
+
type: [Array, String, Number, Boolean, Object],
|
|
91
|
+
default: undefined,
|
|
92
|
+
},
|
|
93
|
+
data: {
|
|
94
|
+
type: Array,
|
|
95
|
+
default: () => [],
|
|
96
|
+
},
|
|
97
|
+
props: {
|
|
98
|
+
type: Object,
|
|
99
|
+
default: () => ({}),
|
|
100
|
+
},
|
|
101
|
+
multiple: Boolean,
|
|
102
|
+
checkStrictly: Boolean,
|
|
103
|
+
filterable: Boolean,
|
|
104
|
+
disabled: Boolean,
|
|
105
|
+
placeholder: String,
|
|
106
|
+
size: String,
|
|
107
|
+
defaultExpandedKeys: Array,
|
|
108
|
+
showValue: Boolean,
|
|
109
|
+
showKey: Boolean,
|
|
110
|
+
showCode: Boolean,
|
|
111
|
+
abFormInject: Object,
|
|
112
|
+
},
|
|
113
|
+
data() {
|
|
114
|
+
return {
|
|
115
|
+
visible: false,
|
|
116
|
+
filterText: "",
|
|
117
|
+
dropdownHovering: false,
|
|
118
|
+
inputHovering: false,
|
|
119
|
+
currentNodeKey: null,
|
|
120
|
+
defaultExpandedKeysInternal: [],
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
computed: {
|
|
124
|
+
currentSize() {
|
|
125
|
+
return this.size || (this.$ELEMENT && this.$ELEMENT.size) || "default";
|
|
126
|
+
},
|
|
127
|
+
treeData() {
|
|
128
|
+
return this.data || (this.abFormInject && this.abFormInject.options) || [];
|
|
129
|
+
},
|
|
130
|
+
treeProps() {
|
|
131
|
+
const p = this.props || {};
|
|
132
|
+
return {
|
|
133
|
+
value: p.valueKey || p.nodeKey || "value",
|
|
134
|
+
label: p.label || "label",
|
|
135
|
+
children: p.children || "children",
|
|
136
|
+
disabled: p.disabled || "disabled",
|
|
137
|
+
leaf: p.leaf || "isLeaf",
|
|
138
|
+
...p,
|
|
139
|
+
};
|
|
140
|
+
},
|
|
141
|
+
filteredData() {
|
|
142
|
+
if (!this.filterText) return this.treeData;
|
|
143
|
+
const filter = this.filterText.toLowerCase();
|
|
144
|
+
const filterNode = (nodes) => {
|
|
145
|
+
return nodes
|
|
146
|
+
.map((node) => {
|
|
147
|
+
const label = String(node[this.treeProps.label] || "").toLowerCase();
|
|
148
|
+
const match = label.includes(filter);
|
|
149
|
+
const children = node[this.treeProps.children];
|
|
150
|
+
const filteredChildren = children ? filterNode(children) : [];
|
|
151
|
+
if (match || filteredChildren.length) {
|
|
152
|
+
return { ...node, [this.treeProps.children]: filteredChildren };
|
|
153
|
+
}
|
|
154
|
+
return null;
|
|
155
|
+
})
|
|
156
|
+
.filter(Boolean);
|
|
157
|
+
};
|
|
158
|
+
return filterNode(this.treeData);
|
|
159
|
+
},
|
|
160
|
+
displayLabels() {
|
|
161
|
+
if (!this.multiple || !this.value || !Array.isArray(this.value) || !this.value.length) return [];
|
|
162
|
+
const valueKey = this.treeProps.value;
|
|
163
|
+
const labelKey = this.treeProps.label;
|
|
164
|
+
const findNode = (nodes, value) => {
|
|
165
|
+
for (const node of nodes || []) {
|
|
166
|
+
if (node[valueKey] === value) return node;
|
|
167
|
+
const found = findNode(node[this.treeProps.children], value);
|
|
168
|
+
if (found) return found;
|
|
169
|
+
}
|
|
170
|
+
return null;
|
|
171
|
+
};
|
|
172
|
+
return this.value.map((val) => {
|
|
173
|
+
const node = findNode(this.treeData, val);
|
|
174
|
+
return node ? { value: val, label: node[labelKey] } : { value: val, label: String(val) };
|
|
175
|
+
});
|
|
176
|
+
},
|
|
177
|
+
displayValue() {
|
|
178
|
+
if (this.value === undefined || this.value === null || this.value === "") return "";
|
|
179
|
+
const values = Array.isArray(this.value) ? this.value : [this.value];
|
|
180
|
+
const valueKey = this.treeProps.value;
|
|
181
|
+
const labelKey = this.treeProps.label;
|
|
182
|
+
const findLabel = (nodes, value) => {
|
|
183
|
+
for (const node of nodes || []) {
|
|
184
|
+
if (node[valueKey] === value) return node[labelKey];
|
|
185
|
+
const found = findLabel(node[this.treeProps.children], value);
|
|
186
|
+
if (found) return found;
|
|
187
|
+
}
|
|
188
|
+
return null;
|
|
189
|
+
};
|
|
190
|
+
const labels = values.map((val) => findLabel(this.treeData, val));
|
|
191
|
+
return labels.filter(Boolean).join(", ");
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
watch: {
|
|
195
|
+
visible(val) {
|
|
196
|
+
if (val) {
|
|
197
|
+
this.filterText = "";
|
|
198
|
+
this.$nextTick(() => {
|
|
199
|
+
if (this.$refs.tree) {
|
|
200
|
+
if (this.multiple && Array.isArray(this.value)) {
|
|
201
|
+
this.$refs.tree.setCheckedKeys(this.value);
|
|
202
|
+
} else if (!this.multiple && this.value !== undefined && this.value !== null) {
|
|
203
|
+
this.$refs.tree.setCurrentKey(this.value);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
value(newVal) {
|
|
210
|
+
if (this.visible && this.$refs.tree) {
|
|
211
|
+
if (this.multiple && Array.isArray(newVal)) {
|
|
212
|
+
this.$refs.tree.setCheckedKeys(newVal);
|
|
213
|
+
} else if (!this.multiple && newVal !== undefined && newVal !== null) {
|
|
214
|
+
this.$refs.tree.setCurrentKey(newVal);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
treeData(newVal) {
|
|
219
|
+
if (this.defaultExpandedKeys && this.defaultExpandedKeys.length) {
|
|
220
|
+
this.defaultExpandedKeysInternal = [...this.defaultExpandedKeys];
|
|
221
|
+
} else {
|
|
222
|
+
const keys = [];
|
|
223
|
+
const collectKeys = (nodes) => {
|
|
224
|
+
for (const node of nodes || []) {
|
|
225
|
+
if (node[this.treeProps.children] && node[this.treeProps.children].length) {
|
|
226
|
+
keys.push(node[this.treeProps.value]);
|
|
227
|
+
collectKeys(node[this.treeProps.children]);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
collectKeys(newVal);
|
|
232
|
+
this.defaultExpandedKeysInternal = keys;
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
mounted() {
|
|
237
|
+
this.$emit("fc.el", this.$refs.input);
|
|
238
|
+
document.addEventListener("click", this.handleOutsideClick, true);
|
|
239
|
+
this.updateDefaultExpandedKeys();
|
|
240
|
+
},
|
|
241
|
+
beforeDestroy() {
|
|
242
|
+
document.removeEventListener("click", this.handleOutsideClick, true);
|
|
243
|
+
},
|
|
244
|
+
methods: {
|
|
245
|
+
filterNodeMethod(value, node) {
|
|
246
|
+
if (!this.filterText) return true;
|
|
247
|
+
return String(node[this.treeProps.label] || "")
|
|
248
|
+
.toLowerCase()
|
|
249
|
+
.includes(this.filterText.toLowerCase());
|
|
250
|
+
},
|
|
251
|
+
getDefaultCheckedKeys() {
|
|
252
|
+
if (!this.multiple) return [];
|
|
253
|
+
const valueKey = this.treeProps.value;
|
|
254
|
+
if (this.checkStrictly) {
|
|
255
|
+
return Array.isArray(this.value) ? this.value : this.value ? [this.value] : [];
|
|
256
|
+
}
|
|
257
|
+
const leafKeys = [];
|
|
258
|
+
const collectLeafKeys = (nodes) => {
|
|
259
|
+
for (const node of nodes || []) {
|
|
260
|
+
if (!node[this.treeProps.children] || !node[this.treeProps.children].length) {
|
|
261
|
+
leafKeys.push(node[valueKey]);
|
|
262
|
+
} else {
|
|
263
|
+
collectLeafKeys(node[this.treeProps.children]);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
collectLeafKeys(this.treeData);
|
|
268
|
+
return leafKeys.filter((key) => (Array.isArray(this.value) ? this.value.includes(key) : this.value === key));
|
|
269
|
+
},
|
|
270
|
+
handleNodeClick(data, node, e) {
|
|
271
|
+
if (this.multiple) return;
|
|
272
|
+
const valueKey = this.treeProps.value;
|
|
273
|
+
const newValue = data[valueKey];
|
|
274
|
+
this.$emit("input", newValue);
|
|
275
|
+
this.$emit("change", newValue);
|
|
276
|
+
this.visible = false;
|
|
277
|
+
},
|
|
278
|
+
handleCheckChange(data, checked) {
|
|
279
|
+
if (!this.multiple) return;
|
|
280
|
+
const valueKey = this.treeProps.value;
|
|
281
|
+
const checkedKeys = this.$refs.tree.getCheckedKeys();
|
|
282
|
+
let value;
|
|
283
|
+
if (this.checkStrictly) {
|
|
284
|
+
value = checkedKeys;
|
|
285
|
+
} else {
|
|
286
|
+
const checkedNodes = this.$refs.tree.getCheckedNodes();
|
|
287
|
+
value = checkedNodes.filter((n) => n.isLeaf).map((n) => n[valueKey]);
|
|
288
|
+
}
|
|
289
|
+
this.$emit("input", value);
|
|
290
|
+
this.$emit("change", value);
|
|
291
|
+
},
|
|
292
|
+
handleCurrentChange(node) {
|
|
293
|
+
if (node) {
|
|
294
|
+
this.currentNodeKey = node[this.treeProps.value];
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
handleFocus() {
|
|
298
|
+
if (!this.disabled && !this.multiple) {
|
|
299
|
+
this.inputHovering = true;
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
handleBlur() {
|
|
303
|
+
if (!this.multiple) {
|
|
304
|
+
this.inputHovering = false;
|
|
305
|
+
setTimeout(() => {
|
|
306
|
+
if (!this.inputHovering && !this.dropdownHovering) {
|
|
307
|
+
this.visible = false;
|
|
308
|
+
}
|
|
309
|
+
}, 150);
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
handleClick(e) {
|
|
313
|
+
if (!this.disabled) {
|
|
314
|
+
// 防止点击标签关闭时触发 toggle
|
|
315
|
+
if (e.target.closest(".ab-tree-select__tag")) return;
|
|
316
|
+
this.visible = !this.visible;
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
onDropdownEnter() {
|
|
320
|
+
this.dropdownHovering = true;
|
|
321
|
+
},
|
|
322
|
+
onDropdownLeave() {
|
|
323
|
+
this.dropdownHovering = false;
|
|
324
|
+
setTimeout(() => {
|
|
325
|
+
if (!this.inputHovering && !this.dropdownHovering) {
|
|
326
|
+
this.visible = false;
|
|
327
|
+
}
|
|
328
|
+
}, 100);
|
|
329
|
+
},
|
|
330
|
+
onShow() {
|
|
331
|
+
this.$emit("visible-change", true);
|
|
332
|
+
},
|
|
333
|
+
onHide() {
|
|
334
|
+
this.$emit("visible-change", false);
|
|
335
|
+
},
|
|
336
|
+
handleOutsideClick(e) {
|
|
337
|
+
if (this.$refs.popover && this.$refs.popover.popperElm) {
|
|
338
|
+
const popperElm = this.$refs.popover.popperElm;
|
|
339
|
+
const referenceElm = this.$refs.popover.referenceElm || this.$el.querySelector(".ab-tree-select__reference");
|
|
340
|
+
if (!popperElm.contains(e.target) && (!referenceElm || !referenceElm.contains(e.target))) {
|
|
341
|
+
this.visible = false;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
removeTag(item) {
|
|
346
|
+
if (this.disabled) return;
|
|
347
|
+
let newValue;
|
|
348
|
+
if (this.multiple && Array.isArray(this.value)) {
|
|
349
|
+
newValue = this.value.filter((v) => v !== item);
|
|
350
|
+
}
|
|
351
|
+
this.$emit("input", newValue);
|
|
352
|
+
this.$emit("change", newValue);
|
|
353
|
+
},
|
|
354
|
+
updateDefaultExpandedKeys() {
|
|
355
|
+
if (this.defaultExpandedKeys && this.defaultExpandedKeys.length) {
|
|
356
|
+
this.defaultExpandedKeysInternal = [...this.defaultExpandedKeys];
|
|
357
|
+
} else {
|
|
358
|
+
const keys = [];
|
|
359
|
+
const collectKeys = (nodes) => {
|
|
360
|
+
for (const node of nodes || []) {
|
|
361
|
+
if (node[this.treeProps.children] && node[this.treeProps.children].length) {
|
|
362
|
+
keys.push(node[this.treeProps.value]);
|
|
363
|
+
collectKeys(node[this.treeProps.children]);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
collectKeys(this.treeData);
|
|
368
|
+
this.defaultExpandedKeysInternal = keys;
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
};
|
|
373
|
+
</script>
|
|
374
|
+
|
|
375
|
+
<style scoped>
|
|
376
|
+
.ab-tree-select__reference {
|
|
377
|
+
display: inline-block;
|
|
378
|
+
width: 100%;
|
|
379
|
+
}
|
|
380
|
+
.ab-tree-select__tags-wrapper {
|
|
381
|
+
width: 100%;
|
|
382
|
+
min-height: 38px;
|
|
383
|
+
cursor: pointer;
|
|
384
|
+
display: flex;
|
|
385
|
+
align-items: center;
|
|
386
|
+
justify-content: space-between;
|
|
387
|
+
padding: 0 8px;
|
|
388
|
+
background: #fff;
|
|
389
|
+
border: 1px solid #dcdfe6;
|
|
390
|
+
border-radius: 4px;
|
|
391
|
+
box-sizing: border-box;
|
|
392
|
+
transition: border-color 0.2s;
|
|
393
|
+
}
|
|
394
|
+
.ab-tree-select__tags-wrapper:hover {
|
|
395
|
+
border-color: #c0c4cc;
|
|
396
|
+
}
|
|
397
|
+
.ab-tree-select__tags {
|
|
398
|
+
width: 100%;
|
|
399
|
+
display: flex;
|
|
400
|
+
align-items: center;
|
|
401
|
+
justify-content: space-between;
|
|
402
|
+
flex-wrap: nowrap;
|
|
403
|
+
overflow: hidden;
|
|
404
|
+
flex: 1;
|
|
405
|
+
min-width: 0;
|
|
406
|
+
}
|
|
407
|
+
.ab-tree-select__input {
|
|
408
|
+
width: 100%;
|
|
409
|
+
}
|
|
410
|
+
.ab-tree-select__tag {
|
|
411
|
+
flex-shrink: 0;
|
|
412
|
+
white-space: nowrap;
|
|
413
|
+
overflow: hidden;
|
|
414
|
+
text-overflow: ellipsis;
|
|
415
|
+
max-width: 100%;
|
|
416
|
+
}
|
|
417
|
+
.ab-tree-select__first-tag {
|
|
418
|
+
flex-shrink: 0;
|
|
419
|
+
white-space: nowrap;
|
|
420
|
+
overflow: hidden;
|
|
421
|
+
text-overflow: ellipsis;
|
|
422
|
+
max-width: 180px;
|
|
423
|
+
}
|
|
424
|
+
.ab-tree-select__tag-multiple {
|
|
425
|
+
display: flex;
|
|
426
|
+
align-items: center;
|
|
427
|
+
gap: 4px;
|
|
428
|
+
}
|
|
429
|
+
.ab-tree-select__count-tag {
|
|
430
|
+
flex-shrink: 0;
|
|
431
|
+
cursor: default;
|
|
432
|
+
}
|
|
433
|
+
.ab-tree-select__placeholder {
|
|
434
|
+
color: #c0c4cc;
|
|
435
|
+
font-size: 14px;
|
|
436
|
+
}
|
|
437
|
+
.ab-tree-select__dropdown {
|
|
438
|
+
min-width: 300px;
|
|
439
|
+
}
|
|
440
|
+
.ab-tree-select__filter {
|
|
441
|
+
padding: 8px;
|
|
442
|
+
border-bottom: 1px solid #ebeef5;
|
|
443
|
+
}
|
|
444
|
+
.ab-tree-select__filter-input {
|
|
445
|
+
width: 100%;
|
|
446
|
+
}
|
|
447
|
+
.ab-tree-select__empty {
|
|
448
|
+
padding: 16px;
|
|
449
|
+
text-align: center;
|
|
450
|
+
color: #909399;
|
|
451
|
+
}
|
|
452
|
+
.el-select__caret.is-reverse {
|
|
453
|
+
transform: rotate(180deg);
|
|
454
|
+
transition: transform 0.2s;
|
|
455
|
+
}
|
|
456
|
+
</style>
|