@ctzy-web-client/plugin-component-vue 1.0.23 → 1.0.25

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.
Files changed (131) hide show
  1. package/es/advance-select/advance-operation.mjs +51 -37
  2. package/es/advance-select/advance-option.mjs +167 -97
  3. package/es/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.mjs +7 -0
  4. package/es/advance-select/advance-select.mjs +368 -310
  5. package/es/advance-select/index.mjs +5 -5
  6. package/es/application-slot/breadcrumb-item.mjs +20 -17
  7. package/es/application-slot/header-tools-item.mjs +20 -17
  8. package/es/breadcrumb-select/breadcrumb-select.mjs +134 -112
  9. package/es/contextmenu/contextmenu-item.mjs +19 -15
  10. package/es/contextmenu/contextmenu.mjs +72 -56
  11. package/es/data-form/data-form-item.mjs +48 -30
  12. package/es/data-form/data-form.mjs +213 -166
  13. package/es/data-form/form-components/bwa-date-picker.mjs +51 -39
  14. package/es/data-form/form-components/bwa-date-time-picker.mjs +56 -44
  15. package/es/data-form/form-components/bwa-input-float.mjs +48 -37
  16. package/es/data-form/form-components/bwa-input-integer.mjs +68 -50
  17. package/es/data-form/form-components/bwa-input.mjs +43 -32
  18. package/es/data-form/form-components/bwa-multi-select.mjs +40 -29
  19. package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +554 -218
  20. package/es/data-form/form-components/bwa-rich-text.mjs +404 -316
  21. package/es/data-form/form-components/bwa-select.mjs +84 -70
  22. package/es/data-form/form-components/bwa-textarea.mjs +38 -27
  23. package/es/data-form/form-components/bwa-upload.mjs +172 -148
  24. package/es/data-form/form-components/bwa-user-multi-select.mjs +35 -24
  25. package/es/data-form/form-components/bwa-user-select.mjs +86 -61
  26. package/es/data-table/data-column-view.mjs +146 -115
  27. package/es/data-table/data-table-card.mjs +48 -40
  28. package/es/data-table/data-table-column.mjs +58 -45
  29. package/es/data-table/data-table.mjs +402 -316
  30. package/es/datatable-settings/datatable-settings.mjs +329 -254
  31. package/es/date-range/date-picker.mjs +130 -116
  32. package/es/date-range/date-range.mjs +215 -161
  33. package/es/drag-list/drag-item.mjs +56 -42
  34. package/es/drag-list/drag-list.mjs +60 -47
  35. package/es/dragable/dragable-item.mjs +23 -18
  36. package/es/dragable/dragable-operation.mjs +32 -24
  37. package/es/dragable/dragable.mjs +32 -23
  38. package/es/filter-panel/conditions/date-range-condition.mjs +50 -40
  39. package/es/filter-panel/conditions/department-condition/department-condition.mjs +99 -72
  40. package/es/filter-panel/conditions/department-condition/department-node.mjs +73 -59
  41. package/es/filter-panel/conditions/input-condition.mjs +90 -76
  42. package/es/filter-panel/conditions/multi-user-condition.mjs +67 -57
  43. package/es/filter-panel/conditions/multiple-menu-condition.mjs +54 -35
  44. package/es/filter-panel/conditions/single-menu-condition.mjs +65 -60
  45. package/es/filter-panel/conditions/single-user-condition.mjs +67 -57
  46. package/es/filter-panel/filter-panel-item.mjs +54 -39
  47. package/es/filter-panel/filter-panel.mjs +153 -135
  48. package/es/layout/layout.mjs +85 -78
  49. package/es/menu/menu-item.mjs +67 -52
  50. package/es/menu/menu.mjs +70 -53
  51. package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +28 -0
  52. package/es/panel/panel.mjs +53 -40
  53. package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +74 -63
  54. package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +76 -67
  55. package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +406 -178
  56. package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +153 -138
  57. package/es/pct-filter-panel/pct-filter-panel-item.mjs +55 -40
  58. package/es/pct-filter-panel/pct-filter-panel.mjs +247 -227
  59. package/es/progress/progress-item.mjs +81 -61
  60. package/es/progress/progress.mjs +78 -64
  61. package/es/where-filter-panel/where-filter-panel.mjs +15 -12
  62. package/lib/advance-select/advance-operation.js +50 -36
  63. package/lib/advance-select/advance-option.js +166 -96
  64. package/lib/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.js +12 -0
  65. package/lib/advance-select/advance-select.js +366 -308
  66. package/lib/application-slot/breadcrumb-item.js +19 -16
  67. package/lib/application-slot/header-tools-item.js +19 -16
  68. package/lib/breadcrumb-select/breadcrumb-select.js +133 -111
  69. package/lib/contextmenu/contextmenu-item.js +18 -14
  70. package/lib/contextmenu/contextmenu.js +71 -55
  71. package/lib/data-form/data-form-item.js +47 -29
  72. package/lib/data-form/data-form.js +212 -165
  73. package/lib/data-form/form-components/bwa-date-picker.js +50 -38
  74. package/lib/data-form/form-components/bwa-date-time-picker.js +55 -43
  75. package/lib/data-form/form-components/bwa-input-float.js +47 -36
  76. package/lib/data-form/form-components/bwa-input-integer.js +67 -49
  77. package/lib/data-form/form-components/bwa-input.js +42 -31
  78. package/lib/data-form/form-components/bwa-multi-select.js +39 -28
  79. package/lib/data-form/form-components/bwa-rich-text-tinymce.js +553 -217
  80. package/lib/data-form/form-components/bwa-rich-text.js +403 -315
  81. package/lib/data-form/form-components/bwa-select.js +83 -69
  82. package/lib/data-form/form-components/bwa-textarea.js +37 -26
  83. package/lib/data-form/form-components/bwa-upload.js +171 -147
  84. package/lib/data-form/form-components/bwa-user-multi-select.js +34 -23
  85. package/lib/data-form/form-components/bwa-user-select.js +85 -60
  86. package/lib/data-table/data-column-view.js +146 -115
  87. package/lib/data-table/data-table-card.js +48 -40
  88. package/lib/data-table/data-table-column.js +57 -44
  89. package/lib/data-table/data-table.js +401 -315
  90. package/lib/datatable-settings/datatable-settings.js +328 -253
  91. package/lib/date-range/date-picker.js +129 -115
  92. package/lib/date-range/date-range.js +214 -160
  93. package/lib/drag-list/drag-item.js +55 -41
  94. package/lib/drag-list/drag-list.js +59 -46
  95. package/lib/dragable/dragable-item.js +22 -17
  96. package/lib/dragable/dragable-operation.js +31 -23
  97. package/lib/dragable/dragable.js +31 -22
  98. package/lib/filter-panel/conditions/date-range-condition.js +49 -39
  99. package/lib/filter-panel/conditions/department-condition/department-condition.js +98 -71
  100. package/lib/filter-panel/conditions/department-condition/department-node.js +72 -58
  101. package/lib/filter-panel/conditions/input-condition.js +89 -75
  102. package/lib/filter-panel/conditions/multi-user-condition.js +66 -56
  103. package/lib/filter-panel/conditions/multiple-menu-condition.js +53 -34
  104. package/lib/filter-panel/conditions/single-menu-condition.js +64 -59
  105. package/lib/filter-panel/conditions/single-user-condition.js +66 -56
  106. package/lib/filter-panel/filter-panel-item.js +53 -38
  107. package/lib/filter-panel/filter-panel.js +152 -134
  108. package/lib/layout/layout.js +84 -77
  109. package/lib/menu/menu-item.js +66 -51
  110. package/lib/menu/menu.js +69 -52
  111. package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +32 -0
  112. package/lib/panel/panel.js +52 -39
  113. package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +73 -62
  114. package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +75 -66
  115. package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +405 -177
  116. package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +152 -137
  117. package/lib/pct-filter-panel/pct-filter-panel-item.js +54 -39
  118. package/lib/pct-filter-panel/pct-filter-panel.js +246 -226
  119. package/lib/progress/progress-item.js +80 -60
  120. package/lib/progress/progress.js +77 -63
  121. package/lib/where-filter-panel/where-filter-panel.js +14 -11
  122. package/package.json +2 -1
  123. package/src/advance-select/advance-option.vue +64 -13
  124. package/src/data-form/form-components/bwa-rich-text-tinymce.vue +1 -1
  125. package/src/datatable-settings/datatable-settings.vue +33 -3
  126. package/src/date-range/date-picker.vue +1 -1
  127. package/src/filter-panel/filter-panel.vue +2 -2
  128. package/src/pct-filter-panel/pct-compents/pct-Input-condition.vue +64 -64
  129. package/src/pct-filter-panel/pct-compents/pct-date-range-condition.vue +61 -61
  130. package/src/pct-filter-panel/pct-compents/pct-multiple-menu-condition.vue +302 -178
  131. package/src/pct-filter-panel/pct-filter-panel.vue +4 -4
