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
|
@@ -383,7 +383,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
383
383
|
return openBlock(), createBlock(_component_a_form, {
|
|
384
384
|
ref_key: "formRef",
|
|
385
385
|
ref: formRef,
|
|
386
|
-
class: "edit-form",
|
|
386
|
+
class: "bm-edit-form",
|
|
387
387
|
model: tmpForm.value,
|
|
388
388
|
rules: { ...props.config?.rules, ...props.groupRules },
|
|
389
389
|
layout: props.config?.global?.layout || "horizontal",
|
|
@@ -4,7 +4,7 @@ import { Empty } from 'ant-design-vue';
|
|
|
4
4
|
import { VXETable } from 'vxe-table';
|
|
5
5
|
|
|
6
6
|
/**!
|
|
7
|
-
* Sortable 1.
|
|
7
|
+
* Sortable 1.14.0
|
|
8
8
|
* @author RubaXa <trash@rubaxa.org>
|
|
9
9
|
* @author owenm <owen23355@gmail.com>
|
|
10
10
|
* @license MIT
|
|
@@ -132,7 +132,7 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
132
132
|
return target;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
var version = "1.
|
|
135
|
+
var version = "1.14.0";
|
|
136
136
|
|
|
137
137
|
function userAgent(pattern) {
|
|
138
138
|
if (typeof window !== 'undefined' && window.navigator) {
|
|
@@ -1053,11 +1053,11 @@ supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in
|
|
|
1053
1053
|
return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
|
|
1054
1054
|
},
|
|
1055
1055
|
|
|
1056
|
-
/**
|
|
1057
|
-
* Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
|
|
1058
|
-
* @param {Number} x X position
|
|
1059
|
-
* @param {Number} y Y position
|
|
1060
|
-
* @return {HTMLElement} Element of the first found nearest Sortable
|
|
1056
|
+
/**
|
|
1057
|
+
* Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
|
|
1058
|
+
* @param {Number} x X position
|
|
1059
|
+
* @param {Number} y Y position
|
|
1060
|
+
* @return {HTMLElement} Element of the first found nearest Sortable
|
|
1061
1061
|
*/
|
|
1062
1062
|
_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
|
|
1063
1063
|
var ret;
|
|
@@ -1123,7 +1123,7 @@ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
|
|
|
1123
1123
|
}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
|
|
1124
1124
|
|
|
1125
1125
|
|
|
1126
|
-
if (documentExists
|
|
1126
|
+
if (documentExists) {
|
|
1127
1127
|
document.addEventListener('click', function (evt) {
|
|
1128
1128
|
if (ignoreNextClick) {
|
|
1129
1129
|
evt.preventDefault();
|
|
@@ -1165,10 +1165,10 @@ var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
|
|
|
1165
1165
|
dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
|
|
1166
1166
|
}
|
|
1167
1167
|
};
|
|
1168
|
-
/**
|
|
1169
|
-
* @class Sortable
|
|
1170
|
-
* @param {HTMLElement} el
|
|
1171
|
-
* @param {Object} [options]
|
|
1168
|
+
/**
|
|
1169
|
+
* @class Sortable
|
|
1170
|
+
* @param {HTMLElement} el
|
|
1171
|
+
* @param {Object} [options]
|
|
1172
1172
|
*/
|
|
1173
1173
|
|
|
1174
1174
|
|
|
@@ -1742,7 +1742,6 @@ Sortable.prototype =
|
|
|
1742
1742
|
|
|
1743
1743
|
if (!Sortable.eventCanceled) {
|
|
1744
1744
|
cloneEl = clone(dragEl);
|
|
1745
|
-
cloneEl.removeAttribute("id");
|
|
1746
1745
|
cloneEl.draggable = false;
|
|
1747
1746
|
cloneEl.style['will-change'] = '';
|
|
1748
1747
|
|
|
@@ -1984,14 +1983,7 @@ Sortable.prototype =
|
|
|
1984
1983
|
|
|
1985
1984
|
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
|
|
1986
1985
|
capture();
|
|
1987
|
-
|
|
1988
|
-
if (elLastChild && elLastChild.nextSibling) {
|
|
1989
|
-
// the last draggable element is not the last node
|
|
1990
|
-
el.insertBefore(dragEl, elLastChild.nextSibling);
|
|
1991
|
-
} else {
|
|
1992
|
-
el.appendChild(dragEl);
|
|
1993
|
-
}
|
|
1994
|
-
|
|
1986
|
+
el.appendChild(dragEl);
|
|
1995
1987
|
parentEl = el; // actualization
|
|
1996
1988
|
|
|
1997
1989
|
changed();
|
|
@@ -2314,9 +2306,9 @@ Sortable.prototype =
|
|
|
2314
2306
|
}
|
|
2315
2307
|
},
|
|
2316
2308
|
|
|
2317
|
-
/**
|
|
2318
|
-
* Serializes the item into an array of string.
|
|
2319
|
-
* @returns {String[]}
|
|
2309
|
+
/**
|
|
2310
|
+
* Serializes the item into an array of string.
|
|
2311
|
+
* @returns {String[]}
|
|
2320
2312
|
*/
|
|
2321
2313
|
toArray: function toArray() {
|
|
2322
2314
|
var order = [],
|
|
@@ -2337,9 +2329,9 @@ Sortable.prototype =
|
|
|
2337
2329
|
return order;
|
|
2338
2330
|
},
|
|
2339
2331
|
|
|
2340
|
-
/**
|
|
2341
|
-
* Sorts the elements according to the array.
|
|
2342
|
-
* @param {String[]} order order of the items
|
|
2332
|
+
/**
|
|
2333
|
+
* Sorts the elements according to the array.
|
|
2334
|
+
* @param {String[]} order order of the items
|
|
2343
2335
|
*/
|
|
2344
2336
|
sort: function sort(order, useAnimation) {
|
|
2345
2337
|
var items = {},
|
|
@@ -2361,29 +2353,29 @@ Sortable.prototype =
|
|
|
2361
2353
|
useAnimation && this.animateAll();
|
|
2362
2354
|
},
|
|
2363
2355
|
|
|
2364
|
-
/**
|
|
2365
|
-
* Save the current sorting
|
|
2356
|
+
/**
|
|
2357
|
+
* Save the current sorting
|
|
2366
2358
|
*/
|
|
2367
2359
|
save: function save() {
|
|
2368
2360
|
var store = this.options.store;
|
|
2369
2361
|
store && store.set && store.set(this);
|
|
2370
2362
|
},
|
|
2371
2363
|
|
|
2372
|
-
/**
|
|
2373
|
-
* 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.
|
|
2374
|
-
* @param {HTMLElement} el
|
|
2375
|
-
* @param {String} [selector] default: `options.draggable`
|
|
2376
|
-
* @returns {HTMLElement|null}
|
|
2364
|
+
/**
|
|
2365
|
+
* 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.
|
|
2366
|
+
* @param {HTMLElement} el
|
|
2367
|
+
* @param {String} [selector] default: `options.draggable`
|
|
2368
|
+
* @returns {HTMLElement|null}
|
|
2377
2369
|
*/
|
|
2378
2370
|
closest: function closest$1(el, selector) {
|
|
2379
2371
|
return closest(el, selector || this.options.draggable, this.el, false);
|
|
2380
2372
|
},
|
|
2381
2373
|
|
|
2382
|
-
/**
|
|
2383
|
-
* Set/get option
|
|
2384
|
-
* @param {string} name
|
|
2385
|
-
* @param {*} [value]
|
|
2386
|
-
* @returns {*}
|
|
2374
|
+
/**
|
|
2375
|
+
* Set/get option
|
|
2376
|
+
* @param {string} name
|
|
2377
|
+
* @param {*} [value]
|
|
2378
|
+
* @returns {*}
|
|
2387
2379
|
*/
|
|
2388
2380
|
option: function option(name, value) {
|
|
2389
2381
|
var options = this.options;
|
|
@@ -2405,8 +2397,8 @@ Sortable.prototype =
|
|
|
2405
2397
|
}
|
|
2406
2398
|
},
|
|
2407
2399
|
|
|
2408
|
-
/**
|
|
2409
|
-
* Destroy
|
|
2400
|
+
/**
|
|
2401
|
+
* Destroy
|
|
2410
2402
|
*/
|
|
2411
2403
|
destroy: function destroy() {
|
|
2412
2404
|
pluginEvent('destroy', this);
|
|
@@ -2583,11 +2575,11 @@ function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, inv
|
|
|
2583
2575
|
|
|
2584
2576
|
return 0;
|
|
2585
2577
|
}
|
|
2586
|
-
/**
|
|
2587
|
-
* Gets the direction dragEl must be swapped relative to target in order to make it
|
|
2588
|
-
* seem that dragEl has been "inserted" into that element's position
|
|
2589
|
-
* @param {HTMLElement} target The target whose position dragEl is being inserted at
|
|
2590
|
-
* @return {Number} Direction dragEl must be swapped
|
|
2578
|
+
/**
|
|
2579
|
+
* Gets the direction dragEl must be swapped relative to target in order to make it
|
|
2580
|
+
* seem that dragEl has been "inserted" into that element's position
|
|
2581
|
+
* @param {HTMLElement} target The target whose position dragEl is being inserted at
|
|
2582
|
+
* @return {Number} Direction dragEl must be swapped
|
|
2591
2583
|
*/
|
|
2592
2584
|
|
|
2593
2585
|
|
|
@@ -2598,11 +2590,11 @@ function _getInsertDirection(target) {
|
|
|
2598
2590
|
return -1;
|
|
2599
2591
|
}
|
|
2600
2592
|
}
|
|
2601
|
-
/**
|
|
2602
|
-
* Generate id
|
|
2603
|
-
* @param {HTMLElement} el
|
|
2604
|
-
* @returns {String}
|
|
2605
|
-
* @private
|
|
2593
|
+
/**
|
|
2594
|
+
* Generate id
|
|
2595
|
+
* @param {HTMLElement} el
|
|
2596
|
+
* @returns {String}
|
|
2597
|
+
* @private
|
|
2606
2598
|
*/
|
|
2607
2599
|
|
|
2608
2600
|
|
|
@@ -2666,18 +2658,18 @@ Sortable.utils = {
|
|
|
2666
2658
|
detectDirection: _detectDirection,
|
|
2667
2659
|
getChild: getChild
|
|
2668
2660
|
};
|
|
2669
|
-
/**
|
|
2670
|
-
* Get the Sortable instance of an element
|
|
2671
|
-
* @param {HTMLElement} element The element
|
|
2672
|
-
* @return {Sortable|undefined} The instance of Sortable
|
|
2661
|
+
/**
|
|
2662
|
+
* Get the Sortable instance of an element
|
|
2663
|
+
* @param {HTMLElement} element The element
|
|
2664
|
+
* @return {Sortable|undefined} The instance of Sortable
|
|
2673
2665
|
*/
|
|
2674
2666
|
|
|
2675
2667
|
Sortable.get = function (element) {
|
|
2676
2668
|
return element[expando];
|
|
2677
2669
|
};
|
|
2678
|
-
/**
|
|
2679
|
-
* Mount a plugin to Sortable
|
|
2680
|
-
* @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
|
|
2670
|
+
/**
|
|
2671
|
+
* Mount a plugin to Sortable
|
|
2672
|
+
* @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
|
|
2681
2673
|
*/
|
|
2682
2674
|
|
|
2683
2675
|
|
|
@@ -2696,10 +2688,10 @@ Sortable.mount = function () {
|
|
|
2696
2688
|
PluginManager.mount(plugin);
|
|
2697
2689
|
});
|
|
2698
2690
|
};
|
|
2699
|
-
/**
|
|
2700
|
-
* Create sortable instance
|
|
2701
|
-
* @param {HTMLElement} el
|
|
2702
|
-
* @param {Object} [options]
|
|
2691
|
+
/**
|
|
2692
|
+
* Create sortable instance
|
|
2693
|
+
* @param {HTMLElement} el
|
|
2694
|
+
* @param {Object} [options]
|
|
2703
2695
|
*/
|
|
2704
2696
|
|
|
2705
2697
|
|
|
@@ -19458,7 +19458,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
19458
19458
|
function initValue(value) {
|
|
19459
19459
|
index = props.value.index;
|
|
19460
19460
|
panes.splice(0, panes.length);
|
|
19461
|
-
value.panes.forEach((pane, index2) => {
|
|
19461
|
+
JSON.parse(JSON.stringify(value.panes)).forEach((pane, index2) => {
|
|
19462
19462
|
if (!pane.tempSelected)
|
|
19463
19463
|
pane.tempSelected = {};
|
|
19464
19464
|
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>;
|
|
@@ -4,6 +4,7 @@ import FormCreateCtr from '@form-create/ant-design-vue';
|
|
|
4
4
|
import { UpOutlined, DownOutlined, SearchOutlined } from '@ant-design/icons-vue';
|
|
5
5
|
import ASelect from 'ant-design-vue/lib/select';
|
|
6
6
|
import { cloneDeep } from 'lodash-es';
|
|
7
|
+
import Modal from 'ant-design-vue/lib/modal';
|
|
7
8
|
|
|
8
9
|
const searchResetBtnProps = {
|
|
9
10
|
showExpandBtn: {
|
|
@@ -38,6 +39,16 @@ const searchResetBtnProps = {
|
|
|
38
39
|
type: String,
|
|
39
40
|
default: '',
|
|
40
41
|
},
|
|
42
|
+
setDefaultConfirm: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: true,
|
|
45
|
+
},
|
|
46
|
+
setDefaultConfirmConfig: {
|
|
47
|
+
type: Object,
|
|
48
|
+
default() {
|
|
49
|
+
return {};
|
|
50
|
+
},
|
|
51
|
+
},
|
|
41
52
|
gutter: {
|
|
42
53
|
type: Array,
|
|
43
54
|
default() {
|
|
@@ -347,6 +358,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
347
358
|
showSetDefaultBtn: props.showSetDefaultBtn,
|
|
348
359
|
setDefaultText: props.setDefaultText,
|
|
349
360
|
setDefaultId: props.setDefaultId,
|
|
361
|
+
setDefaultConfirm: props.setDefaultConfirm,
|
|
362
|
+
setDefaultConfirmConfig: props.setDefaultConfirmConfig,
|
|
350
363
|
collapseText: props.collapseText,
|
|
351
364
|
gutter: props.gutter,
|
|
352
365
|
loading: props.loading
|
|
@@ -364,14 +377,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
364
377
|
emits("expand", value);
|
|
365
378
|
},
|
|
366
379
|
setDefault() {
|
|
367
|
-
if (props.setDefaultId) {
|
|
380
|
+
if (!props.setDefaultId) {
|
|
381
|
+
throw new Error("\u8BF7\u5148\u8BBE\u7F6E\u5B58\u50A8\u7684ID\uFF0C\u5426\u5219\u65E0\u6CD5\u5B58\u50A8\u5230 LocalStorage\uFF01");
|
|
382
|
+
}
|
|
383
|
+
function setDefault() {
|
|
368
384
|
window.localStorage.setItem(
|
|
369
385
|
props.setDefaultId,
|
|
370
386
|
JSON.stringify(fApi.value.formData())
|
|
371
387
|
);
|
|
388
|
+
emits("setDefault", fApi.value.formData());
|
|
389
|
+
updateRulesDefault(fApi.value.formData());
|
|
390
|
+
}
|
|
391
|
+
if (props.setDefaultConfirm) {
|
|
392
|
+
let defaultConfig = {
|
|
393
|
+
title: "\u786E\u5B9A\u8BBE\u7F6E\u5F53\u524D\u67E5\u8BE2\u6761\u4EF6\u4E3A\u9ED8\u8BA4\u67E5\u8BE2\u5417\uFF1F",
|
|
394
|
+
okText: "\u786E\u8BA4",
|
|
395
|
+
cancelText: "\u53D6\u6D88"
|
|
396
|
+
};
|
|
397
|
+
Modal.confirm({
|
|
398
|
+
...defaultConfig,
|
|
399
|
+
...props.setDefaultConfirmConfig,
|
|
400
|
+
onOk() {
|
|
401
|
+
setDefault();
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
} else {
|
|
405
|
+
setDefault();
|
|
372
406
|
}
|
|
373
|
-
emits("setDefault", fApi.value.formData());
|
|
374
|
-
updateRulesDefault(fApi.value.formData());
|
|
375
407
|
}
|
|
376
408
|
}
|
|
377
409
|
}
|
|
@@ -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, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withInstall } from 'bm-admin-ui/es/utils/with-install';
|
|
2
|
-
import { defineComponent, getCurrentInstance, reactive, ref, watch, resolveComponent, openBlock, createBlock, unref, mergeProps, isRef, withCtx, createElementVNode, withModifiers, createVNode, createTextVNode, toDisplayString, h } from 'vue';
|
|
2
|
+
import { defineComponent, getCurrentInstance, reactive, ref, watch, resolveComponent, openBlock, createBlock, unref, mergeProps, isRef, withCtx, createElementVNode, withModifiers, createVNode, createElementBlock, createTextVNode, toDisplayString, createCommentVNode, h } from 'vue';
|
|
3
3
|
import ASelect from 'ant-design-vue/lib/select';
|
|
4
4
|
|
|
5
5
|
var _export_sfc = (sfc, props) => {
|
|
@@ -16,7 +16,8 @@ const _hoisted_3 = ["onClick"];
|
|
|
16
16
|
const _hoisted_4 = /* @__PURE__ */ createElementVNode("span", { class: "checkbox-label" }, "\u5168\u9009", -1);
|
|
17
17
|
const _hoisted_5 = ["onClick"];
|
|
18
18
|
const _hoisted_6 = /* @__PURE__ */ createElementVNode("span", { class: "checkbox-label" }, "\u53CD\u9009", -1);
|
|
19
|
-
const _hoisted_7 = {
|
|
19
|
+
const _hoisted_7 = { key: 0 };
|
|
20
|
+
const _hoisted_8 = { class: "blue" };
|
|
20
21
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
22
|
__name: "selectAll",
|
|
22
23
|
props: {
|
|
@@ -26,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
27
|
},
|
|
27
28
|
showSelectAll: {
|
|
28
29
|
type: Boolean,
|
|
29
|
-
default:
|
|
30
|
+
default: true
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
emits: ["onSelectAll", "update:value", "onChange"],
|
|
@@ -37,7 +38,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
37
38
|
search: {
|
|
38
39
|
indeterminate: false,
|
|
39
40
|
checkedAll: false,
|
|
40
|
-
checkedReverse: false
|
|
41
|
+
checkedReverse: false,
|
|
42
|
+
searchList: []
|
|
41
43
|
}
|
|
42
44
|
});
|
|
43
45
|
let selectValue = ref([]);
|
|
@@ -49,7 +51,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
51
|
state.search = {
|
|
50
52
|
indeterminate: false,
|
|
51
53
|
checkedAll: false,
|
|
52
|
-
checkedReverse: false
|
|
54
|
+
checkedReverse: false,
|
|
55
|
+
searchList: []
|
|
53
56
|
};
|
|
54
57
|
}
|
|
55
58
|
},
|
|
@@ -59,17 +62,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
59
62
|
);
|
|
60
63
|
const selectAll = (e) => {
|
|
61
64
|
let key = "value";
|
|
65
|
+
let list = [];
|
|
62
66
|
if (instance?.attrs.fieldNames || instance?.attrs["field-names"])
|
|
63
67
|
key = (instance?.attrs).fieldNames?.value || (instance?.attrs)["field-names"].value;
|
|
64
68
|
state.search.checkedAll = !state.search.checkedAll;
|
|
65
69
|
state.search.indeterminate = false;
|
|
66
70
|
state.search.checkedReverse = false;
|
|
71
|
+
if (state.search.searchList.length > 0)
|
|
72
|
+
list = state.search.searchList;
|
|
73
|
+
else
|
|
74
|
+
list = instance?.attrs.options;
|
|
67
75
|
if (state.search.checkedAll) {
|
|
68
|
-
selectValue.value =
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
);
|
|
76
|
+
selectValue.value = list.map((v) => {
|
|
77
|
+
return v[key];
|
|
78
|
+
});
|
|
73
79
|
} else {
|
|
74
80
|
selectValue.value = [];
|
|
75
81
|
}
|
|
@@ -112,6 +118,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
112
118
|
option
|
|
113
119
|
});
|
|
114
120
|
};
|
|
121
|
+
const onSearch = (val) => {
|
|
122
|
+
if (val) {
|
|
123
|
+
const key = (instance?.attrs).optionFilterProp || (instance?.attrs)["option-filter-prop"] || "value";
|
|
124
|
+
const list = (instance?.attrs).options.filter((ele) => {
|
|
125
|
+
return String(ele[key]).indexOf(String(val)) > -1;
|
|
126
|
+
});
|
|
127
|
+
state.search.searchList = list;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
115
130
|
const VNodes = (_, { attrs }) => {
|
|
116
131
|
return h(attrs.vnodes);
|
|
117
132
|
};
|
|
@@ -122,10 +137,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
122
137
|
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => isRef(selectValue) ? selectValue.value = $event : selectValue = $event),
|
|
123
138
|
class: "bm-select"
|
|
124
139
|
}, _ctx.$attrs, {
|
|
140
|
+
class: { w200: !props.showSelectAll },
|
|
125
141
|
mode: "multiple",
|
|
126
142
|
placeholder: unref(instance)?.attrs.placeholder ? unref(instance)?.attrs.placeholder : "\u8BF7\u9009\u62E9",
|
|
127
143
|
"get-popup-container": (nodes) => nodes.parentNode,
|
|
128
|
-
onChange
|
|
144
|
+
onChange,
|
|
145
|
+
onSearch
|
|
129
146
|
}), {
|
|
130
147
|
dropdownRender: withCtx(({ menuNode: menu }) => [
|
|
131
148
|
createElementVNode("div", _hoisted_1, [
|
|
@@ -152,16 +169,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
152
169
|
_hoisted_6
|
|
153
170
|
], 40, _hoisted_5)
|
|
154
171
|
]),
|
|
155
|
-
|
|
172
|
+
__props.showSelectAll ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
156
173
|
createTextVNode(" \u5DF2\u9009\u62E9 "),
|
|
157
|
-
createElementVNode("span",
|
|
174
|
+
createElementVNode("span", _hoisted_8, toDisplayString(unref(selectValue)?.length || 0), 1),
|
|
158
175
|
createTextVNode(" \u9879 ")
|
|
159
|
-
])
|
|
176
|
+
])) : createCommentVNode("v-if", true)
|
|
160
177
|
]),
|
|
161
178
|
createVNode(VNodes, { vnodes: menu }, null, 8, ["vnodes"])
|
|
162
179
|
]),
|
|
163
180
|
_: 1
|
|
164
|
-
}, 16, ["value", "placeholder", "get-popup-container"]);
|
|
181
|
+
}, 16, ["value", "class", "placeholder", "get-popup-container"]);
|
|
165
182
|
};
|
|
166
183
|
}
|
|
167
184
|
});
|
|
@@ -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, {
|