@ctzy-web-client/plugin-component-vue 1.0.27 → 1.0.29
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/es/advance-select/advance-option.mjs +13 -8
- package/es/advance-select/advance-select.mjs +5 -1
- package/es/datatable-settings/datatable-settings.mjs +2 -2
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +15 -3
- package/es/plugins.css +1 -0
- package/lib/advance-select/advance-option.js +12 -7
- package/lib/advance-select/advance-select.js +5 -1
- package/lib/datatable-settings/datatable-settings.js +2 -2
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +15 -3
- package/lib/plugins.css +1 -0
- package/package.json +1 -1
- package/src/advance-select/advance-option.vue +13 -7
- package/src/advance-select/advance-select.vue +8 -1
- package/src/datatable-settings/datatable-settings.vue +4 -2
- package/src/pct-filter-panel/pct-compents/pct-multiple-menu-condition.vue +10 -1
- package/es/utils.css +0 -1
- package/lib/utils.css +0 -1
- /package/es/advance-select/{advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.mjs → advance-option.vue_vue_type_style_index_0_scoped_daae7edd_lang.mjs} +0 -0
- /package/lib/advance-select/{advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.js → advance-option.vue_vue_type_style_index_0_scoped_daae7edd_lang.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import 'element-plus';
|
|
2
|
-
import { getCurrentInstance, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, withModifiers, createCommentVNode, createElementVNode, renderSlot, createVNode, withCtx, createTextVNode, toDisplayString, normalizeStyle, createBlock } from 'vue';
|
|
2
|
+
import { getCurrentInstance, ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, withModifiers, createCommentVNode, createElementVNode, renderSlot, createVNode, withCtx, createTextVNode, toDisplayString, normalizeStyle, createBlock } from 'vue';
|
|
3
3
|
import { useNamespace } from '@ctzy-web-client/web-base-client-vue';
|
|
4
4
|
import { useEvent } from './events-helpers.mjs';
|
|
5
5
|
import { useAdvanceOption } from './use-advance-option.mjs';
|
|
6
6
|
import { pinyin } from 'pinyin-pro';
|
|
7
|
-
import './advance-option.
|
|
7
|
+
import './advance-option.vue_vue_type_style_index_0_scoped_daae7edd_lang.mjs';
|
|
8
8
|
import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
|
|
9
9
|
|
|
10
10
|
// Inject __name helper
|
|
@@ -24,6 +24,10 @@ const _sfc_main = {
|
|
|
24
24
|
},
|
|
25
25
|
value: {
|
|
26
26
|
type: null
|
|
27
|
+
},
|
|
28
|
+
showLetterAvatar: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
27
31
|
}
|
|
28
32
|
},
|
|
29
33
|
expose: ["currentLabel"],
|
|
@@ -34,7 +38,8 @@ const _sfc_main = {
|
|
|
34
38
|
const { advanceSelect, currentLabel, itemSelected, showSelectIcon, source } = useAdvanceOption(props);
|
|
35
39
|
const show = ref(true);
|
|
36
40
|
const clickFlag = ref(true);
|
|
37
|
-
const
|
|
41
|
+
const showLetterAvatarStatus = computed(() => props.showLetterAvatar);
|
|
42
|
+
console.log(showLetterAvatarStatus.value, "\u4E0B\u4E00\u7EA7");
|
|
38
43
|
const contentText = ref();
|
|
39
44
|
expose({ currentLabel });
|
|
40
45
|
const filterOptionClick = () => {
|
|
@@ -85,13 +90,13 @@ const _sfc_main = {
|
|
|
85
90
|
show,
|
|
86
91
|
ns,
|
|
87
92
|
currentLabel,
|
|
88
|
-
showUserName,
|
|
89
93
|
itemSelected,
|
|
90
94
|
showSelectIcon,
|
|
91
95
|
filterOptionClick,
|
|
92
96
|
handleOptionMouseEnter,
|
|
93
97
|
source,
|
|
94
|
-
processLabel
|
|
98
|
+
processLabel,
|
|
99
|
+
showLetterAvatarStatus
|
|
95
100
|
};
|
|
96
101
|
}
|
|
97
102
|
};
|
|
@@ -122,12 +127,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
122
127
|
class: normalizeClass($setup.ns.be("option", "content-label")),
|
|
123
128
|
ref: "contentText"
|
|
124
129
|
}, [
|
|
125
|
-
!$setup.
|
|
130
|
+
!$setup.showLetterAvatarStatus ? (openBlock(), createElementBlock("div", {
|
|
126
131
|
key: 0,
|
|
127
132
|
class: normalizeClass($setup.ns.be("option", "content-label")),
|
|
128
133
|
style: { "width": "178px" }
|
|
129
134
|
}, toDisplayString($setup.currentLabel), 3)) : createCommentVNode("v-if", true),
|
|
130
|
-
$setup.
|
|
135
|
+
$setup.showLetterAvatarStatus ? (openBlock(), createElementBlock("div", {
|
|
131
136
|
key: 1,
|
|
132
137
|
class: normalizeClass($setup.ns.be("option", "content-label")),
|
|
133
138
|
style: { "width": "178px", "display": "flex", "align-items": "center" }
|
|
@@ -155,6 +160,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
155
160
|
}, 8, ["class"])) : createCommentVNode("v-if", true)
|
|
156
161
|
], 2);
|
|
157
162
|
}
|
|
158
|
-
var BwaAdvanceOption = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
163
|
+
var BwaAdvanceOption = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-daae7edd"], ["__file", "advance-option.vue"]]);
|
|
159
164
|
|
|
160
165
|
export { BwaAdvanceOption as default };
|
|
@@ -25,6 +25,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
25
25
|
options: {
|
|
26
26
|
type: Array
|
|
27
27
|
},
|
|
28
|
+
showLetterAvatar: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
28
32
|
modelValue: {
|
|
29
33
|
type: [Array, String, Number, Boolean]
|
|
30
34
|
},
|
|
@@ -90,7 +94,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
90
94
|
const emit = __emit;
|
|
91
95
|
const debounceDelay = useGlobalConfig("debounceDelay", 500);
|
|
92
96
|
const filterPanelItem = inject(filterPanelItemKey, null);
|
|
93
|
-
const { listHeight, width, showSearch, showSelection, multiple, modelValue, borderRadius } = toRefs(props);
|
|
97
|
+
const { listHeight, width, showSearch, showSelection, multiple, modelValue, borderRadius, showLetterAvatar } = toRefs(props);
|
|
94
98
|
const slots = useSlots();
|
|
95
99
|
const ns = useNamespace("advance");
|
|
96
100
|
const states = useAdvanceSelectStates(props);
|
|
@@ -106,7 +106,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
106
106
|
const resetColumns = () => {
|
|
107
107
|
const _dataTable = props.dataTable;
|
|
108
108
|
_dataTable.resetColumnSort();
|
|
109
|
-
|
|
109
|
+
const tableColumns = [...displaySearchedColumns.value, ...hiddenSearchedColumns.value];
|
|
110
|
+
emit("column-visible-change", tableColumns);
|
|
110
111
|
};
|
|
111
112
|
const allSearchedColumns = computed(() => {
|
|
112
113
|
const _search = unref(search);
|
|
@@ -130,7 +131,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
130
131
|
props.dataTable.setDisplayColumns(displayColumns);
|
|
131
132
|
const tableColumns = [...displaySearchedColumns.value, ...hiddenSearchedColumns.value];
|
|
132
133
|
emit("column-visible-change", tableColumns);
|
|
133
|
-
emit("sort-change", sort, displayColumns);
|
|
134
134
|
};
|
|
135
135
|
const scope = getCurrentScope();
|
|
136
136
|
const handleInitCompleted = async () => {
|
|
@@ -56,6 +56,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
56
56
|
type: Boolean,
|
|
57
57
|
default: true
|
|
58
58
|
},
|
|
59
|
+
showLetterAvatar: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
59
63
|
size: {
|
|
60
64
|
type: String,
|
|
61
65
|
default: "small"
|
|
@@ -107,7 +111,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
107
111
|
itfInfo: props.itfInfo || {},
|
|
108
112
|
labelAttr: props.labelAttr || "label",
|
|
109
113
|
valueAttr: props.valueAttr || "value",
|
|
110
|
-
searchAttr: props.searchAttr || "search"
|
|
114
|
+
searchAttr: props.searchAttr || "search",
|
|
115
|
+
showLetterAvatar: props.showLetterAvatar || false
|
|
111
116
|
};
|
|
112
117
|
}
|
|
113
118
|
const searchPlaceholderStr = computed(() => {
|
|
@@ -123,6 +128,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
123
128
|
var _a2, _b;
|
|
124
129
|
return ((_b = (_a2 = column.value) == null ? void 0 : _a2.componentProps) == null ? void 0 : _b.valueAttr) || props.valueProp;
|
|
125
130
|
});
|
|
131
|
+
const showLetterAvatarStatus = computed(() => {
|
|
132
|
+
var _a2, _b;
|
|
133
|
+
return ((_b = (_a2 = column.value) == null ? void 0 : _a2.componentProps) == null ? void 0 : _b.showLetterAvatar) || props.showLetterAvatar;
|
|
134
|
+
});
|
|
135
|
+
console.log(showLetterAvatarStatus.value, "\u6253\u5370\u4F20\u503C");
|
|
126
136
|
const handleClose = (val) => {
|
|
127
137
|
const currentModelValue = Array.isArray(modelValue.value) ? modelValue.value : [];
|
|
128
138
|
modelValue.value = currentModelValue.filter(
|
|
@@ -202,6 +212,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
202
212
|
class: normalizeClass(unref(ns).e("title"))
|
|
203
213
|
}, toDisplayString(column.value.title), 3)) : createCommentVNode("v-if", true),
|
|
204
214
|
createVNode(BwaAdvanceSelect, {
|
|
215
|
+
showLetterAvatar: showLetterAvatarStatus.value,
|
|
205
216
|
multiple: __props.multiple,
|
|
206
217
|
modelValue: modelValue.value,
|
|
207
218
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => modelValue.value = $event),
|
|
@@ -369,13 +380,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
369
380
|
key: item[valuePropStr.value] + "",
|
|
370
381
|
value: item[valuePropStr.value] + "",
|
|
371
382
|
label: item[labelPropStr.value] + "",
|
|
383
|
+
showLetterAvatar: showLetterAvatarStatus.value,
|
|
372
384
|
class: normalizeClass(unref(ns).be("filter", "option"))
|
|
373
|
-
}, null, 8, ["value", "label", "class"]);
|
|
385
|
+
}, null, 8, ["value", "label", "showLetterAvatar", "class"]);
|
|
374
386
|
}), 128))
|
|
375
387
|
])
|
|
376
388
|
]),
|
|
377
389
|
_: 3
|
|
378
|
-
}, 8, ["multiple", "modelValue", "class", "showSelectIcon", "loading", "width"])
|
|
390
|
+
}, 8, ["showLetterAvatar", "multiple", "modelValue", "class", "showSelectIcon", "loading", "width"])
|
|
379
391
|
], 2);
|
|
380
392
|
};
|
|
381
393
|
}
|
package/es/plugins.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.letter-circle[data-v-daae7edd]{align-items:center;border-radius:50%;color:#fff;display:flex;font-size:14px;height:24px;justify-content:center;margin-right:8px;width:24px}
|
|
@@ -8,7 +8,7 @@ var webBaseClientVue = require('@ctzy-web-client/web-base-client-vue');
|
|
|
8
8
|
var eventsHelpers = require('./events-helpers.js');
|
|
9
9
|
var useAdvanceOption = require('./use-advance-option.js');
|
|
10
10
|
var pinyinPro = require('pinyin-pro');
|
|
11
|
-
require('./advance-option.
|
|
11
|
+
require('./advance-option.vue_vue_type_style_index_0_scoped_daae7edd_lang.js');
|
|
12
12
|
var _pluginVue_exportHelper = require('../_virtual/_plugin-vue_export-helper.js');
|
|
13
13
|
|
|
14
14
|
// Inject __name helper
|
|
@@ -28,6 +28,10 @@ const _sfc_main = {
|
|
|
28
28
|
},
|
|
29
29
|
value: {
|
|
30
30
|
type: null
|
|
31
|
+
},
|
|
32
|
+
showLetterAvatar: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
31
35
|
}
|
|
32
36
|
},
|
|
33
37
|
expose: ["currentLabel"],
|
|
@@ -38,7 +42,8 @@ const _sfc_main = {
|
|
|
38
42
|
const { advanceSelect, currentLabel, itemSelected, showSelectIcon, source } = useAdvanceOption.useAdvanceOption(props);
|
|
39
43
|
const show = vue.ref(true);
|
|
40
44
|
const clickFlag = vue.ref(true);
|
|
41
|
-
const
|
|
45
|
+
const showLetterAvatarStatus = vue.computed(() => props.showLetterAvatar);
|
|
46
|
+
console.log(showLetterAvatarStatus.value, "\u4E0B\u4E00\u7EA7");
|
|
42
47
|
const contentText = vue.ref();
|
|
43
48
|
expose({ currentLabel });
|
|
44
49
|
const filterOptionClick = () => {
|
|
@@ -89,13 +94,13 @@ const _sfc_main = {
|
|
|
89
94
|
show,
|
|
90
95
|
ns,
|
|
91
96
|
currentLabel,
|
|
92
|
-
showUserName,
|
|
93
97
|
itemSelected,
|
|
94
98
|
showSelectIcon,
|
|
95
99
|
filterOptionClick,
|
|
96
100
|
handleOptionMouseEnter,
|
|
97
101
|
source,
|
|
98
|
-
processLabel
|
|
102
|
+
processLabel,
|
|
103
|
+
showLetterAvatarStatus
|
|
99
104
|
};
|
|
100
105
|
}
|
|
101
106
|
};
|
|
@@ -126,12 +131,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
126
131
|
class: vue.normalizeClass($setup.ns.be("option", "content-label")),
|
|
127
132
|
ref: "contentText"
|
|
128
133
|
}, [
|
|
129
|
-
!$setup.
|
|
134
|
+
!$setup.showLetterAvatarStatus ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
130
135
|
key: 0,
|
|
131
136
|
class: vue.normalizeClass($setup.ns.be("option", "content-label")),
|
|
132
137
|
style: { "width": "178px" }
|
|
133
138
|
}, vue.toDisplayString($setup.currentLabel), 3)) : vue.createCommentVNode("v-if", true),
|
|
134
|
-
$setup.
|
|
139
|
+
$setup.showLetterAvatarStatus ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
135
140
|
key: 1,
|
|
136
141
|
class: vue.normalizeClass($setup.ns.be("option", "content-label")),
|
|
137
142
|
style: { "width": "178px", "display": "flex", "align-items": "center" }
|
|
@@ -159,6 +164,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
159
164
|
}, 8, ["class"])) : vue.createCommentVNode("v-if", true)
|
|
160
165
|
], 2);
|
|
161
166
|
}
|
|
162
|
-
var BwaAdvanceOption = /* @__PURE__ */ _pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
167
|
+
var BwaAdvanceOption = /* @__PURE__ */ _pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-daae7edd"], ["__file", "advance-option.vue"]]);
|
|
163
168
|
|
|
164
169
|
exports["default"] = BwaAdvanceOption;
|
|
@@ -29,6 +29,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
29
29
|
options: {
|
|
30
30
|
type: Array
|
|
31
31
|
},
|
|
32
|
+
showLetterAvatar: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
},
|
|
32
36
|
modelValue: {
|
|
33
37
|
type: [Array, String, Number, Boolean]
|
|
34
38
|
},
|
|
@@ -94,7 +98,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
94
98
|
const emit = __emit;
|
|
95
99
|
const debounceDelay = webBaseClientVue.useGlobalConfig("debounceDelay", 500);
|
|
96
100
|
const filterPanelItem = vue.inject(webBaseClientVue.filterPanelItemKey, null);
|
|
97
|
-
const { listHeight, width, showSearch, showSelection, multiple, modelValue, borderRadius } = vue.toRefs(props);
|
|
101
|
+
const { listHeight, width, showSearch, showSelection, multiple, modelValue, borderRadius, showLetterAvatar } = vue.toRefs(props);
|
|
98
102
|
const slots = vue.useSlots();
|
|
99
103
|
const ns = webBaseClientVue.useNamespace("advance");
|
|
100
104
|
const states = useAdvanceSelect.useAdvanceSelectStates(props);
|
|
@@ -110,7 +110,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
110
110
|
const resetColumns = () => {
|
|
111
111
|
const _dataTable = props.dataTable;
|
|
112
112
|
_dataTable.resetColumnSort();
|
|
113
|
-
|
|
113
|
+
const tableColumns = [...displaySearchedColumns.value, ...hiddenSearchedColumns.value];
|
|
114
|
+
emit("column-visible-change", tableColumns);
|
|
114
115
|
};
|
|
115
116
|
const allSearchedColumns = vue.computed(() => {
|
|
116
117
|
const _search = vue.unref(search);
|
|
@@ -134,7 +135,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
134
135
|
props.dataTable.setDisplayColumns(displayColumns);
|
|
135
136
|
const tableColumns = [...displaySearchedColumns.value, ...hiddenSearchedColumns.value];
|
|
136
137
|
emit("column-visible-change", tableColumns);
|
|
137
|
-
emit("sort-change", sort, displayColumns);
|
|
138
138
|
};
|
|
139
139
|
const scope = vue.getCurrentScope();
|
|
140
140
|
const handleInitCompleted = async () => {
|
|
@@ -60,6 +60,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
60
60
|
type: Boolean,
|
|
61
61
|
default: true
|
|
62
62
|
},
|
|
63
|
+
showLetterAvatar: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
63
67
|
size: {
|
|
64
68
|
type: String,
|
|
65
69
|
default: "small"
|
|
@@ -111,7 +115,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
111
115
|
itfInfo: props.itfInfo || {},
|
|
112
116
|
labelAttr: props.labelAttr || "label",
|
|
113
117
|
valueAttr: props.valueAttr || "value",
|
|
114
|
-
searchAttr: props.searchAttr || "search"
|
|
118
|
+
searchAttr: props.searchAttr || "search",
|
|
119
|
+
showLetterAvatar: props.showLetterAvatar || false
|
|
115
120
|
};
|
|
116
121
|
}
|
|
117
122
|
const searchPlaceholderStr = vue.computed(() => {
|
|
@@ -127,6 +132,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
127
132
|
var _a2, _b;
|
|
128
133
|
return ((_b = (_a2 = column.value) == null ? void 0 : _a2.componentProps) == null ? void 0 : _b.valueAttr) || props.valueProp;
|
|
129
134
|
});
|
|
135
|
+
const showLetterAvatarStatus = vue.computed(() => {
|
|
136
|
+
var _a2, _b;
|
|
137
|
+
return ((_b = (_a2 = column.value) == null ? void 0 : _a2.componentProps) == null ? void 0 : _b.showLetterAvatar) || props.showLetterAvatar;
|
|
138
|
+
});
|
|
139
|
+
console.log(showLetterAvatarStatus.value, "\u6253\u5370\u4F20\u503C");
|
|
130
140
|
const handleClose = (val) => {
|
|
131
141
|
const currentModelValue = Array.isArray(modelValue.value) ? modelValue.value : [];
|
|
132
142
|
modelValue.value = currentModelValue.filter(
|
|
@@ -206,6 +216,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
206
216
|
class: vue.normalizeClass(vue.unref(ns).e("title"))
|
|
207
217
|
}, vue.toDisplayString(column.value.title), 3)) : vue.createCommentVNode("v-if", true),
|
|
208
218
|
vue.createVNode(advanceSelect["default"], {
|
|
219
|
+
showLetterAvatar: showLetterAvatarStatus.value,
|
|
209
220
|
multiple: __props.multiple,
|
|
210
221
|
modelValue: modelValue.value,
|
|
211
222
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => modelValue.value = $event),
|
|
@@ -373,13 +384,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
373
384
|
key: item[valuePropStr.value] + "",
|
|
374
385
|
value: item[valuePropStr.value] + "",
|
|
375
386
|
label: item[labelPropStr.value] + "",
|
|
387
|
+
showLetterAvatar: showLetterAvatarStatus.value,
|
|
376
388
|
class: vue.normalizeClass(vue.unref(ns).be("filter", "option"))
|
|
377
|
-
}, null, 8, ["value", "label", "class"]);
|
|
389
|
+
}, null, 8, ["value", "label", "showLetterAvatar", "class"]);
|
|
378
390
|
}), 128))
|
|
379
391
|
])
|
|
380
392
|
]),
|
|
381
393
|
_: 3
|
|
382
|
-
}, 8, ["multiple", "modelValue", "class", "showSelectIcon", "loading", "width"])
|
|
394
|
+
}, 8, ["showLetterAvatar", "multiple", "modelValue", "class", "showSelectIcon", "loading", "width"])
|
|
383
395
|
], 2);
|
|
384
396
|
};
|
|
385
397
|
}
|
package/lib/plugins.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.letter-circle[data-v-daae7edd]{align-items:center;border-radius:50%;color:#fff;display:flex;font-size:14px;height:24px;justify-content:center;margin-right:8px;width:24px}
|
package/package.json
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<ElTooltip placement="top" append-to=".bwa-application" :disabled="currentLabel.length < 16">
|
|
7
7
|
<div :class="ns.be('option', 'content-label')" ref="contentText">
|
|
8
8
|
|
|
9
|
-
<div v-if="!
|
|
10
|
-
<div v-if="
|
|
9
|
+
<div v-if="!showLetterAvatarStatus" :class="ns.be('option', 'content-label')" style="width: 178px">{{ currentLabel }}</div>
|
|
10
|
+
<div v-if="showLetterAvatarStatus" :class="ns.be('option', 'content-label')" style="width: 178px;display: flex;align-items: center;" >
|
|
11
11
|
<div class="letter-circle" :style="{ backgroundColor: (processLabel(currentLabel).color) }">
|
|
12
12
|
{{ processLabel(currentLabel).firstLetter }}
|
|
13
13
|
</div>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
<script>
|
|
33
33
|
import { ElTooltip } from 'element-plus';
|
|
34
|
-
import { getCurrentInstance, toRefs, ref, nextTick, onMounted, onUnmounted } from 'vue';
|
|
34
|
+
import { getCurrentInstance, toRefs, ref, nextTick, onMounted, onUnmounted,computed } from 'vue';
|
|
35
35
|
import { useNamespace } from '@ctzy-web-client/web-base-client-vue';
|
|
36
36
|
import { useEvent } from './events-helpers';
|
|
37
37
|
import { useAdvanceOption } from './use-advance-option';
|
|
@@ -45,6 +45,10 @@ export default {
|
|
|
45
45
|
value: {
|
|
46
46
|
type: null,
|
|
47
47
|
},
|
|
48
|
+
showLetterAvatar:{
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false,
|
|
51
|
+
}
|
|
48
52
|
},
|
|
49
53
|
expose: ['currentLabel'],
|
|
50
54
|
setup(props, { expose }) {
|
|
@@ -59,8 +63,9 @@ export default {
|
|
|
59
63
|
|
|
60
64
|
const show = ref(true)
|
|
61
65
|
const clickFlag = ref(true)
|
|
62
|
-
const
|
|
63
|
-
|
|
66
|
+
const showLetterAvatarStatus = computed(() => props.showLetterAvatar);
|
|
67
|
+
|
|
68
|
+
console.log(showLetterAvatarStatus.value,'下一级')
|
|
64
69
|
const contentText = ref()
|
|
65
70
|
|
|
66
71
|
expose({ currentLabel });
|
|
@@ -139,13 +144,14 @@ function processLabel(label) {
|
|
|
139
144
|
show,
|
|
140
145
|
ns,
|
|
141
146
|
currentLabel,
|
|
142
|
-
|
|
147
|
+
|
|
143
148
|
itemSelected,
|
|
144
149
|
showSelectIcon,
|
|
145
150
|
filterOptionClick,
|
|
146
151
|
handleOptionMouseEnter,
|
|
147
152
|
source,
|
|
148
|
-
processLabel
|
|
153
|
+
processLabel,
|
|
154
|
+
showLetterAvatarStatus
|
|
149
155
|
};
|
|
150
156
|
},
|
|
151
157
|
};
|
|
@@ -138,6 +138,7 @@
|
|
|
138
138
|
:key="item.value"
|
|
139
139
|
:value="item.value"
|
|
140
140
|
:label="item.label"
|
|
141
|
+
|
|
141
142
|
/>
|
|
142
143
|
</slot>
|
|
143
144
|
</ElScrollbar>
|
|
@@ -193,6 +194,10 @@ const props = defineProps({
|
|
|
193
194
|
options: {
|
|
194
195
|
type: Array,
|
|
195
196
|
},
|
|
197
|
+
showLetterAvatar:{
|
|
198
|
+
type: Boolean,
|
|
199
|
+
default: false,
|
|
200
|
+
},
|
|
196
201
|
modelValue: {
|
|
197
202
|
type: [Array, String, Number, Boolean],
|
|
198
203
|
},
|
|
@@ -208,6 +213,7 @@ const props = defineProps({
|
|
|
208
213
|
type: Boolean,
|
|
209
214
|
default: true,
|
|
210
215
|
},
|
|
216
|
+
|
|
211
217
|
multipleLimit: {
|
|
212
218
|
type: Number,
|
|
213
219
|
default: 0,
|
|
@@ -258,7 +264,7 @@ const debounceDelay = useGlobalConfig('debounceDelay', 500);
|
|
|
258
264
|
|
|
259
265
|
const filterPanelItem = inject(filterPanelItemKey, null);
|
|
260
266
|
|
|
261
|
-
const { listHeight, width, showSearch, showSelection, multiple, modelValue, borderRadius } =
|
|
267
|
+
const { listHeight, width, showSearch, showSelection, multiple, modelValue, borderRadius,showLetterAvatar } =
|
|
262
268
|
toRefs(props);
|
|
263
269
|
|
|
264
270
|
const slots = useSlots();
|
|
@@ -273,6 +279,7 @@ const {
|
|
|
273
279
|
search,
|
|
274
280
|
isShowPopper,
|
|
275
281
|
selected,
|
|
282
|
+
|
|
276
283
|
} = toRefs(states);
|
|
277
284
|
|
|
278
285
|
const column = computed(() => filterPanelItem?.column ?? null);
|
|
@@ -270,7 +270,9 @@ const resetColumns = () => {
|
|
|
270
270
|
const _dataTable = props.dataTable;
|
|
271
271
|
|
|
272
272
|
_dataTable.resetColumnSort();
|
|
273
|
-
|
|
273
|
+
const tableColumns = [...displaySearchedColumns.value,...hiddenSearchedColumns.value ]
|
|
274
|
+
emit('column-visible-change', tableColumns);
|
|
275
|
+
// emit('reset-columns');
|
|
274
276
|
};
|
|
275
277
|
|
|
276
278
|
const allSearchedColumns = computed(() => {
|
|
@@ -302,7 +304,7 @@ const handleSortChange = (sort) => {
|
|
|
302
304
|
props.dataTable.setDisplayColumns(displayColumns);
|
|
303
305
|
const tableColumns = [...displaySearchedColumns.value,...hiddenSearchedColumns.value ]
|
|
304
306
|
emit('column-visible-change', tableColumns);
|
|
305
|
-
emit('sort-change', sort, displayColumns);
|
|
307
|
+
// emit('sort-change', sort, displayColumns);
|
|
306
308
|
};
|
|
307
309
|
|
|
308
310
|
const scope = getCurrentScope();
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<div :class="ns.e('conditbox')">
|
|
3
3
|
<div v-if="showTitle" :class="ns.e('title')">{{column.title}}</div>
|
|
4
4
|
<BwaAdvanceSelect
|
|
5
|
+
:showLetterAvatar="showLetterAvatarStatus"
|
|
5
6
|
:multiple="multiple"
|
|
6
7
|
v-model="modelValue"
|
|
7
8
|
@search="handleFieldSearch"
|
|
@@ -90,6 +91,7 @@
|
|
|
90
91
|
:key="item[valuePropStr] + ''"
|
|
91
92
|
:value="item[valuePropStr] + ''"
|
|
92
93
|
:label="item[labelPropStr] + ''"
|
|
94
|
+
:showLetterAvatar="showLetterAvatarStatus"
|
|
93
95
|
:class="ns.be('filter', 'option')"
|
|
94
96
|
>
|
|
95
97
|
</BwaAdvanceOption>
|
|
@@ -156,6 +158,10 @@ const props = defineProps({
|
|
|
156
158
|
type: Boolean,
|
|
157
159
|
default: true,
|
|
158
160
|
},
|
|
161
|
+
showLetterAvatar: {
|
|
162
|
+
type: Boolean,
|
|
163
|
+
default: false,
|
|
164
|
+
},
|
|
159
165
|
size: {
|
|
160
166
|
type: String,
|
|
161
167
|
default: 'small',
|
|
@@ -205,7 +211,8 @@ if (props.itfInfo) {
|
|
|
205
211
|
itfInfo: props.itfInfo || {},
|
|
206
212
|
labelAttr: props.labelAttr || 'label',
|
|
207
213
|
valueAttr: props.valueAttr || 'value',
|
|
208
|
-
searchAttr: props.searchAttr || 'search'
|
|
214
|
+
searchAttr: props.searchAttr || 'search',
|
|
215
|
+
showLetterAvatar:props.showLetterAvatar || false
|
|
209
216
|
}
|
|
210
217
|
}
|
|
211
218
|
|
|
@@ -214,6 +221,8 @@ const placeholderStr = computed(() => showTitle.value ? props.placeholder : colu
|
|
|
214
221
|
|
|
215
222
|
const labelPropStr = computed(() => column.value?.componentProps?.labelAttr || props.labelProp)
|
|
216
223
|
const valuePropStr = computed(() => column.value?.componentProps?.valueAttr || props.valueProp)
|
|
224
|
+
const showLetterAvatarStatus = computed(() => column.value?.componentProps?.showLetterAvatar || props.showLetterAvatar)
|
|
225
|
+
console.log(showLetterAvatarStatus.value,'打印传值')
|
|
217
226
|
const handleClose = (val)=>{
|
|
218
227
|
|
|
219
228
|
// 优化后
|
package/es/utils.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.letter-circle[data-v-bc8f5626]{align-items:center;border-radius:50%;color:#fff;display:flex;font-size:14px;height:24px;justify-content:center;margin-right:8px;width:24px}
|
package/lib/utils.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.letter-circle[data-v-bc8f5626]{align-items:center;border-radius:50%;color:#fff;display:flex;font-size:14px;height:24px;justify-content:center;margin-right:8px;width:24px}
|
|
File without changes
|