@fecp/designer 5.5.63 → 5.5.65
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/designer/package.json.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
- package/es/designer.css +127 -56
- package/es/packages/mobile/index.mjs +2 -0
- package/es/packages/mobile/src/components/all.mjs +2 -0
- package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
- package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +18 -4
- package/es/packages/mobile/src/components/dataDisplay/table/Table.vue.mjs +21 -4
- package/es/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.mjs +249 -0
- package/es/packages/mobile/src/components/feedback/quickFilter/index.mjs +10 -0
- package/es/packages/mobile/src/components/form/search/Search.vue.mjs +159 -15
- package/es/packages/vue/src/components/details/footer/Footer.vue.mjs +3 -2
- package/es/packages/vue/src/components/forms/cascader/Cascader.vue.mjs +1 -1
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +1 -1
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
- package/lib/designer.css +127 -56
- package/lib/packages/mobile/index.js +74 -72
- package/lib/packages/mobile/src/components/all.js +74 -72
- package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
- package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +17 -3
- package/lib/packages/mobile/src/components/dataDisplay/table/Table.vue.js +20 -3
- package/lib/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.js +249 -0
- package/lib/packages/mobile/src/components/feedback/quickFilter/index.js +10 -0
- package/lib/packages/mobile/src/components/form/search/Search.vue.js +158 -14
- package/lib/packages/vue/src/components/details/footer/Footer.vue.js +3 -2
- package/lib/packages/vue/src/components/forms/cascader/Cascader.vue.js +1 -1
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +1 -1
- package/package.json +1 -1
|
@@ -29,42 +29,43 @@ const index$p = require("./feedback/floatingBubble/index.js");
|
|
|
29
29
|
const index$q = require("./feedback/loading/index.js");
|
|
30
30
|
const index$r = require("./feedback/pullRefresh/index.js");
|
|
31
31
|
const index$s = require("./feedback/swipeCell/index.js");
|
|
32
|
-
const index$t = require("./
|
|
33
|
-
const index$u = require("./form/
|
|
34
|
-
const index$v = require("./form/
|
|
35
|
-
const index$w = require("./form/
|
|
36
|
-
const index$x = require("./form/
|
|
37
|
-
const index$y = require("./form/
|
|
38
|
-
const index$z = require("./form/
|
|
39
|
-
const index$A = require("./form/
|
|
40
|
-
const index$B = require("./form/
|
|
41
|
-
const index$C = require("./form/
|
|
42
|
-
const index$D = require("./form/
|
|
43
|
-
const index$E = require("./form/
|
|
44
|
-
const index$F = require("./form/
|
|
45
|
-
const index$G = require("./form/
|
|
46
|
-
const index$H = require("./form/
|
|
47
|
-
const index$I = require("./form/
|
|
48
|
-
const index$J = require("./form/
|
|
49
|
-
const index$K = require("./form/
|
|
50
|
-
const index$L = require("./form/
|
|
51
|
-
const index$M = require("./form/
|
|
52
|
-
const index$N = require("./form/
|
|
53
|
-
const index$O = require("./
|
|
54
|
-
const index$P = require("./navigation/
|
|
55
|
-
const index$Q = require("./navigation/
|
|
56
|
-
const index$R = require("./navigation/
|
|
57
|
-
const index$S = require("./navigation/
|
|
58
|
-
const index$T = require("./navigation/
|
|
59
|
-
const index$U = require("./navigation/
|
|
60
|
-
const index$V = require("./navigation/
|
|
61
|
-
const index$W = require("./navigation/
|
|
62
|
-
const index$X = require("./navigation/
|
|
63
|
-
const index$Y = require("./navigation/
|
|
64
|
-
const index$Z = require("./navigation/
|
|
65
|
-
const index$_ = require("./navigation/
|
|
66
|
-
const index$$ = require("./
|
|
67
|
-
const index$10 = require("./
|
|
32
|
+
const index$t = require("./feedback/quickFilter/index.js");
|
|
33
|
+
const index$u = require("./form/checkbox/index.js");
|
|
34
|
+
const index$v = require("./form/checkboxGroup/index.js");
|
|
35
|
+
const index$w = require("./form/field/index.js");
|
|
36
|
+
const index$x = require("./form/fieldPicker/index.js");
|
|
37
|
+
const index$y = require("./form/fieldCalendarPicker/index.js");
|
|
38
|
+
const index$z = require("./form/fieldDatePicker/index.js");
|
|
39
|
+
const index$A = require("./form/fieldTimePicker/index.js");
|
|
40
|
+
const index$B = require("./form/fieldDateTimePicker/index.js");
|
|
41
|
+
const index$C = require("./form/fieldCascaderPicker/index.js");
|
|
42
|
+
const index$D = require("./form/fieldCheckbox/index.js");
|
|
43
|
+
const index$E = require("./form/fieldRadio/index.js");
|
|
44
|
+
const index$F = require("./form/fieldArea/index.js");
|
|
45
|
+
const index$G = require("./form/fieldIndustry/index.js");
|
|
46
|
+
const index$H = require("./form/form/index.js");
|
|
47
|
+
const index$I = require("./form/formItem/index.js");
|
|
48
|
+
const index$J = require("./form/radioGroup/index.js");
|
|
49
|
+
const index$K = require("./form/search/index.js");
|
|
50
|
+
const index$L = require("./form/uploader/index.js");
|
|
51
|
+
const index$M = require("./form/fieldUploader/index.js");
|
|
52
|
+
const index$N = require("./form/submitButton/index.js");
|
|
53
|
+
const index$O = require("./form/fieldSubTitle/index.js");
|
|
54
|
+
const index$P = require("./navigation/actionBar/index.js");
|
|
55
|
+
const index$Q = require("./navigation/backTop/index.js");
|
|
56
|
+
const index$R = require("./navigation/grid/index.js");
|
|
57
|
+
const index$S = require("./navigation/indexBar/index.js");
|
|
58
|
+
const index$T = require("./navigation/indexAnchor/index.js");
|
|
59
|
+
const index$U = require("./navigation/navBar/index.js");
|
|
60
|
+
const index$V = require("./navigation/pagination/index.js");
|
|
61
|
+
const index$W = require("./navigation/sidebar/index.js");
|
|
62
|
+
const index$X = require("./navigation/sidebarItem/index.js");
|
|
63
|
+
const index$Y = require("./navigation/tabs/index.js");
|
|
64
|
+
const index$Z = require("./navigation/tabbar/index.js");
|
|
65
|
+
const index$_ = require("./navigation/tabbarItem/index.js");
|
|
66
|
+
const index$$ = require("./navigation/treeSelect/index.js");
|
|
67
|
+
const index$10 = require("./layout/layout/index.js");
|
|
68
|
+
const index$11 = require("./custom/timeLineFilter/index.js");
|
|
68
69
|
exports.MobileButton = index.MobileButton;
|
|
69
70
|
exports.MobileIcon = index$1.MobileIcon;
|
|
70
71
|
exports.MobileCell = index$2.MobileCell;
|
|
@@ -94,39 +95,40 @@ exports.MobileFloatingBubble = index$p.MobileFloatingBubble;
|
|
|
94
95
|
exports.MobileLoading = index$q.MobileLoading;
|
|
95
96
|
exports.MobilePullRefresh = index$r.MobilePullRefresh;
|
|
96
97
|
exports.MobileSwipeCell = index$s.MobileSwipeCell;
|
|
97
|
-
exports.
|
|
98
|
-
exports.
|
|
99
|
-
exports.
|
|
100
|
-
exports.
|
|
101
|
-
exports.
|
|
102
|
-
exports.
|
|
103
|
-
exports.
|
|
104
|
-
exports.
|
|
105
|
-
exports.
|
|
106
|
-
exports.
|
|
107
|
-
exports.
|
|
108
|
-
exports.
|
|
109
|
-
exports.
|
|
110
|
-
exports.
|
|
111
|
-
exports.
|
|
112
|
-
exports.
|
|
113
|
-
exports.
|
|
114
|
-
exports.
|
|
115
|
-
exports.
|
|
116
|
-
exports.
|
|
117
|
-
exports.
|
|
118
|
-
exports.
|
|
119
|
-
exports.
|
|
120
|
-
exports.
|
|
121
|
-
exports.
|
|
122
|
-
exports.
|
|
123
|
-
exports.
|
|
124
|
-
exports.
|
|
125
|
-
exports.
|
|
126
|
-
exports.
|
|
127
|
-
exports.
|
|
128
|
-
exports.
|
|
129
|
-
exports.
|
|
130
|
-
exports.
|
|
131
|
-
exports.
|
|
132
|
-
exports.
|
|
98
|
+
exports.MobileQuickFilter = index$t.MobileQuickFilter;
|
|
99
|
+
exports.MobileCheckbox = index$u.MobileCheckbox;
|
|
100
|
+
exports.MobileCheckboxGroup = index$v.MobileCheckboxGroup;
|
|
101
|
+
exports.MobileField = index$w.MobileField;
|
|
102
|
+
exports.MobileFieldPicker = index$x.MobileFieldPicker;
|
|
103
|
+
exports.MobileFieldCalendarPicker = index$y.MobileFieldCalendarPicker;
|
|
104
|
+
exports.MobileFieldDatePicker = index$z.MobileFieldDatePicker;
|
|
105
|
+
exports.MobileFieldTimePicker = index$A.MobileFieldTimePicker;
|
|
106
|
+
exports.MobileFieldDateTimePicker = index$B.MobileFieldDateTimePicker;
|
|
107
|
+
exports.MobileFieldCascaderPicker = index$C.MobileFieldCascaderPicker;
|
|
108
|
+
exports.MobileFieldCheckbox = index$D.MobileFieldCheckbox;
|
|
109
|
+
exports.MobileFieldRadio = index$E.MobileFieldRadio;
|
|
110
|
+
exports.MobileFieldArea = index$F.MobileFieldArea;
|
|
111
|
+
exports.MobileFieldIndustry = index$G.MobileFieldIndustry;
|
|
112
|
+
exports.MobileForm = index$H.MobileForm;
|
|
113
|
+
exports.MobileFormItem = index$I.MobileFormItem;
|
|
114
|
+
exports.MobileRadioGroup = index$J.MobileRadioGroup;
|
|
115
|
+
exports.MobileSearch = index$K.MobileSearch;
|
|
116
|
+
exports.MobileUploader = index$L.MobileUploader;
|
|
117
|
+
exports.MobileFieldUploader = index$M.MobileFieldUploader;
|
|
118
|
+
exports.MobileSubmitButton = index$N.MobileSubmitButton;
|
|
119
|
+
exports.MobileFieldSubTitle = index$O.MobileFieldSubTitle;
|
|
120
|
+
exports.MobileActionBar = index$P.MobileActionBar;
|
|
121
|
+
exports.MobileBackTop = index$Q.MobileBackTop;
|
|
122
|
+
exports.MobileGrid = index$R.MobileGrid;
|
|
123
|
+
exports.MobileIndexBar = index$S.MobileIndexBar;
|
|
124
|
+
exports.MobileIndexAnchor = index$T.MobileIndexAnchor;
|
|
125
|
+
exports.MobileNavBar = index$U.MobileNavBar;
|
|
126
|
+
exports.MobilePagination = index$V.MobilePagination;
|
|
127
|
+
exports.MobileSidebar = index$W.MobileSidebar;
|
|
128
|
+
exports.MobileSidebarItem = index$X.MobileSidebarItem;
|
|
129
|
+
exports.MobileTabs = index$Y.MobileTabs;
|
|
130
|
+
exports.MobileTabbar = index$Z.MobileTabbar;
|
|
131
|
+
exports.MobileTabbarItem = index$_.MobileTabbarItem;
|
|
132
|
+
exports.MobileTreeSelect = index$$.MobileTreeSelect;
|
|
133
|
+
exports.MobileLayout = index$10.MobileLayout;
|
|
134
|
+
exports.MobileTimeLineFilter = index$11.MobileTimeLineFilter;
|
|
@@ -8,13 +8,13 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
8
8
|
;/* empty css */
|
|
9
9
|
;/* empty css */
|
|
10
10
|
const Vue = require("vue");
|
|
11
|
-
;/* empty css */
|
|
12
|
-
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
13
11
|
;/* empty css */
|
|
14
12
|
;/* empty css */
|
|
15
13
|
;/* empty css */
|
|
16
14
|
;/* empty css */
|
|
17
15
|
;/* empty css */
|
|
16
|
+
;/* empty css */
|
|
17
|
+
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
18
18
|
const index$1 = require("../../../../node_modules/vant/es/swipe-cell/index.js");
|
|
19
19
|
const functionCall = require("../../../../node_modules/vant/es/dialog/function-call.js");
|
|
20
20
|
require("../../../../node_modules/vant/es/dialog/index.js");
|
|
@@ -55,6 +55,14 @@ const _sfc_main = {
|
|
|
55
55
|
filterPlaceholder: {
|
|
56
56
|
type: String,
|
|
57
57
|
default: ""
|
|
58
|
+
},
|
|
59
|
+
filterMode: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: ""
|
|
62
|
+
},
|
|
63
|
+
quickFilter: {
|
|
64
|
+
type: Array,
|
|
65
|
+
default: []
|
|
58
66
|
}
|
|
59
67
|
},
|
|
60
68
|
setup(__props) {
|
|
@@ -140,6 +148,9 @@ const _sfc_main = {
|
|
|
140
148
|
loading.value = false;
|
|
141
149
|
}
|
|
142
150
|
}
|
|
151
|
+
const quickFilterConfig = Vue.computed(() => {
|
|
152
|
+
return props.quickFilter;
|
|
153
|
+
});
|
|
143
154
|
return (_ctx, _cache) => {
|
|
144
155
|
const _component_fec_mobile_search = Vue.resolveComponent("fec-mobile-search");
|
|
145
156
|
const _component_fec_mobile_card = Vue.resolveComponent("fec-mobile-card");
|
|
@@ -147,8 +158,11 @@ const _sfc_main = {
|
|
|
147
158
|
return Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, null, [
|
|
148
159
|
__props.enableFilter ? (Vue.openBlock(), Vue.createBlock(_component_fec_mobile_search, {
|
|
149
160
|
key: 0,
|
|
150
|
-
placeholder: __props.filterPlaceholder
|
|
151
|
-
|
|
161
|
+
placeholder: __props.filterPlaceholder,
|
|
162
|
+
filterMode: __props.filterMode,
|
|
163
|
+
dataSources: __props.dataSources,
|
|
164
|
+
filterConfig: Vue.unref(quickFilterConfig)
|
|
165
|
+
}, null, 8, ["placeholder", "filterMode", "dataSources", "filterConfig"])) : Vue.createCommentVNode("", true),
|
|
152
166
|
Vue.createVNode(_component_van_list, {
|
|
153
167
|
ref_key: "listRef",
|
|
154
168
|
ref: listRef,
|
|
@@ -186,5 +200,5 @@ const _sfc_main = {
|
|
|
186
200
|
};
|
|
187
201
|
}
|
|
188
202
|
};
|
|
189
|
-
const _CardList = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
203
|
+
const _CardList = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-77da18e2"]]);
|
|
190
204
|
exports.default = _CardList;
|
|
@@ -129,6 +129,14 @@ const _sfc_main = {
|
|
|
129
129
|
filterPlaceholder: {
|
|
130
130
|
type: String,
|
|
131
131
|
default: ""
|
|
132
|
+
},
|
|
133
|
+
filterMode: {
|
|
134
|
+
type: String,
|
|
135
|
+
default: ""
|
|
136
|
+
},
|
|
137
|
+
quickFilter: {
|
|
138
|
+
type: Array,
|
|
139
|
+
default: []
|
|
132
140
|
}
|
|
133
141
|
},
|
|
134
142
|
emits: [
|
|
@@ -429,6 +437,12 @@ const _sfc_main = {
|
|
|
429
437
|
call();
|
|
430
438
|
}
|
|
431
439
|
}
|
|
440
|
+
const quickFilterConfig = Vue.computed(() => {
|
|
441
|
+
const list = props.columns.filter((item) => {
|
|
442
|
+
return props.quickFilter.includes(item.fieldName);
|
|
443
|
+
});
|
|
444
|
+
return list;
|
|
445
|
+
});
|
|
432
446
|
return (_ctx, _cache) => {
|
|
433
447
|
const _component_fec_mobile_search = Vue.resolveComponent("fec-mobile-search");
|
|
434
448
|
const _component_van_list = index$3.List;
|
|
@@ -436,8 +450,11 @@ const _sfc_main = {
|
|
|
436
450
|
return Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, null, [
|
|
437
451
|
__props.enableFilter ? (Vue.openBlock(), Vue.createBlock(_component_fec_mobile_search, {
|
|
438
452
|
key: 0,
|
|
439
|
-
placeholder: __props.filterPlaceholder
|
|
440
|
-
|
|
453
|
+
placeholder: __props.filterPlaceholder,
|
|
454
|
+
filterMode: __props.filterMode,
|
|
455
|
+
dataSources: __props.dataSources,
|
|
456
|
+
filterConfig: Vue.unref(quickFilterConfig)
|
|
457
|
+
}, null, 8, ["placeholder", "filterMode", "dataSources", "filterConfig"])) : Vue.createCommentVNode("", true),
|
|
441
458
|
Vue.createVNode(_component_van_cell_group, {
|
|
442
459
|
class: Vue.normalizeClass(["mTableContent", {
|
|
443
460
|
notAutoHeight: !__props.autoHeight,
|
|
@@ -561,5 +578,5 @@ const _sfc_main = {
|
|
|
561
578
|
};
|
|
562
579
|
}
|
|
563
580
|
};
|
|
564
|
-
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
581
|
+
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-6b4a4429"]]);
|
|
565
582
|
exports.default = _Table;
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
;/* empty css */
|
|
4
|
+
;/* empty css */
|
|
5
|
+
;/* empty css */
|
|
6
|
+
;/* empty css */
|
|
7
|
+
;/* empty css */
|
|
8
|
+
;/* empty css */
|
|
9
|
+
;/* empty css */
|
|
10
|
+
;/* empty css */
|
|
11
|
+
;/* empty css */
|
|
12
|
+
;/* empty css */
|
|
13
|
+
const Vue = require("vue");
|
|
14
|
+
;/* empty css */
|
|
15
|
+
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
16
|
+
const index = require("../../../../node_modules/vant/es/dropdown-menu/index.js");
|
|
17
|
+
const index$1 = require("../../../../node_modules/vant/es/dropdown-item/index.js");
|
|
18
|
+
const index$2 = require("../../../../node_modules/vant/es/button/index.js");
|
|
19
|
+
const _hoisted_1 = { class: "dropdown-title" };
|
|
20
|
+
const _hoisted_2 = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "title-badge"
|
|
23
|
+
};
|
|
24
|
+
const _hoisted_3 = { class: "filter-container" };
|
|
25
|
+
const _hoisted_4 = { class: "tag-list" };
|
|
26
|
+
const _hoisted_5 = ["onClick"];
|
|
27
|
+
const _hoisted_6 = { class: "filter-footer" };
|
|
28
|
+
const _hoisted_7 = { class: "filter-container" };
|
|
29
|
+
const _hoisted_8 = { class: "group-title" };
|
|
30
|
+
const _hoisted_9 = { class: "tag-list" };
|
|
31
|
+
const _hoisted_10 = ["onClick"];
|
|
32
|
+
const _hoisted_11 = { class: "filter-footer" };
|
|
33
|
+
const _sfc_main = {
|
|
34
|
+
__name: "QuickFilter",
|
|
35
|
+
props: {
|
|
36
|
+
filterData: {
|
|
37
|
+
type: Array,
|
|
38
|
+
default: () => []
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
emits: ["change"],
|
|
42
|
+
setup(__props, { emit: __emit }) {
|
|
43
|
+
const props = __props;
|
|
44
|
+
const emit = __emit;
|
|
45
|
+
const filterDataComputed = Vue.computed(() => props.filterData);
|
|
46
|
+
const activeSelections = Vue.ref({});
|
|
47
|
+
const confirmedSelections = Vue.ref({});
|
|
48
|
+
const itemRefs = Vue.ref({});
|
|
49
|
+
const isOptionSelected = (fieldName, value) => {
|
|
50
|
+
var _a;
|
|
51
|
+
return ((_a = activeSelections.value[fieldName]) == null ? void 0 : _a.includes(value)) || false;
|
|
52
|
+
};
|
|
53
|
+
const getConfirmedCount = (fieldName) => {
|
|
54
|
+
var _a;
|
|
55
|
+
return ((_a = confirmedSelections.value[fieldName]) == null ? void 0 : _a.length) || 0;
|
|
56
|
+
};
|
|
57
|
+
const toggleOption = (fieldName, value) => {
|
|
58
|
+
if (!activeSelections.value[fieldName]) {
|
|
59
|
+
activeSelections.value[fieldName] = [];
|
|
60
|
+
}
|
|
61
|
+
const filter = filterDataComputed.value.find((f) => f.fieldName === fieldName);
|
|
62
|
+
const isMultiple = (filter == null ? void 0 : filter.dataType) === "multiple";
|
|
63
|
+
if (isMultiple) {
|
|
64
|
+
const idx = activeSelections.value[fieldName].indexOf(value);
|
|
65
|
+
if (idx > -1) {
|
|
66
|
+
activeSelections.value[fieldName].splice(idx, 1);
|
|
67
|
+
} else {
|
|
68
|
+
activeSelections.value[fieldName].push(value);
|
|
69
|
+
}
|
|
70
|
+
} else {
|
|
71
|
+
activeSelections.value[fieldName] = [value];
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const getSelectedLabel = (filter) => {
|
|
75
|
+
var _a;
|
|
76
|
+
const selected = (_a = confirmedSelections.value[filter.fieldName]) == null ? void 0 : _a[0];
|
|
77
|
+
if (selected) {
|
|
78
|
+
const option = filter.options.find((o) => o.value === selected);
|
|
79
|
+
return (option == null ? void 0 : option.label) || "";
|
|
80
|
+
}
|
|
81
|
+
return "";
|
|
82
|
+
};
|
|
83
|
+
const resetFilter = (fieldName) => {
|
|
84
|
+
activeSelections.value[fieldName] = [];
|
|
85
|
+
};
|
|
86
|
+
const confirmFilter = (fieldName) => {
|
|
87
|
+
var _a;
|
|
88
|
+
confirmedSelections.value[fieldName] = [
|
|
89
|
+
...activeSelections.value[fieldName] || []
|
|
90
|
+
];
|
|
91
|
+
(_a = itemRefs.value[fieldName]) == null ? void 0 : _a.toggle();
|
|
92
|
+
emitChange();
|
|
93
|
+
};
|
|
94
|
+
const allFilterRef = Vue.ref(null);
|
|
95
|
+
const resetAllFilters = () => {
|
|
96
|
+
filterDataComputed.value.forEach((filter) => {
|
|
97
|
+
activeSelections.value[filter.fieldName] = [];
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
const confirmAllFilters = () => {
|
|
101
|
+
var _a;
|
|
102
|
+
filterDataComputed.value.forEach((filter) => {
|
|
103
|
+
confirmedSelections.value[filter.fieldName] = [
|
|
104
|
+
...activeSelections.value[filter.fieldName] || []
|
|
105
|
+
];
|
|
106
|
+
});
|
|
107
|
+
(_a = allFilterRef.value) == null ? void 0 : _a.toggle();
|
|
108
|
+
emitChange();
|
|
109
|
+
};
|
|
110
|
+
const dropdownItemOpen = (fieldName) => {
|
|
111
|
+
activeSelections.value[fieldName] = [
|
|
112
|
+
...confirmedSelections.value[fieldName] || []
|
|
113
|
+
];
|
|
114
|
+
};
|
|
115
|
+
const emitChange = () => {
|
|
116
|
+
const result = [];
|
|
117
|
+
filterDataComputed.value.forEach((filter) => {
|
|
118
|
+
const values = confirmedSelections.value[filter.fieldName] || [];
|
|
119
|
+
if (values.length > 0) {
|
|
120
|
+
result.push({
|
|
121
|
+
fieldName: filter.fieldName,
|
|
122
|
+
label: filter.label,
|
|
123
|
+
dataType: filter.dataType,
|
|
124
|
+
values
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
emit("change", result);
|
|
129
|
+
};
|
|
130
|
+
return (_ctx, _cache) => {
|
|
131
|
+
const _component_van_button = index$2.Button;
|
|
132
|
+
const _component_van_dropdown_item = index$1.DropdownItem;
|
|
133
|
+
const _component_van_dropdown_menu = index.DropdownMenu;
|
|
134
|
+
return Vue.unref(filterDataComputed).length > 0 ? (Vue.openBlock(), Vue.createBlock(_component_van_dropdown_menu, {
|
|
135
|
+
key: 0,
|
|
136
|
+
"auto-locate": "",
|
|
137
|
+
class: "fec-quick-filter"
|
|
138
|
+
}, {
|
|
139
|
+
default: Vue.withCtx(() => [
|
|
140
|
+
(Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(Vue.unref(filterDataComputed), (filter) => {
|
|
141
|
+
return Vue.openBlock(), Vue.createBlock(_component_van_dropdown_item, {
|
|
142
|
+
key: filter.fieldName,
|
|
143
|
+
ref_for: true,
|
|
144
|
+
ref: (el) => Vue.unref(itemRefs)[filter.fieldName] = el,
|
|
145
|
+
onOpen: ($event) => dropdownItemOpen(filter.fieldName)
|
|
146
|
+
}, {
|
|
147
|
+
title: Vue.withCtx(() => [
|
|
148
|
+
Vue.createElementVNode("span", _hoisted_1, [
|
|
149
|
+
Vue.createTextVNode(Vue.toDisplayString(filter.dataType === "select" ? getSelectedLabel(filter) || filter.label : filter.label) + " ", 1),
|
|
150
|
+
filter.dataType === "multiple" && getConfirmedCount(filter.fieldName) > 0 ? (Vue.openBlock(), Vue.createElementBlock("span", _hoisted_2, Vue.toDisplayString(getConfirmedCount(filter.fieldName)), 1)) : Vue.createCommentVNode("", true)
|
|
151
|
+
])
|
|
152
|
+
]),
|
|
153
|
+
default: Vue.withCtx(() => [
|
|
154
|
+
Vue.createElementVNode("div", _hoisted_3, [
|
|
155
|
+
Vue.createElementVNode("div", _hoisted_4, [
|
|
156
|
+
(Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(filter.options, (item) => {
|
|
157
|
+
return Vue.openBlock(), Vue.createElementBlock("div", {
|
|
158
|
+
key: item.id || item.value,
|
|
159
|
+
class: Vue.normalizeClass(["tag-item", { active: isOptionSelected(filter.fieldName, item.value) }]),
|
|
160
|
+
onClick: ($event) => toggleOption(filter.fieldName, item.value)
|
|
161
|
+
}, Vue.toDisplayString(item.label), 11, _hoisted_5);
|
|
162
|
+
}), 128))
|
|
163
|
+
]),
|
|
164
|
+
Vue.createElementVNode("div", _hoisted_6, [
|
|
165
|
+
Vue.createVNode(_component_van_button, {
|
|
166
|
+
size: "small",
|
|
167
|
+
onClick: ($event) => resetFilter(filter.fieldName)
|
|
168
|
+
}, {
|
|
169
|
+
default: Vue.withCtx(() => _cache[0] || (_cache[0] = [
|
|
170
|
+
Vue.createTextVNode("重置")
|
|
171
|
+
])),
|
|
172
|
+
_: 2
|
|
173
|
+
}, 1032, ["onClick"]),
|
|
174
|
+
Vue.createVNode(_component_van_button, {
|
|
175
|
+
type: "primary",
|
|
176
|
+
size: "small",
|
|
177
|
+
onClick: ($event) => confirmFilter(filter.fieldName)
|
|
178
|
+
}, {
|
|
179
|
+
default: Vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
180
|
+
Vue.createTextVNode("确定")
|
|
181
|
+
])),
|
|
182
|
+
_: 2
|
|
183
|
+
}, 1032, ["onClick"])
|
|
184
|
+
])
|
|
185
|
+
])
|
|
186
|
+
]),
|
|
187
|
+
_: 2
|
|
188
|
+
}, 1032, ["onOpen"]);
|
|
189
|
+
}), 128)),
|
|
190
|
+
Vue.unref(filterDataComputed).length > 0 ? (Vue.openBlock(), Vue.createBlock(_component_van_dropdown_item, {
|
|
191
|
+
key: 0,
|
|
192
|
+
ref_key: "allFilterRef",
|
|
193
|
+
ref: allFilterRef,
|
|
194
|
+
title: "全部筛选"
|
|
195
|
+
}, {
|
|
196
|
+
default: Vue.withCtx(() => [
|
|
197
|
+
Vue.createElementVNode("div", _hoisted_7, [
|
|
198
|
+
(Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(Vue.unref(filterDataComputed), (filter) => {
|
|
199
|
+
return Vue.openBlock(), Vue.createElementBlock("div", {
|
|
200
|
+
key: filter.fieldName,
|
|
201
|
+
class: "filter-group"
|
|
202
|
+
}, [
|
|
203
|
+
Vue.createElementVNode("h3", _hoisted_8, Vue.toDisplayString(filter.label), 1),
|
|
204
|
+
Vue.createElementVNode("div", _hoisted_9, [
|
|
205
|
+
(Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(filter.options, (item) => {
|
|
206
|
+
return Vue.openBlock(), Vue.createElementBlock("div", {
|
|
207
|
+
key: item.id || item.value,
|
|
208
|
+
class: Vue.normalizeClass(["tag-item", {
|
|
209
|
+
active: isOptionSelected(filter.fieldName, item.value)
|
|
210
|
+
}]),
|
|
211
|
+
onClick: ($event) => toggleOption(filter.fieldName, item.value)
|
|
212
|
+
}, Vue.toDisplayString(item.label), 11, _hoisted_10);
|
|
213
|
+
}), 128))
|
|
214
|
+
])
|
|
215
|
+
]);
|
|
216
|
+
}), 128)),
|
|
217
|
+
Vue.createElementVNode("div", _hoisted_11, [
|
|
218
|
+
Vue.createVNode(_component_van_button, {
|
|
219
|
+
size: "small",
|
|
220
|
+
onClick: resetAllFilters
|
|
221
|
+
}, {
|
|
222
|
+
default: Vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
223
|
+
Vue.createTextVNode("重置")
|
|
224
|
+
])),
|
|
225
|
+
_: 1
|
|
226
|
+
}),
|
|
227
|
+
Vue.createVNode(_component_van_button, {
|
|
228
|
+
type: "primary",
|
|
229
|
+
size: "small",
|
|
230
|
+
onClick: confirmAllFilters
|
|
231
|
+
}, {
|
|
232
|
+
default: Vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
233
|
+
Vue.createTextVNode("确定")
|
|
234
|
+
])),
|
|
235
|
+
_: 1
|
|
236
|
+
})
|
|
237
|
+
])
|
|
238
|
+
])
|
|
239
|
+
]),
|
|
240
|
+
_: 1
|
|
241
|
+
}, 512)) : Vue.createCommentVNode("", true)
|
|
242
|
+
]),
|
|
243
|
+
_: 1
|
|
244
|
+
})) : Vue.createCommentVNode("", true);
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
const QuickFilter = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-65884e09"]]);
|
|
249
|
+
exports.default = QuickFilter;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const QuickFilter = require("./QuickFilter.vue.js");
|
|
4
|
+
const install = require("../../../utils/install.js");
|
|
5
|
+
const MobileQuickFilter = install.default.withInstall(
|
|
6
|
+
"MobileQuickFilter",
|
|
7
|
+
QuickFilter.default
|
|
8
|
+
);
|
|
9
|
+
exports.MobileQuickFilter = MobileQuickFilter;
|
|
10
|
+
exports.default = MobileQuickFilter;
|