@@ -1,186 +1,414 @@
1
- import { defineComponent, ref, useAttrs, computed, inject, unref, resolveComponent, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createVNode, isRef, withCtx, Fragment, renderList, createBlock } from 'vue';
1
+ import { ref, onMounted, nextTick, useAttrs, computed, inject, unref, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createVNode, isRef, withCtx, createTextVNode, createElementVNode, Fragment, renderList, createBlock, withModifiers, renderSlot } from 'vue';
2
+ import { ElTooltip, ElTag, ElIcon, ElInput } from 'element-plus';
3
+ import { ArrowUp, ArrowDown } from '@element-plus/icons';
2
4
  import { useService, HttpRequest, useNamespace, filterPanelItemKey } from '@ctzy-web-client/web-base-client-vue';
3
5
  import { dataProps } from '../../hooks/use-data/index.mjs';
6
+ import BwaAdvanceSelect from '../../advance-select/advance-select.mjs';
7
+ import BwaAdvanceOption from '../../advance-select/advance-option.mjs';
4
8
  import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
5
9
 
6
- const __default__ = defineComponent({
7
- name: "BwaPctMultipleMenuCondition",
8
- __conditionTitle__: "\u591A\u9009\u5217\u8868",
9
- __conditionDefault__: () => []
10
- });
11
- const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
12
- props: {
13
- ...dataProps,
14
- modelValue: {
15
- type: null
16
- },
17
- options: {
18
- type: Array,
19
- default: () => []
20
- },
21
- labelProp: {
22
- type: String,
23
- default: "label"
24
- },
25
- valueProp: {
26
- type: String,
27
- default: "value"
28
- },
29
- multiple: {
30
- type: Boolean,
31
- default: true
32
- },
33
- showSearch: {
34
- type: Boolean,
35
- default: true
36
- },
37
- placeholder: {
38
- type: String,
39
- default: "\u8BF7\u9009\u62E9"
40
- },
41
- remote: {
42
- type: Boolean,
43
- default: true
44
- },
45
- size: {
46
- type: String,
47
- default: "small"
48
- },
49
- searchPlaceholder: {
50
- type: String,
51
- default: ""
52
- },
53
- labelAttr: "",
54
- valueAttr: "",
55
- searchAttr: "",
56
- itfInfo: null,
57
- isRequiredByVisibleChange: {
58
- type: Boolean,
59
- default: false
60
- }
61
- },
62
- emits: ["update:modelValue", "search"],
10
+ const _hoisted_1 = { key: 0 };
11
+
12
+
13
+ const _sfc_main = {
14
+ __name: 'pct-multiple-menu-condition',
15
+ props: {
16
+ ...dataProps,
17
+ modelValue: {
18
+ type: null,
19
+ },
20
+ options: {
21
+ type: Array,
22
+ default: () => [],
23
+ },
24
+ labelProp: {
25
+ type: String,
26
+ default: 'label',
27
+ },
28
+ valueProp: {
29
+ type: String,
30
+ default: 'value',
31
+ },
32
+ multiple: {
33
+ type: Boolean,
34
+ default: true,
35
+ },
36
+ showSearch: {
37
+ type: Boolean,
38
+ default: true,
39
+ },
40
+ placeholder: {
41
+ type: String,
42
+ default: '请选择',
43
+ },
44
+ remote: {
45
+ type: Boolean,
46
+ default: true,
47
+ },
48
+ size: {
49
+ type: String,
50
+ default: 'small',
51
+ },
52
+ searchPlaceholder: {
53
+ type: String,
54
+ default: '',
55
+ },
56
+ labelAttr: '',
57
+ valueAttr: '',
58
+ searchAttr: '',
59
+ itfInfo: null,
60
+ // 自定义选项时 是否通过展开自动触发自定义search
61
+ isRequiredByVisibleChange: {
62
+ type: Boolean,
63
+ default: false,
64
+ },
65
+ },
66
+ emits: ['update:modelValue', 'search'],
63
67
  setup(__props, { expose, emit }) {
64
- var _a;
65
- const props = __props;
66
- const httpRequest = useService(HttpRequest);
67
- ;
68
- const ns = useNamespace("pctfilterpanel-item");
69
- const isShowPopper = ref(false);
70
- const attrs = useAttrs();
71
- const showTitle = computed(() => attrs.showTitle);
72
- const data = ref([]);
73
- const loading = ref(false);
74
- const filterPanelItem = inject(filterPanelItemKey, null);
75
- const column = computed(() => {
76
- var _a2;
77
- return (_a2 = filterPanelItem == null ? void 0 : filterPanelItem.column) != null ? _a2 : null;
78
- });
79
- if (props.itfInfo) {
80
- column.value.componentProps = {
81
- itfInfo: props.itfInfo || {},
82
- labelAttr: props.labelAttr || "label",
83
- valueAttr: props.valueAttr || "value",
84
- searchAttr: props.searchAttr || "search"
85
- };
86
- }
87
- const searchPlaceholderStr = computed(() => {
88
- var _a2, _b;
89
- return ((_b = (_a2 = column.value) == null ? void 0 : _a2.componentProps) == null ? void 0 : _b.searchPlaceholder) || props.searchPlaceholder;
90
- });
91
- const placeholderStr = computed(() => showTitle.value ? props.placeholder : column.value.title);
92
- const labelPropStr = computed(() => {
93
- var _a2, _b;
94
- return ((_b = (_a2 = column.value) == null ? void 0 : _a2.componentProps) == null ? void 0 : _b.labelAttr) || props.labelProp;
95
- });
96
- const valuePropStr = computed(() => {
97
- var _a2, _b;
98
- return ((_b = (_a2 = column.value) == null ? void 0 : _a2.componentProps) == null ? void 0 : _b.valueAttr) || props.valueProp;
99
- });
100
- const getData = async (query) => {
101
- var _a2;
102
- loading.value = true;
103
- const { itfInfo, searchAttr } = column.value.componentProps;
104
- const { url, method, options, params } = {
105
- url: unref(itfInfo).url,
106
- method: unref(itfInfo).method || "POST",
107
- options: unref(itfInfo).options || {},
108
- params: { ...unref(itfInfo).params, [searchAttr]: query || "" }
109
- };
110
- data.value = (_a2 = await unref(httpRequest)[method.toLowerCase()](url, params, options)) == null ? void 0 : _a2.data;
111
- loading.value = false;
112
- };
113
- data.value = (_a = props.options) != null ? _a : [];
114
- const visibleChange = (val) => {
115
- var _a2, _b;
116
- isShowPopper.value = val;
117
- if (!val || !column.value.componentProps || ((_b = (_a2 = column.value) == null ? void 0 : _a2.componentProps) == null ? void 0 : _b.options)) {
118
- if (isShowPopper.value && props.isRequiredByVisibleChange) {
119
- emit("search", "");
120
- }
121
- return;
122
- }
123
- getData();
124
- };
125
- const remoteMethod = (query) => {
126
- if (column.value.componentProps) {
127
- getData(query);
128
- } else {
129
- emit("search", query);
130
- }
131
- };
132
- const modelValue = computed({
133
- get: () => {
134
- if (props.multiple) {
135
- return Array.isArray(props.modelValue) ? props.modelValue.map((item) => item) : [];
136
- } else {
137
- return props.modelValue == null || Array.isArray(props.modelValue) ? "" : props.modelValue;
138
- }
139
- },
140
- set: (v) => emit("update:modelValue", v)
141
- });
142
- expose({
143
- data
144
- });
145
- return (_ctx, _cache) => {
146
- const _component_el_option = resolveComponent("el-option");
147
- const _component_el_select = resolveComponent("el-select");
148
- return openBlock(), createElementBlock("div", {
149
- class: normalizeClass(unref(ns).e("conditbox"))
150
- }, [
151
- unref(showTitle) ? (openBlock(), createElementBlock("div", {
68
+
69
+ const props = __props;
70
+
71
+ const httpRequest = useService(HttpRequest);
72
+ defineOptions({
73
+ name: 'BwaPctMultipleMenuCondition',
74
+ __conditionTitle__: '多选列表',
75
+ __conditionDefault__: () => [],
76
+ });
77
+
78
+
79
+ const popperWidth = ref('240px');
80
+ onMounted(() => {
81
+ nextTick(() => {
82
+ const offsetWidth = document.getElementsByClassName('bwa-pctfilterpanel-item__options')[0]?.offsetWidth;
83
+ if (offsetWidth > 0) {
84
+ popperWidth.value = offsetWidth + 'px';
85
+ }
86
+ });
87
+ });
88
+ const ns = useNamespace('pctfilterpanel-item');
89
+ const isShowPopper = ref(false);
90
+ const isHoverIcon = ref(false);
91
+
92
+ const attrs = useAttrs();
93
+ const showTitle = computed(() => attrs.showTitle);
94
+
95
+ const data = ref([]);
96
+ const loading = ref(false);
97
+
98
+
99
+ const filterPanelItem = inject(filterPanelItemKey, null);
100
+ const column = computed(() => filterPanelItem?.column ?? null);
101
+
102
+ /**
103
+ * 页面参数层级覆盖配置文件传递的参数层级
104
+ */
105
+ if (props.itfInfo) {
106
+ column.value.componentProps = {
107
+ itfInfo: props.itfInfo || {},
108
+ labelAttr: props.labelAttr || 'label',
109
+ valueAttr: props.valueAttr || 'value',
110
+ searchAttr: props.searchAttr || 'search'
111
+ };
112
+ }
113
+
114
+ const searchPlaceholderStr = computed(() => column.value?.componentProps?.searchPlaceholder || props.searchPlaceholder);
115
+ const placeholderStr = computed(() => showTitle.value ? props.placeholder : column.value.title);
116
+
117
+ const labelPropStr = computed(() => column.value?.componentProps?.labelAttr || props.labelProp);
118
+ const valuePropStr = computed(() => column.value?.componentProps?.valueAttr || props.valueProp);
119
+ const handleClose = (val)=>{
120
+
121
+ // 优化后
122
+ // 1. 空值兜底:避免 modelValue.value 为 null/undefined 时报错
123
+ const currentModelValue = Array.isArray(modelValue.value) ? modelValue.value : [];
124
+ // 2. 严格相等 + 类型统一:解决 1 vs "1" 不匹配,同时避免隐式类型转换
125
+ modelValue.value = currentModelValue.filter(item =>
126
+ String(item) !== String(val.value)
127
+ );
128
+
129
+ };
130
+ const handleIconClick = () => {
131
+ if (isHoverIcon.value) {
132
+ // 多选清空逻辑:重置 modelValue 为空数组
133
+ modelValue.value = [];
134
+ isHoverIcon.value = false; // 重置悬浮状态
135
+ return;
136
+ }
137
+ // 原有逻辑:切换下拉显隐
138
+ isShowPopper.value = !isShowPopper.value;
139
+ };
140
+ const getData = async (query) => {
141
+ loading.value = true;
142
+ const { itfInfo, searchAttr } = column.value.componentProps;
143
+ const {url, method, options, params } = {
144
+ url: unref(itfInfo).url,
145
+ method: unref(itfInfo).method || 'POST',
146
+ options: unref(itfInfo).options || {},
147
+ params: { ...unref(itfInfo).params, [searchAttr]: query || ''} || {},
148
+ };
149
+ data.value = (await unref(httpRequest)[method.toLowerCase()](url, params, options))?.data;
150
+ loading.value = false;
151
+ };
152
+
153
+ data.value = props.options ?? [];
154
+ const visibleChange = (val) => {
155
+ isShowPopper.value = val;
156
+ if (!val || !column.value.componentProps || column.value?.componentProps?.options) {
157
+ if (isShowPopper.value && props.isRequiredByVisibleChange) {
158
+ emit('search', '');
159
+ }
160
+ return
161
+ }
162
+ getData();
163
+ };
164
+
165
+ const handleFieldSearch = (query) => {
166
+ if (column.value.componentProps) {
167
+ getData(query);
168
+ } else {
169
+ emit('search', query);
170
+ }
171
+ };
172
+
173
+ const search = ref('');
174
+ watch(() => search.value, val => {
175
+ handleFieldSearch(val);
176
+ });
177
+
178
+ const modelValue = computed({
179
+ get: () => {
180
+ if (props.multiple) {
181
+ return Array.isArray(props.modelValue)
182
+ ? props.modelValue.map((item) => item )
183
+ : [];
184
+ } else {
185
+ return props.modelValue == null || Array.isArray(props.modelValue) ? '' : props.modelValue;
186
+ }
187
+ },
188
+ set: (v) => emit('update:modelValue', v),
189
+ });
190
+
191
+ /**
192
+ * 清除已选
193
+ */
194
+ const advanceSelectRef = ref(null);
195
+ const handleClearClick = () => {
196
+ if (advanceSelectRef.value) {
197
+ advanceSelectRef.value.handleClearClick();
198
+ }
199
+ };
200
+
201
+ expose({
202
+ data
203
+ });
204
+
205
+ return (_ctx, _cache) => {
206
+ const _component_CircleClose = resolveComponent("CircleClose");
207
+
208
+ return (openBlock(), createElementBlock("div", {
209
+ class: normalizeClass(unref(ns).e('conditbox'))
210
+ }, [
211
+ (unref(showTitle))
212
+ ? (openBlock(), createElementBlock("div", {
152
213
  key: 0,
153
- class: normalizeClass(unref(ns).e("title"))
154
- }, toDisplayString(unref(column).title), 3)) : createCommentVNode("v-if", true),
155
- createVNode(_component_el_select, {
156
- multiple: __props.multiple,
157
- modelValue: unref(modelValue),
158
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
159
- onVisibleChange: visibleChange,
160
- class: normalizeClass(unref(ns).e("options")),
161
- loading: loading.value,
162
- placeholder: unref(placeholderStr),
163
- clearable: true,
164
- filterable: __props.showSearch,
165
- remote: __props.remote,
166
- "remote-method": remoteMethod,
167
- size: "small"
168
- }, {
169
- default: withCtx(() => [
170
- (openBlock(true), createElementBlock(Fragment, null, renderList(data.value, (item) => {
171
- return openBlock(), createBlock(_component_el_option, {
172
- key: item[unref(valuePropStr)] + "",
173
- value: item[unref(valuePropStr)] + "",
174
- label: item[unref(labelPropStr)] + ""
175
- }, null, 8, ["value", "label"]);
176
- }), 128))
177
- ]),
178
- _: 1
179
- }, 8, ["multiple", "modelValue", "class", "loading", "placeholder", "filterable", "remote"])
180
- ], 2);
181
- };
182
- }
183
- });
184
- var PctMultipleMenuCondition = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "pct-multiple-menu-condition.vue"]]);
214
+ class: normalizeClass(unref(ns).e('title'))
215
+ }, toDisplayString(unref(column).title), 3 /* TEXT, CLASS */))
216
+ : createCommentVNode("v-if", true),
217
+ createVNode(BwaAdvanceSelect, {
218
+ multiple: __props.multiple,
219
+ modelValue: unref(modelValue),
220
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (isRef(modelValue) ? (modelValue).value = $event : null)),
221
+ onSearch: handleFieldSearch,
222
+ class: normalizeClass(unref(ns).e('options')),
223
+ onVisibleChange: visibleChange,
224
+ source: "pct",
225
+ showSearch: false,
226
+ showSelectIcon: !__props.multiple,
227
+ showSelection: false,
228
+ loading: loading.value,
229
+ width: popperWidth.value,
230
+ borderRadius: "4px",
231
+ ref_key: "advanceSelectRef",
232
+ ref: advanceSelectRef
233
+ }, {
234
+ "reference-content": withCtx(({ selected }) => [
235
+ (__props.multiple)
236
+ ? (openBlock(), createElementBlock("div", {
237
+ key: 0,
238
+ class: normalizeClass(unref(ns).e('content'))
239
+ }, [
240
+ (selected && selected.length > 0)
241
+ ? (openBlock(), createElementBlock("div", _hoisted_1, [
242
+ createVNode(unref(ElTooltip), {
243
+ content: selected[0].label,
244
+ placement: "top",
245
+ effect: "light",
246
+ "append-to": ".bwa-application"
247
+ }, {
248
+ default: withCtx(() => [
249
+ createVNode(unref(ElTag), {
250
+ class: normalizeClass(unref(ns).e('tag')),
251
+ closable: "",
252
+ onClose: $event => (handleClose(selected[0])),
253
+ type: "info"
254
+ }, {
255
+ default: withCtx(() => [
256
+ createTextVNode(toDisplayString(selected[0].label), 1 /* TEXT */)
257
+ ]),
258
+ _: 2 /* DYNAMIC */
259
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "onClose"])
260
+ ]),
261
+ _: 2 /* DYNAMIC */
262
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["content"]),
263
+ createVNode(unref(ElTooltip), {
264
+ content: "Bottom center",
265
+ placement: "top",
266
+ effect: "light",
267
+ "append-to": ".bwa-application"
268
+ }, {
269
+ content: withCtx(() => [
270
+ createElementVNode("div", {
271
+ class: normalizeClass(unref(ns).e('tag_box'))
272
+ }, [
273
+ (openBlock(true), createElementBlock(Fragment, null, renderList(selected, (item, index) => {
274
+ return (openBlock(), createElementBlock(Fragment, null, [
275
+ (index !== 0)
276
+ ? (openBlock(), createBlock(unref(ElTag), {
277
+ key: 0,
278
+ class: normalizeClass(unref(ns).e('tag_details')),
279
+ type: "info",
280
+ closable: "",
281
+ onClose: $event => (handleClose(item))
282
+ }, {
283
+ default: withCtx(() => [
284
+ createTextVNode(toDisplayString(item.label), 1 /* TEXT */)
285
+ ]),
286
+ _: 2 /* DYNAMIC */
287
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "onClose"]))
288
+ : createCommentVNode("v-if", true)
289
+ ], 64 /* STABLE_FRAGMENT */))
290
+ }), 256 /* UNKEYED_FRAGMENT */))
291
+ ], 2 /* CLASS */)
292
+ ]),
293
+ default: withCtx(() => [
294
+ (selected.length > 1)
295
+ ? (openBlock(), createBlock(unref(ElTag), {
296
+ key: 0,
297
+ class: normalizeClass(unref(ns).e('tag')),
298
+ type: "info"
299
+ }, {
300
+ default: withCtx(() => [
301
+ createTextVNode("+" + toDisplayString(selected.length - 1), 1 /* TEXT */)
302
+ ]),
303
+ _: 2 /* DYNAMIC */
304
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class"]))
305
+ : createCommentVNode("v-if", true)
306
+ ]),
307
+ _: 2 /* DYNAMIC */
308
+ }, 1024 /* DYNAMIC_SLOTS */)
309
+ ]))
310
+ : (openBlock(), createElementBlock("div", {
311
+ key: 1,
312
+ class: normalizeClass(unref(ns).e('contentBox_placeholder'))
313
+ }, toDisplayString(unref(placeholderStr)), 3 /* TEXT, CLASS */)),
314
+ createVNode(unref(ElIcon), {
315
+ onMouseenter: _cache[0] || (_cache[0] = $event => (isHoverIcon.value = true)),
316
+ onMouseleave: _cache[1] || (_cache[1] = $event => (isHoverIcon.value = false)),
317
+ onClick: withModifiers(handleIconClick, ["stop"]),
318
+ class: normalizeClass(unref(ns).be('option', 'selected'))
319
+ }, {
320
+ default: withCtx(() => [
321
+ (isHoverIcon.value && selected.length > 0)
322
+ ? (openBlock(), createBlock(_component_CircleClose, {
323
+ key: 0,
324
+ class: "delete-icon"
325
+ }))
326
+ : (isShowPopper.value)
327
+ ? (openBlock(), createBlock(unref(ArrowUp), { key: 1 }))
328
+ : (openBlock(), createBlock(unref(ArrowDown), { key: 2 }))
329
+ ]),
330
+ _: 2 /* DYNAMIC */
331
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick", "class"])
332
+ ], 2 /* CLASS */))
333
+ : (openBlock(), createElementBlock("div", {
334
+ key: 1,
335
+ class: normalizeClass(unref(ns).e('content'))
336
+ }, [
337
+ createVNode(unref(ElTooltip), {
338
+ disabled: !selected.label,
339
+ content: selected.label,
340
+ placement: "top",
341
+ effect: "light",
342
+ "append-to": ".bwa-application"
343
+ }, {
344
+ default: withCtx(() => [
345
+ (selected.label)
346
+ ? (openBlock(), createElementBlock("div", {
347
+ key: 0,
348
+ class: normalizeClass([unref(ns).e('contentBox'), unref(ns).e('contentBox_label')])
349
+ }, toDisplayString(selected.label || unref(placeholderStr)), 3 /* TEXT, CLASS */))
350
+ : (openBlock(), createElementBlock("div", {
351
+ key: 1,
352
+ class: normalizeClass([unref(ns).e('contentBox'), unref(ns).e('contentBox_placeholder')])
353
+ }, toDisplayString(unref(placeholderStr)), 3 /* TEXT, CLASS */))
354
+ ]),
355
+ _: 2 /* DYNAMIC */
356
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["disabled", "content"]),
357
+ createVNode(unref(ElIcon), {
358
+ class: normalizeClass(unref(ns).be('option', 'selected'))
359
+ }, {
360
+ default: withCtx(() => [
361
+ (isShowPopper.value)
362
+ ? (openBlock(), createBlock(unref(ArrowUp), { key: 0 }))
363
+ : (openBlock(), createBlock(unref(ArrowDown), { key: 1 }))
364
+ ]),
365
+ _: 1 /* STABLE */
366
+ }, 8 /* PROPS */, ["class"])
367
+ ], 2 /* CLASS */))
368
+ ]),
369
+ contentTop: withCtx(() => [
370
+ (__props.showSearch && !unref(column).componentProps?.options)
371
+ ? (openBlock(), createElementBlock("div", {
372
+ key: 0,
373
+ class: normalizeClass(unref(ns).e('contentTop'))
374
+ }, [
375
+ createVNode(unref(ElInput), {
376
+ modelValue: search.value,
377
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((search).value = $event)),
378
+ class: normalizeClass(unref(ns).e('select')),
379
+ placeholder: unref(searchPlaceholderStr),
380
+ type: "text",
381
+ "prefix-icon": "Search",
382
+ clearable: ""
383
+ }, null, 8 /* PROPS */, ["modelValue", "class", "placeholder"])
384
+ ], 2 /* CLASS */))
385
+ : createCommentVNode("v-if", true)
386
+ ]),
387
+ contentBottom: withCtx(() => [
388
+ createElementVNode("div", {
389
+ class: normalizeClass(unref(ns).e('clear')),
390
+ onClick: handleClearClick
391
+ }, "清除已选", 2 /* CLASS */)
392
+ ]),
393
+ default: withCtx(() => [
394
+ renderSlot(_ctx.$slots, "default", {}, () => [
395
+ (openBlock(true), createElementBlock(Fragment, null, renderList(data.value, (item) => {
396
+ return (openBlock(), createBlock(BwaAdvanceOption, {
397
+ key: item[unref(valuePropStr)] + '',
398
+ value: item[unref(valuePropStr)] + '',
399
+ label: item[unref(labelPropStr)] + '',
400
+ class: normalizeClass(unref(ns).be('filter', 'option'))
401
+ }, null, 8 /* PROPS */, ["value", "label", "class"]))
402
+ }), 128 /* KEYED_FRAGMENT */))
403
+ ])
404
+ ]),
405
+ _: 3 /* FORWARDED */
406
+ }, 8 /* PROPS */, ["multiple", "modelValue", "class", "showSelectIcon", "loading", "width"])
407
+ ], 2 /* CLASS */))
408
+ }
409
+ }
410
+
411
+ };
412
+ var PctMultipleMenuCondition = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"pct-multiple-menu-condition.vue"]]);
185
413
 
186
414
  export { PctMultipleMenuCondition as default };