bm-admin-ui 1.0.87-alpha → 1.0.89-alpha
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/components/edit-form/index.js +1 -1
- package/es/components/float-table/index.js +54 -62
- package/es/components/form-create/index.js +1 -1
- package/es/components/search-filter/index.d.ts +28 -0
- package/es/components/search-filter/index.js +35 -3
- package/es/components/search-filter/src/search-filter.d.ts +16 -0
- package/es/components/search-filter/src/search-filter.vue.d.ts +28 -0
- package/es/components/search-filter/src/search-reset-btn.vue.d.ts +26 -0
- package/es/components/select-all/index.d.ts +2 -0
- package/es/components/select-all/index.js +32 -15
- package/es/components/select-all/src/selectAll.vue.d.ts +2 -0
- package/lib/components/edit-form/index.js +1 -1
- package/lib/components/float-table/index.js +54 -62
- package/lib/components/form-create/index.js +1 -1
- package/lib/components/search-filter/index.d.ts +28 -0
- package/lib/components/search-filter/index.js +36 -3
- package/lib/components/search-filter/src/search-filter.d.ts +16 -0
- package/lib/components/search-filter/src/search-filter.vue.d.ts +28 -0
- package/lib/components/search-filter/src/search-reset-btn.vue.d.ts +26 -0
- package/lib/components/select-all/index.d.ts +2 -0
- package/lib/components/select-all/index.js +31 -14
- package/lib/components/select-all/src/selectAll.vue.d.ts +2 -0
- package/package.json +1 -1
- package/theme-chalk/edit-form.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/select-all.css +1 -1
- package/types/components/search-filter/index.d.ts +28 -0
- package/types/components/search-filter/src/search-filter.d.ts +16 -0
- package/types/components/search-filter/src/search-filter.vue.d.ts +28 -0
- package/types/components/search-filter/src/search-reset-btn.vue.d.ts +26 -0
- package/types/components/select-all/index.d.ts +2 -0
- package/types/components/select-all/src/selectAll.vue.d.ts +2 -0
|
@@ -391,7 +391,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
391
391
|
return vue.openBlock(), vue.createBlock(_component_a_form, {
|
|
392
392
|
ref_key: "formRef",
|
|
393
393
|
ref: formRef,
|
|
394
|
-
class: "edit-form",
|
|
394
|
+
class: "bm-edit-form",
|
|
395
395
|
model: tmpForm.value,
|
|
396
396
|
rules: { ...props.config?.rules, ...props.groupRules },
|
|
397
397
|
layout: props.config?.global?.layout || "horizontal",
|
|
@@ -8,7 +8,7 @@ var antDesignVue = require('ant-design-vue');
|
|
|
8
8
|
var vxeTable = require('vxe-table');
|
|
9
9
|
|
|
10
10
|
/**!
|
|
11
|
-
* Sortable 1.
|
|
11
|
+
* Sortable 1.14.0
|
|
12
12
|
* @author RubaXa <trash@rubaxa.org>
|
|
13
13
|
* @author owenm <owen23355@gmail.com>
|
|
14
14
|
* @license MIT
|
|
@@ -136,7 +136,7 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
136
136
|
return target;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
var version = "1.
|
|
139
|
+
var version = "1.14.0";
|
|
140
140
|
|
|
141
141
|
function userAgent(pattern) {
|
|
142
142
|
if (typeof window !== 'undefined' && window.navigator) {
|
|
@@ -1057,11 +1057,11 @@ supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in
|
|
|
1057
1057
|
return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
|
|
1058
1058
|
},
|
|
1059
1059
|
|
|
1060
|
-
/**
|
|
1061
|
-
* Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
|
|
1062
|
-
* @param {Number} x X position
|
|
1063
|
-
* @param {Number} y Y position
|
|
1064
|
-
* @return {HTMLElement} Element of the first found nearest Sortable
|
|
1060
|
+
/**
|
|
1061
|
+
* Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
|
|
1062
|
+
* @param {Number} x X position
|
|
1063
|
+
* @param {Number} y Y position
|
|
1064
|
+
* @return {HTMLElement} Element of the first found nearest Sortable
|
|
1065
1065
|
*/
|
|
1066
1066
|
_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
|
|
1067
1067
|
var ret;
|
|
@@ -1127,7 +1127,7 @@ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
|
|
|
1127
1127
|
}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
|
|
1128
1128
|
|
|
1129
1129
|
|
|
1130
|
-
if (documentExists
|
|
1130
|
+
if (documentExists) {
|
|
1131
1131
|
document.addEventListener('click', function (evt) {
|
|
1132
1132
|
if (ignoreNextClick) {
|
|
1133
1133
|
evt.preventDefault();
|
|
@@ -1169,10 +1169,10 @@ var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
|
|
|
1169
1169
|
dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
|
|
1170
1170
|
}
|
|
1171
1171
|
};
|
|
1172
|
-
/**
|
|
1173
|
-
* @class Sortable
|
|
1174
|
-
* @param {HTMLElement} el
|
|
1175
|
-
* @param {Object} [options]
|
|
1172
|
+
/**
|
|
1173
|
+
* @class Sortable
|
|
1174
|
+
* @param {HTMLElement} el
|
|
1175
|
+
* @param {Object} [options]
|
|
1176
1176
|
*/
|
|
1177
1177
|
|
|
1178
1178
|
|
|
@@ -1746,7 +1746,6 @@ Sortable.prototype =
|
|
|
1746
1746
|
|
|
1747
1747
|
if (!Sortable.eventCanceled) {
|
|
1748
1748
|
cloneEl = clone(dragEl);
|
|
1749
|
-
cloneEl.removeAttribute("id");
|
|
1750
1749
|
cloneEl.draggable = false;
|
|
1751
1750
|
cloneEl.style['will-change'] = '';
|
|
1752
1751
|
|
|
@@ -1988,14 +1987,7 @@ Sortable.prototype =
|
|
|
1988
1987
|
|
|
1989
1988
|
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
|
|
1990
1989
|
capture();
|
|
1991
|
-
|
|
1992
|
-
if (elLastChild && elLastChild.nextSibling) {
|
|
1993
|
-
// the last draggable element is not the last node
|
|
1994
|
-
el.insertBefore(dragEl, elLastChild.nextSibling);
|
|
1995
|
-
} else {
|
|
1996
|
-
el.appendChild(dragEl);
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1990
|
+
el.appendChild(dragEl);
|
|
1999
1991
|
parentEl = el; // actualization
|
|
2000
1992
|
|
|
2001
1993
|
changed();
|
|
@@ -2318,9 +2310,9 @@ Sortable.prototype =
|
|
|
2318
2310
|
}
|
|
2319
2311
|
},
|
|
2320
2312
|
|
|
2321
|
-
/**
|
|
2322
|
-
* Serializes the item into an array of string.
|
|
2323
|
-
* @returns {String[]}
|
|
2313
|
+
/**
|
|
2314
|
+
* Serializes the item into an array of string.
|
|
2315
|
+
* @returns {String[]}
|
|
2324
2316
|
*/
|
|
2325
2317
|
toArray: function toArray() {
|
|
2326
2318
|
var order = [],
|
|
@@ -2341,9 +2333,9 @@ Sortable.prototype =
|
|
|
2341
2333
|
return order;
|
|
2342
2334
|
},
|
|
2343
2335
|
|
|
2344
|
-
/**
|
|
2345
|
-
* Sorts the elements according to the array.
|
|
2346
|
-
* @param {String[]} order order of the items
|
|
2336
|
+
/**
|
|
2337
|
+
* Sorts the elements according to the array.
|
|
2338
|
+
* @param {String[]} order order of the items
|
|
2347
2339
|
*/
|
|
2348
2340
|
sort: function sort(order, useAnimation) {
|
|
2349
2341
|
var items = {},
|
|
@@ -2365,29 +2357,29 @@ Sortable.prototype =
|
|
|
2365
2357
|
useAnimation && this.animateAll();
|
|
2366
2358
|
},
|
|
2367
2359
|
|
|
2368
|
-
/**
|
|
2369
|
-
* Save the current sorting
|
|
2360
|
+
/**
|
|
2361
|
+
* Save the current sorting
|
|
2370
2362
|
*/
|
|
2371
2363
|
save: function save() {
|
|
2372
2364
|
var store = this.options.store;
|
|
2373
2365
|
store && store.set && store.set(this);
|
|
2374
2366
|
},
|
|
2375
2367
|
|
|
2376
|
-
/**
|
|
2377
|
-
* For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
|
|
2378
|
-
* @param {HTMLElement} el
|
|
2379
|
-
* @param {String} [selector] default: `options.draggable`
|
|
2380
|
-
* @returns {HTMLElement|null}
|
|
2368
|
+
/**
|
|
2369
|
+
* For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
|
|
2370
|
+
* @param {HTMLElement} el
|
|
2371
|
+
* @param {String} [selector] default: `options.draggable`
|
|
2372
|
+
* @returns {HTMLElement|null}
|
|
2381
2373
|
*/
|
|
2382
2374
|
closest: function closest$1(el, selector) {
|
|
2383
2375
|
return closest(el, selector || this.options.draggable, this.el, false);
|
|
2384
2376
|
},
|
|
2385
2377
|
|
|
2386
|
-
/**
|
|
2387
|
-
* Set/get option
|
|
2388
|
-
* @param {string} name
|
|
2389
|
-
* @param {*} [value]
|
|
2390
|
-
* @returns {*}
|
|
2378
|
+
/**
|
|
2379
|
+
* Set/get option
|
|
2380
|
+
* @param {string} name
|
|
2381
|
+
* @param {*} [value]
|
|
2382
|
+
* @returns {*}
|
|
2391
2383
|
*/
|
|
2392
2384
|
option: function option(name, value) {
|
|
2393
2385
|
var options = this.options;
|
|
@@ -2409,8 +2401,8 @@ Sortable.prototype =
|
|
|
2409
2401
|
}
|
|
2410
2402
|
},
|
|
2411
2403
|
|
|
2412
|
-
/**
|
|
2413
|
-
* Destroy
|
|
2404
|
+
/**
|
|
2405
|
+
* Destroy
|
|
2414
2406
|
*/
|
|
2415
2407
|
destroy: function destroy() {
|
|
2416
2408
|
pluginEvent('destroy', this);
|
|
@@ -2587,11 +2579,11 @@ function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, inv
|
|
|
2587
2579
|
|
|
2588
2580
|
return 0;
|
|
2589
2581
|
}
|
|
2590
|
-
/**
|
|
2591
|
-
* Gets the direction dragEl must be swapped relative to target in order to make it
|
|
2592
|
-
* seem that dragEl has been "inserted" into that element's position
|
|
2593
|
-
* @param {HTMLElement} target The target whose position dragEl is being inserted at
|
|
2594
|
-
* @return {Number} Direction dragEl must be swapped
|
|
2582
|
+
/**
|
|
2583
|
+
* Gets the direction dragEl must be swapped relative to target in order to make it
|
|
2584
|
+
* seem that dragEl has been "inserted" into that element's position
|
|
2585
|
+
* @param {HTMLElement} target The target whose position dragEl is being inserted at
|
|
2586
|
+
* @return {Number} Direction dragEl must be swapped
|
|
2595
2587
|
*/
|
|
2596
2588
|
|
|
2597
2589
|
|
|
@@ -2602,11 +2594,11 @@ function _getInsertDirection(target) {
|
|
|
2602
2594
|
return -1;
|
|
2603
2595
|
}
|
|
2604
2596
|
}
|
|
2605
|
-
/**
|
|
2606
|
-
* Generate id
|
|
2607
|
-
* @param {HTMLElement} el
|
|
2608
|
-
* @returns {String}
|
|
2609
|
-
* @private
|
|
2597
|
+
/**
|
|
2598
|
+
* Generate id
|
|
2599
|
+
* @param {HTMLElement} el
|
|
2600
|
+
* @returns {String}
|
|
2601
|
+
* @private
|
|
2610
2602
|
*/
|
|
2611
2603
|
|
|
2612
2604
|
|
|
@@ -2670,18 +2662,18 @@ Sortable.utils = {
|
|
|
2670
2662
|
detectDirection: _detectDirection,
|
|
2671
2663
|
getChild: getChild
|
|
2672
2664
|
};
|
|
2673
|
-
/**
|
|
2674
|
-
* Get the Sortable instance of an element
|
|
2675
|
-
* @param {HTMLElement} element The element
|
|
2676
|
-
* @return {Sortable|undefined} The instance of Sortable
|
|
2665
|
+
/**
|
|
2666
|
+
* Get the Sortable instance of an element
|
|
2667
|
+
* @param {HTMLElement} element The element
|
|
2668
|
+
* @return {Sortable|undefined} The instance of Sortable
|
|
2677
2669
|
*/
|
|
2678
2670
|
|
|
2679
2671
|
Sortable.get = function (element) {
|
|
2680
2672
|
return element[expando];
|
|
2681
2673
|
};
|
|
2682
|
-
/**
|
|
2683
|
-
* Mount a plugin to Sortable
|
|
2684
|
-
* @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
|
|
2674
|
+
/**
|
|
2675
|
+
* Mount a plugin to Sortable
|
|
2676
|
+
* @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
|
|
2685
2677
|
*/
|
|
2686
2678
|
|
|
2687
2679
|
|
|
@@ -2700,10 +2692,10 @@ Sortable.mount = function () {
|
|
|
2700
2692
|
PluginManager.mount(plugin);
|
|
2701
2693
|
});
|
|
2702
2694
|
};
|
|
2703
|
-
/**
|
|
2704
|
-
* Create sortable instance
|
|
2705
|
-
* @param {HTMLElement} el
|
|
2706
|
-
* @param {Object} [options]
|
|
2695
|
+
/**
|
|
2696
|
+
* Create sortable instance
|
|
2697
|
+
* @param {HTMLElement} el
|
|
2698
|
+
* @param {Object} [options]
|
|
2707
2699
|
*/
|
|
2708
2700
|
|
|
2709
2701
|
|
|
@@ -19469,7 +19469,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
19469
19469
|
function initValue(value) {
|
|
19470
19470
|
index = props.value.index;
|
|
19471
19471
|
panes.splice(0, panes.length);
|
|
19472
|
-
value.panes.forEach((pane, index2) => {
|
|
19472
|
+
JSON.parse(JSON.stringify(value.panes)).forEach((pane, index2) => {
|
|
19473
19473
|
if (!pane.tempSelected)
|
|
19474
19474
|
pane.tempSelected = {};
|
|
19475
19475
|
if (index2 === 0) {
|
|
@@ -31,6 +31,14 @@ declare const BmSearchFilter: import("bm-admin-ui/es/utils/with-install").SFCWit
|
|
|
31
31
|
type: StringConstructor;
|
|
32
32
|
default: string;
|
|
33
33
|
};
|
|
34
|
+
setDefaultConfirm: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
setDefaultConfirmConfig: {
|
|
39
|
+
type: ObjectConstructor;
|
|
40
|
+
default(): {};
|
|
41
|
+
};
|
|
34
42
|
gutter: {
|
|
35
43
|
type: import("vue").PropType<number[]>;
|
|
36
44
|
default(): number[];
|
|
@@ -99,6 +107,14 @@ declare const BmSearchFilter: import("bm-admin-ui/es/utils/with-install").SFCWit
|
|
|
99
107
|
type: StringConstructor;
|
|
100
108
|
default: string;
|
|
101
109
|
};
|
|
110
|
+
setDefaultConfirm: {
|
|
111
|
+
type: BooleanConstructor;
|
|
112
|
+
default: boolean;
|
|
113
|
+
};
|
|
114
|
+
setDefaultConfirmConfig: {
|
|
115
|
+
type: ObjectConstructor;
|
|
116
|
+
default(): {};
|
|
117
|
+
};
|
|
102
118
|
gutter: {
|
|
103
119
|
type: import("vue").PropType<number[]>;
|
|
104
120
|
default(): number[];
|
|
@@ -151,6 +167,8 @@ declare const BmSearchFilter: import("bm-admin-ui/es/utils/with-install").SFCWit
|
|
|
151
167
|
showSetDefaultBtn: boolean;
|
|
152
168
|
setDefaultText: string;
|
|
153
169
|
setDefaultId: string;
|
|
170
|
+
setDefaultConfirm: boolean;
|
|
171
|
+
setDefaultConfirmConfig: Record<string, any>;
|
|
154
172
|
collapseText: string;
|
|
155
173
|
gutter: number[];
|
|
156
174
|
loading: boolean;
|
|
@@ -219,6 +237,14 @@ declare const BmSearchFilter: import("bm-admin-ui/es/utils/with-install").SFCWit
|
|
|
219
237
|
type: StringConstructor;
|
|
220
238
|
default: string;
|
|
221
239
|
};
|
|
240
|
+
setDefaultConfirm: {
|
|
241
|
+
type: BooleanConstructor;
|
|
242
|
+
default: boolean;
|
|
243
|
+
};
|
|
244
|
+
setDefaultConfirmConfig: {
|
|
245
|
+
type: ObjectConstructor;
|
|
246
|
+
default(): {};
|
|
247
|
+
};
|
|
222
248
|
gutter: {
|
|
223
249
|
type: import("vue").PropType<number[]>;
|
|
224
250
|
default(): number[];
|
|
@@ -271,6 +297,8 @@ declare const BmSearchFilter: import("bm-admin-ui/es/utils/with-install").SFCWit
|
|
|
271
297
|
showSetDefaultBtn: boolean;
|
|
272
298
|
setDefaultText: string;
|
|
273
299
|
setDefaultId: string;
|
|
300
|
+
setDefaultConfirm: boolean;
|
|
301
|
+
setDefaultConfirmConfig: Record<string, any>;
|
|
274
302
|
gutter: number[];
|
|
275
303
|
userRule: unknown[];
|
|
276
304
|
ruleSpan: Record<string, any>;
|
|
@@ -8,11 +8,13 @@ var FormCreateCtr = require('@form-create/ant-design-vue');
|
|
|
8
8
|
var iconsVue = require('@ant-design/icons-vue');
|
|
9
9
|
var ASelect = require('ant-design-vue/lib/select');
|
|
10
10
|
var lodashEs = require('lodash-es');
|
|
11
|
+
var Modal = require('ant-design-vue/lib/modal');
|
|
11
12
|
|
|
12
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
14
|
|
|
14
15
|
var FormCreateCtr__default = /*#__PURE__*/_interopDefaultLegacy(FormCreateCtr);
|
|
15
16
|
var ASelect__default = /*#__PURE__*/_interopDefaultLegacy(ASelect);
|
|
17
|
+
var Modal__default = /*#__PURE__*/_interopDefaultLegacy(Modal);
|
|
16
18
|
|
|
17
19
|
const searchResetBtnProps = {
|
|
18
20
|
showExpandBtn: {
|
|
@@ -47,6 +49,16 @@ const searchResetBtnProps = {
|
|
|
47
49
|
type: String,
|
|
48
50
|
default: '',
|
|
49
51
|
},
|
|
52
|
+
setDefaultConfirm: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: true,
|
|
55
|
+
},
|
|
56
|
+
setDefaultConfirmConfig: {
|
|
57
|
+
type: Object,
|
|
58
|
+
default() {
|
|
59
|
+
return {};
|
|
60
|
+
},
|
|
61
|
+
},
|
|
50
62
|
gutter: {
|
|
51
63
|
type: Array,
|
|
52
64
|
default() {
|
|
@@ -356,6 +368,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
356
368
|
showSetDefaultBtn: props.showSetDefaultBtn,
|
|
357
369
|
setDefaultText: props.setDefaultText,
|
|
358
370
|
setDefaultId: props.setDefaultId,
|
|
371
|
+
setDefaultConfirm: props.setDefaultConfirm,
|
|
372
|
+
setDefaultConfirmConfig: props.setDefaultConfirmConfig,
|
|
359
373
|
collapseText: props.collapseText,
|
|
360
374
|
gutter: props.gutter,
|
|
361
375
|
loading: props.loading
|
|
@@ -373,14 +387,33 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
373
387
|
emits("expand", value);
|
|
374
388
|
},
|
|
375
389
|
setDefault() {
|
|
376
|
-
if (props.setDefaultId) {
|
|
390
|
+
if (!props.setDefaultId) {
|
|
391
|
+
throw new Error("\u8BF7\u5148\u8BBE\u7F6E\u5B58\u50A8\u7684ID\uFF0C\u5426\u5219\u65E0\u6CD5\u5B58\u50A8\u5230 LocalStorage\uFF01");
|
|
392
|
+
}
|
|
393
|
+
function setDefault() {
|
|
377
394
|
window.localStorage.setItem(
|
|
378
395
|
props.setDefaultId,
|
|
379
396
|
JSON.stringify(fApi.value.formData())
|
|
380
397
|
);
|
|
398
|
+
emits("setDefault", fApi.value.formData());
|
|
399
|
+
updateRulesDefault(fApi.value.formData());
|
|
400
|
+
}
|
|
401
|
+
if (props.setDefaultConfirm) {
|
|
402
|
+
let defaultConfig = {
|
|
403
|
+
title: "\u786E\u5B9A\u8BBE\u7F6E\u5F53\u524D\u67E5\u8BE2\u6761\u4EF6\u4E3A\u9ED8\u8BA4\u67E5\u8BE2\u5417\uFF1F",
|
|
404
|
+
okText: "\u786E\u8BA4",
|
|
405
|
+
cancelText: "\u53D6\u6D88"
|
|
406
|
+
};
|
|
407
|
+
Modal__default["default"].confirm({
|
|
408
|
+
...defaultConfig,
|
|
409
|
+
...props.setDefaultConfirmConfig,
|
|
410
|
+
onOk() {
|
|
411
|
+
setDefault();
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
} else {
|
|
415
|
+
setDefault();
|
|
381
416
|
}
|
|
382
|
-
emits("setDefault", fApi.value.formData());
|
|
383
|
-
updateRulesDefault(fApi.value.formData());
|
|
384
417
|
}
|
|
385
418
|
}
|
|
386
419
|
}
|
|
@@ -32,6 +32,14 @@ export declare const searchResetBtnProps: {
|
|
|
32
32
|
type: StringConstructor;
|
|
33
33
|
default: string;
|
|
34
34
|
};
|
|
35
|
+
setDefaultConfirm: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
setDefaultConfirmConfig: {
|
|
40
|
+
type: ObjectConstructor;
|
|
41
|
+
default(): {};
|
|
42
|
+
};
|
|
35
43
|
gutter: {
|
|
36
44
|
type: PropType<number[]>;
|
|
37
45
|
default(): number[];
|
|
@@ -74,6 +82,14 @@ export declare const searchFilterProps: {
|
|
|
74
82
|
type: StringConstructor;
|
|
75
83
|
default: string;
|
|
76
84
|
};
|
|
85
|
+
setDefaultConfirm: {
|
|
86
|
+
type: BooleanConstructor;
|
|
87
|
+
default: boolean;
|
|
88
|
+
};
|
|
89
|
+
setDefaultConfirmConfig: {
|
|
90
|
+
type: ObjectConstructor;
|
|
91
|
+
default(): {};
|
|
92
|
+
};
|
|
77
93
|
gutter: {
|
|
78
94
|
type: PropType<number[]>;
|
|
79
95
|
default(): number[];
|
|
@@ -31,6 +31,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
31
|
type: StringConstructor;
|
|
32
32
|
default: string;
|
|
33
33
|
};
|
|
34
|
+
setDefaultConfirm: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
setDefaultConfirmConfig: {
|
|
39
|
+
type: ObjectConstructor;
|
|
40
|
+
default(): {};
|
|
41
|
+
};
|
|
34
42
|
gutter: {
|
|
35
43
|
type: import("vue").PropType<number[]>;
|
|
36
44
|
default(): number[];
|
|
@@ -99,6 +107,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
99
107
|
type: StringConstructor;
|
|
100
108
|
default: string;
|
|
101
109
|
};
|
|
110
|
+
setDefaultConfirm: {
|
|
111
|
+
type: BooleanConstructor;
|
|
112
|
+
default: boolean;
|
|
113
|
+
};
|
|
114
|
+
setDefaultConfirmConfig: {
|
|
115
|
+
type: ObjectConstructor;
|
|
116
|
+
default(): {};
|
|
117
|
+
};
|
|
102
118
|
gutter: {
|
|
103
119
|
type: import("vue").PropType<number[]>;
|
|
104
120
|
default(): number[];
|
|
@@ -151,6 +167,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
151
167
|
showSetDefaultBtn: boolean;
|
|
152
168
|
setDefaultText: string;
|
|
153
169
|
setDefaultId: string;
|
|
170
|
+
setDefaultConfirm: boolean;
|
|
171
|
+
setDefaultConfirmConfig: Record<string, any>;
|
|
154
172
|
collapseText: string;
|
|
155
173
|
gutter: number[];
|
|
156
174
|
loading: boolean;
|
|
@@ -219,6 +237,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
219
237
|
type: StringConstructor;
|
|
220
238
|
default: string;
|
|
221
239
|
};
|
|
240
|
+
setDefaultConfirm: {
|
|
241
|
+
type: BooleanConstructor;
|
|
242
|
+
default: boolean;
|
|
243
|
+
};
|
|
244
|
+
setDefaultConfirmConfig: {
|
|
245
|
+
type: ObjectConstructor;
|
|
246
|
+
default(): {};
|
|
247
|
+
};
|
|
222
248
|
gutter: {
|
|
223
249
|
type: import("vue").PropType<number[]>;
|
|
224
250
|
default(): number[];
|
|
@@ -271,6 +297,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
271
297
|
showSetDefaultBtn: boolean;
|
|
272
298
|
setDefaultText: string;
|
|
273
299
|
setDefaultId: string;
|
|
300
|
+
setDefaultConfirm: boolean;
|
|
301
|
+
setDefaultConfirmConfig: Record<string, any>;
|
|
274
302
|
gutter: number[];
|
|
275
303
|
userRule: unknown[];
|
|
276
304
|
ruleSpan: Record<string, any>;
|
|
@@ -31,6 +31,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
31
|
type: StringConstructor;
|
|
32
32
|
default: string;
|
|
33
33
|
};
|
|
34
|
+
setDefaultConfirm: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
setDefaultConfirmConfig: {
|
|
39
|
+
type: ObjectConstructor;
|
|
40
|
+
default(): {};
|
|
41
|
+
};
|
|
34
42
|
gutter: {
|
|
35
43
|
type: import("vue").PropType<number[]>;
|
|
36
44
|
default(): number[];
|
|
@@ -73,6 +81,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
73
81
|
type: StringConstructor;
|
|
74
82
|
default: string;
|
|
75
83
|
};
|
|
84
|
+
setDefaultConfirm: {
|
|
85
|
+
type: BooleanConstructor;
|
|
86
|
+
default: boolean;
|
|
87
|
+
};
|
|
88
|
+
setDefaultConfirmConfig: {
|
|
89
|
+
type: ObjectConstructor;
|
|
90
|
+
default(): {};
|
|
91
|
+
};
|
|
76
92
|
gutter: {
|
|
77
93
|
type: import("vue").PropType<number[]>;
|
|
78
94
|
default(): number[];
|
|
@@ -133,6 +149,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
133
149
|
type: StringConstructor;
|
|
134
150
|
default: string;
|
|
135
151
|
};
|
|
152
|
+
setDefaultConfirm: {
|
|
153
|
+
type: BooleanConstructor;
|
|
154
|
+
default: boolean;
|
|
155
|
+
};
|
|
156
|
+
setDefaultConfirmConfig: {
|
|
157
|
+
type: ObjectConstructor;
|
|
158
|
+
default(): {};
|
|
159
|
+
};
|
|
136
160
|
gutter: {
|
|
137
161
|
type: import("vue").PropType<number[]>;
|
|
138
162
|
default(): number[];
|
|
@@ -156,6 +180,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
156
180
|
showSetDefaultBtn: boolean;
|
|
157
181
|
setDefaultText: string;
|
|
158
182
|
setDefaultId: string;
|
|
183
|
+
setDefaultConfirm: boolean;
|
|
184
|
+
setDefaultConfirmConfig: Record<string, any>;
|
|
159
185
|
gutter: number[];
|
|
160
186
|
}>;
|
|
161
187
|
export default _default;
|
|
@@ -28,6 +28,7 @@ declare const BmSelectAll: import("bm-admin-ui/es/utils/with-install").SFCWithIn
|
|
|
28
28
|
indeterminate: boolean;
|
|
29
29
|
checkedAll: boolean;
|
|
30
30
|
checkedReverse: boolean;
|
|
31
|
+
searchList: never[];
|
|
31
32
|
};
|
|
32
33
|
};
|
|
33
34
|
emit: (event: "onChange" | "update:value" | "onSelectAll", ...args: any[]) => void;
|
|
@@ -35,6 +36,7 @@ declare const BmSelectAll: import("bm-admin-ui/es/utils/with-install").SFCWithIn
|
|
|
35
36
|
selectAll: (e: any) => void;
|
|
36
37
|
reverseAll: (e: any) => false | undefined;
|
|
37
38
|
onChange: (value: any, option: any) => void;
|
|
39
|
+
onSearch: (val: string | number) => void;
|
|
38
40
|
VNodes: (_: any, { attrs }: {
|
|
39
41
|
attrs: any;
|
|
40
42
|
}) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
@@ -24,7 +24,8 @@ const _hoisted_3 = ["onClick"];
|
|
|
24
24
|
const _hoisted_4 = /* @__PURE__ */ vue.createElementVNode("span", { class: "checkbox-label" }, "\u5168\u9009", -1);
|
|
25
25
|
const _hoisted_5 = ["onClick"];
|
|
26
26
|
const _hoisted_6 = /* @__PURE__ */ vue.createElementVNode("span", { class: "checkbox-label" }, "\u53CD\u9009", -1);
|
|
27
|
-
const _hoisted_7 = {
|
|
27
|
+
const _hoisted_7 = { key: 0 };
|
|
28
|
+
const _hoisted_8 = { class: "blue" };
|
|
28
29
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
29
30
|
__name: "selectAll",
|
|
30
31
|
props: {
|
|
@@ -34,7 +35,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
34
35
|
},
|
|
35
36
|
showSelectAll: {
|
|
36
37
|
type: Boolean,
|
|
37
|
-
default:
|
|
38
|
+
default: true
|
|
38
39
|
}
|
|
39
40
|
},
|
|
40
41
|
emits: ["onSelectAll", "update:value", "onChange"],
|
|
@@ -45,7 +46,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
45
46
|
search: {
|
|
46
47
|
indeterminate: false,
|
|
47
48
|
checkedAll: false,
|
|
48
|
-
checkedReverse: false
|
|
49
|
+
checkedReverse: false,
|
|
50
|
+
searchList: []
|
|
49
51
|
}
|
|
50
52
|
});
|
|
51
53
|
let selectValue = vue.ref([]);
|
|
@@ -57,7 +59,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
57
59
|
state.search = {
|
|
58
60
|
indeterminate: false,
|
|
59
61
|
checkedAll: false,
|
|
60
|
-
checkedReverse: false
|
|
62
|
+
checkedReverse: false,
|
|
63
|
+
searchList: []
|
|
61
64
|
};
|
|
62
65
|
}
|
|
63
66
|
},
|
|
@@ -67,17 +70,20 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
67
70
|
);
|
|
68
71
|
const selectAll = (e) => {
|
|
69
72
|
let key = "value";
|
|
73
|
+
let list = [];
|
|
70
74
|
if (instance?.attrs.fieldNames || instance?.attrs["field-names"])
|
|
71
75
|
key = (instance?.attrs).fieldNames?.value || (instance?.attrs)["field-names"].value;
|
|
72
76
|
state.search.checkedAll = !state.search.checkedAll;
|
|
73
77
|
state.search.indeterminate = false;
|
|
74
78
|
state.search.checkedReverse = false;
|
|
79
|
+
if (state.search.searchList.length > 0)
|
|
80
|
+
list = state.search.searchList;
|
|
81
|
+
else
|
|
82
|
+
list = instance?.attrs.options;
|
|
75
83
|
if (state.search.checkedAll) {
|
|
76
|
-
selectValue.value =
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
);
|
|
84
|
+
selectValue.value = list.map((v) => {
|
|
85
|
+
return v[key];
|
|
86
|
+
});
|
|
81
87
|
} else {
|
|
82
88
|
selectValue.value = [];
|
|
83
89
|
}
|
|
@@ -120,6 +126,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
120
126
|
option
|
|
121
127
|
});
|
|
122
128
|
};
|
|
129
|
+
const onSearch = (val) => {
|
|
130
|
+
if (val) {
|
|
131
|
+
const key = (instance?.attrs).optionFilterProp || (instance?.attrs)["option-filter-prop"] || "value";
|
|
132
|
+
const list = (instance?.attrs).options.filter((ele) => {
|
|
133
|
+
return String(ele[key]).indexOf(String(val)) > -1;
|
|
134
|
+
});
|
|
135
|
+
state.search.searchList = list;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
123
138
|
const VNodes = (_, { attrs }) => {
|
|
124
139
|
return vue.h(attrs.vnodes);
|
|
125
140
|
};
|
|
@@ -130,10 +145,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
130
145
|
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => vue.isRef(selectValue) ? selectValue.value = $event : selectValue = $event),
|
|
131
146
|
class: "bm-select"
|
|
132
147
|
}, _ctx.$attrs, {
|
|
148
|
+
class: { w200: !props.showSelectAll },
|
|
133
149
|
mode: "multiple",
|
|
134
150
|
placeholder: vue.unref(instance)?.attrs.placeholder ? vue.unref(instance)?.attrs.placeholder : "\u8BF7\u9009\u62E9",
|
|
135
151
|
"get-popup-container": (nodes) => nodes.parentNode,
|
|
136
|
-
onChange
|
|
152
|
+
onChange,
|
|
153
|
+
onSearch
|
|
137
154
|
}), {
|
|
138
155
|
dropdownRender: vue.withCtx(({ menuNode: menu }) => [
|
|
139
156
|
vue.createElementVNode("div", _hoisted_1, [
|
|
@@ -160,16 +177,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
160
177
|
_hoisted_6
|
|
161
178
|
], 40, _hoisted_5)
|
|
162
179
|
]),
|
|
163
|
-
vue.
|
|
180
|
+
__props.showSelectAll ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
164
181
|
vue.createTextVNode(" \u5DF2\u9009\u62E9 "),
|
|
165
|
-
vue.createElementVNode("span",
|
|
182
|
+
vue.createElementVNode("span", _hoisted_8, vue.toDisplayString(vue.unref(selectValue)?.length || 0), 1),
|
|
166
183
|
vue.createTextVNode(" \u9879 ")
|
|
167
|
-
])
|
|
184
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
168
185
|
]),
|
|
169
186
|
vue.createVNode(VNodes, { vnodes: menu }, null, 8, ["vnodes"])
|
|
170
187
|
]),
|
|
171
188
|
_: 1
|
|
172
|
-
}, 16, ["value", "placeholder", "get-popup-container"]);
|
|
189
|
+
}, 16, ["value", "class", "placeholder", "get-popup-container"]);
|
|
173
190
|
};
|
|
174
191
|
}
|
|
175
192
|
});
|
|
@@ -28,6 +28,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
28
|
indeterminate: boolean;
|
|
29
29
|
checkedAll: boolean;
|
|
30
30
|
checkedReverse: boolean;
|
|
31
|
+
searchList: never[];
|
|
31
32
|
};
|
|
32
33
|
};
|
|
33
34
|
emit: (event: "onChange" | "update:value" | "onSelectAll", ...args: any[]) => void;
|
|
@@ -35,6 +36,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
36
|
selectAll: (e: any) => void;
|
|
36
37
|
reverseAll: (e: any) => false | undefined;
|
|
37
38
|
onChange: (value: any, option: any) => void;
|
|
39
|
+
onSearch: (val: string | number) => void;
|
|
38
40
|
VNodes: (_: any, { attrs }: {
|
|
39
41
|
attrs: any;
|
|
40
42
|
}) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|