bm-admin-ui 1.0.15-alpha → 1.0.16-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/feedback/index.js +19 -6
- package/es/components/float-table/index.js +27 -36
- package/es/components/input-tags-display/index.d.ts +6 -0
- package/es/components/input-tags-display/index.js +22 -8
- package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +6 -0
- package/es/components/multi-cascader-compose/index.js +25 -28
- package/es/components/over-tooltips/index.js +20 -27
- package/es/components/search-filter/index.d.ts +3 -1
- package/es/components/search-filter/index.js +36 -48
- package/es/components/search-filter/src/search-filter.vue.d.ts +3 -1
- package/es/components/shops-filter/index.js +30 -23
- package/es/components/staffs-selector/index.js +97 -114
- package/es/components/timeline/index.js +6 -6
- package/es/components/upload/index.js +76 -86
- package/index.esm.js +1007 -37337
- package/index.js +1007 -37337
- package/lib/components/feedback/index.js +18 -5
- package/lib/components/float-table/index.js +27 -36
- package/lib/components/input-tags-display/index.d.ts +6 -0
- package/lib/components/input-tags-display/index.js +22 -8
- package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +6 -0
- package/lib/components/multi-cascader-compose/index.js +25 -28
- package/lib/components/over-tooltips/index.js +20 -27
- package/lib/components/search-filter/index.d.ts +3 -1
- package/lib/components/search-filter/index.js +36 -48
- package/lib/components/search-filter/src/search-filter.vue.d.ts +3 -1
- package/lib/components/shops-filter/index.js +30 -23
- package/lib/components/staffs-selector/index.js +97 -114
- package/lib/components/timeline/index.js +6 -6
- package/lib/components/upload/index.js +76 -86
- package/package.json +29 -29
- package/theme-chalk/button.css +1 -1
- package/theme-chalk/feedback.css +1 -1
- package/theme-chalk/float-table.css +1 -1
- package/theme-chalk/floating-vue.css +1 -1
- package/theme-chalk/flow-designer.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/input-tags-display.css +1 -1
- package/theme-chalk/modal.css +1 -1
- package/theme-chalk/multi-cascader-compose.css +1 -1
- package/theme-chalk/over-tooltips.css +1 -1
- package/theme-chalk/search-filter.css +1 -1
- package/theme-chalk/timeline.css +1 -1
- package/theme-chalk/upload.css +1 -1
- package/types/components/input-tags-display/index.d.ts +6 -0
- package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +6 -0
- package/types/components/search-filter/index.d.ts +3 -1
- package/types/components/search-filter/src/search-filter.vue.d.ts +3 -1
|
@@ -15,7 +15,7 @@ var AAlert__default = /*#__PURE__*/_interopDefaultLegacy(AAlert);
|
|
|
15
15
|
var AModal__default = /*#__PURE__*/_interopDefaultLegacy(AModal$1);
|
|
16
16
|
var message__default = /*#__PURE__*/_interopDefaultLegacy(message);
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
/*! *****************************************************************************
|
|
19
19
|
Copyright (c) Microsoft Corporation.
|
|
20
20
|
|
|
21
21
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -104,7 +104,7 @@ function boundAlpha(a) {
|
|
|
104
104
|
*/
|
|
105
105
|
function convertToPercentage(n) {
|
|
106
106
|
if (n <= 1) {
|
|
107
|
-
return
|
|
107
|
+
return Number(n) * 100 + "%";
|
|
108
108
|
}
|
|
109
109
|
return n;
|
|
110
110
|
}
|
|
@@ -486,12 +486,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
486
486
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
487
487
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
488
488
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
489
|
-
var CSS_UNIT = "(?:"
|
|
489
|
+
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
490
490
|
// Actual matching.
|
|
491
491
|
// Parentheses and commas are optional, but not required.
|
|
492
492
|
// Whitespace can take the place of commas or opening paren
|
|
493
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
494
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
493
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
494
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
495
495
|
var matchers = {
|
|
496
496
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
497
497
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -816,6 +816,19 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
816
816
|
});
|
|
817
817
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
818
818
|
});
|
|
819
|
+
presetPalettes.red;
|
|
820
|
+
presetPalettes.volcano;
|
|
821
|
+
presetPalettes.gold;
|
|
822
|
+
presetPalettes.orange;
|
|
823
|
+
presetPalettes.yellow;
|
|
824
|
+
presetPalettes.lime;
|
|
825
|
+
presetPalettes.green;
|
|
826
|
+
presetPalettes.cyan;
|
|
827
|
+
presetPalettes.blue;
|
|
828
|
+
presetPalettes.geekblue;
|
|
829
|
+
presetPalettes.purple;
|
|
830
|
+
presetPalettes.magenta;
|
|
831
|
+
presetPalettes.grey;
|
|
819
832
|
|
|
820
833
|
// https://github.com/substack/insert-css
|
|
821
834
|
var containers = []; // will store container HTMLElement references
|
|
@@ -238,9 +238,7 @@ const _sfc_main = {
|
|
|
238
238
|
if (state.floatHandleDomCol)
|
|
239
239
|
return;
|
|
240
240
|
let id = column.id;
|
|
241
|
-
state.floatHandleDomCol = floatTable.value.querySelector(
|
|
242
|
-
`.vxe-table--header-wrapper .vxe-header--row .${id}`
|
|
243
|
-
);
|
|
241
|
+
state.floatHandleDomCol = floatTable.value.querySelector(`.vxe-table--header-wrapper .vxe-header--row .${id}`);
|
|
244
242
|
},
|
|
245
243
|
leaveFloatTable() {
|
|
246
244
|
let timer = setTimeout(() => {
|
|
@@ -301,43 +299,36 @@ const _sfc_main = {
|
|
|
301
299
|
let closeSetRow;
|
|
302
300
|
let headerWrapper;
|
|
303
301
|
if (props.isNeedFloatHandle) {
|
|
304
|
-
inObserverDom = new IntersectionObserver(
|
|
305
|
-
(
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
inObserverDom.disconnect();
|
|
312
|
-
} else {
|
|
313
|
-
isHasOver = true;
|
|
314
|
-
}
|
|
315
|
-
state.isShowFloatHandle = false;
|
|
316
|
-
state.atVisible = true;
|
|
302
|
+
inObserverDom = new IntersectionObserver((entries) => {
|
|
303
|
+
entries.forEach((item) => {
|
|
304
|
+
if (item.intersectionRatio > 0.1) {
|
|
305
|
+
closeSetRow = closeSetRow || item.target.closest(".vxe-header--row");
|
|
306
|
+
headerWrapper = headerWrapper || item.target.closest(".vxe-table--header-wrapper");
|
|
307
|
+
if (closeSetRow.clientWidth <= headerWrapper.clientWidth && !isHasOver) {
|
|
308
|
+
inObserverDom.disconnect();
|
|
317
309
|
} else {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
310
|
+
isHasOver = true;
|
|
311
|
+
}
|
|
312
|
+
state.isShowFloatHandle = false;
|
|
313
|
+
state.atVisible = true;
|
|
314
|
+
} else {
|
|
315
|
+
if (gridOptions.value.data && gridOptions.value.data.length > 0) {
|
|
316
|
+
state.goAnimationEnd = false;
|
|
317
|
+
state.isShowFloatHandle = true;
|
|
318
|
+
state.atVisible = false;
|
|
323
319
|
}
|
|
324
|
-
});
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
threshold: 0.1
|
|
328
|
-
}
|
|
329
|
-
);
|
|
330
|
-
vue.watch(
|
|
331
|
-
() => state.floatHandleDomCol,
|
|
332
|
-
function(col) {
|
|
333
|
-
if (col) {
|
|
334
|
-
inObserverDom.observe(col);
|
|
335
320
|
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
|
|
321
|
+
});
|
|
322
|
+
}, {
|
|
323
|
+
threshold: 0.1
|
|
324
|
+
});
|
|
325
|
+
vue.watch(() => state.floatHandleDomCol, function(col) {
|
|
326
|
+
if (col) {
|
|
327
|
+
inObserverDom.observe(col);
|
|
339
328
|
}
|
|
340
|
-
|
|
329
|
+
}, {
|
|
330
|
+
immediate: true
|
|
331
|
+
});
|
|
341
332
|
}
|
|
342
333
|
return {
|
|
343
334
|
floatTable,
|
|
@@ -10,6 +10,9 @@ declare const BmTagsDisplay: import("bm-admin-ui/es/utils/with-install").SFCWith
|
|
|
10
10
|
type: BooleanConstructor;
|
|
11
11
|
default: boolean;
|
|
12
12
|
};
|
|
13
|
+
placeholder: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
13
16
|
showEmptyBtn: {
|
|
14
17
|
type: BooleanConstructor;
|
|
15
18
|
default: boolean;
|
|
@@ -39,6 +42,9 @@ declare const BmTagsDisplay: import("bm-admin-ui/es/utils/with-install").SFCWith
|
|
|
39
42
|
type: BooleanConstructor;
|
|
40
43
|
default: boolean;
|
|
41
44
|
};
|
|
45
|
+
placeholder: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
};
|
|
42
48
|
showEmptyBtn: {
|
|
43
49
|
type: BooleanConstructor;
|
|
44
50
|
default: boolean;
|
|
@@ -76,7 +76,7 @@ function boundAlpha(a) {
|
|
|
76
76
|
*/
|
|
77
77
|
function convertToPercentage(n) {
|
|
78
78
|
if (n <= 1) {
|
|
79
|
-
return
|
|
79
|
+
return Number(n) * 100 + "%";
|
|
80
80
|
}
|
|
81
81
|
return n;
|
|
82
82
|
}
|
|
@@ -458,12 +458,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
458
458
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
459
459
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
460
460
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
461
|
-
var CSS_UNIT = "(?:"
|
|
461
|
+
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
462
462
|
// Actual matching.
|
|
463
463
|
// Parentheses and commas are optional, but not required.
|
|
464
464
|
// Whitespace can take the place of commas or opening paren
|
|
465
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
466
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
465
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
466
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
467
467
|
var matchers = {
|
|
468
468
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
469
469
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -788,6 +788,19 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
788
788
|
});
|
|
789
789
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
790
790
|
});
|
|
791
|
+
presetPalettes.red;
|
|
792
|
+
presetPalettes.volcano;
|
|
793
|
+
presetPalettes.gold;
|
|
794
|
+
presetPalettes.orange;
|
|
795
|
+
presetPalettes.yellow;
|
|
796
|
+
presetPalettes.lime;
|
|
797
|
+
presetPalettes.green;
|
|
798
|
+
presetPalettes.cyan;
|
|
799
|
+
presetPalettes.blue;
|
|
800
|
+
presetPalettes.geekblue;
|
|
801
|
+
presetPalettes.purple;
|
|
802
|
+
presetPalettes.magenta;
|
|
803
|
+
presetPalettes.grey;
|
|
791
804
|
|
|
792
805
|
// https://github.com/substack/insert-css
|
|
793
806
|
var containers = []; // will store container HTMLElement references
|
|
@@ -1143,6 +1156,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
1143
1156
|
type: Boolean,
|
|
1144
1157
|
default: false
|
|
1145
1158
|
},
|
|
1159
|
+
placeholder: {
|
|
1160
|
+
type: String
|
|
1161
|
+
},
|
|
1146
1162
|
showEmptyBtn: {
|
|
1147
1163
|
type: Boolean,
|
|
1148
1164
|
default: true
|
|
@@ -1166,9 +1182,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
1166
1182
|
emit("update:list", []);
|
|
1167
1183
|
emit("clear");
|
|
1168
1184
|
if (!props.showEmptyBtn && !props.showEmpty) {
|
|
1169
|
-
console.error(
|
|
1170
|
-
"\u4E0D\u5E94\u5C06showEmptyBtn\u4E0EshowEmpty\u90FD\u7F6E\u4E3Afalse,\u8282\u70B9\u5E76\u672A\u5B9E\u9645\u9500\u6BC1"
|
|
1171
|
-
);
|
|
1185
|
+
console.error("\u4E0D\u5E94\u5C06showEmptyBtn\u4E0EshowEmpty\u90FD\u7F6E\u4E3Afalse,\u8282\u70B9\u5E76\u672A\u5B9E\u9645\u9500\u6BC1");
|
|
1172
1186
|
}
|
|
1173
1187
|
}
|
|
1174
1188
|
function toAddTags() {
|
|
@@ -1276,7 +1290,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1276
1290
|
vue.createElementVNode("div", {
|
|
1277
1291
|
class: "selector-empty-input",
|
|
1278
1292
|
onClick: _cache[4] || (_cache[4] = vue.withModifiers((...args) => _ctx.toAddTags && _ctx.toAddTags(...args), ["stop"]))
|
|
1279
|
-
}, "\xA0")
|
|
1293
|
+
}, "\xA0\xA0" + vue.toDisplayString(_ctx.placeholder), 1)
|
|
1280
1294
|
])) : vue.createCommentVNode("v-if", true),
|
|
1281
1295
|
_hoisted_10
|
|
1282
1296
|
]);
|
|
@@ -11,6 +11,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
type: BooleanConstructor;
|
|
12
12
|
default: boolean;
|
|
13
13
|
};
|
|
14
|
+
placeholder: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
};
|
|
14
17
|
showEmptyBtn: {
|
|
15
18
|
type: BooleanConstructor;
|
|
16
19
|
default: boolean;
|
|
@@ -37,6 +40,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
40
|
type: BooleanConstructor;
|
|
38
41
|
default: boolean;
|
|
39
42
|
};
|
|
43
|
+
placeholder: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
};
|
|
40
46
|
showEmptyBtn: {
|
|
41
47
|
type: BooleanConstructor;
|
|
42
48
|
default: boolean;
|
|
@@ -69,7 +69,7 @@ function boundAlpha(a) {
|
|
|
69
69
|
*/
|
|
70
70
|
function convertToPercentage(n) {
|
|
71
71
|
if (n <= 1) {
|
|
72
|
-
return
|
|
72
|
+
return Number(n) * 100 + "%";
|
|
73
73
|
}
|
|
74
74
|
return n;
|
|
75
75
|
}
|
|
@@ -451,12 +451,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
451
451
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
452
452
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
453
453
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
454
|
-
var CSS_UNIT = "(?:"
|
|
454
|
+
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
455
455
|
// Actual matching.
|
|
456
456
|
// Parentheses and commas are optional, but not required.
|
|
457
457
|
// Whitespace can take the place of commas or opening paren
|
|
458
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
459
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
458
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
459
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
460
460
|
var matchers = {
|
|
461
461
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
462
462
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -781,6 +781,19 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
781
781
|
});
|
|
782
782
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
783
783
|
});
|
|
784
|
+
presetPalettes.red;
|
|
785
|
+
presetPalettes.volcano;
|
|
786
|
+
presetPalettes.gold;
|
|
787
|
+
presetPalettes.orange;
|
|
788
|
+
presetPalettes.yellow;
|
|
789
|
+
presetPalettes.lime;
|
|
790
|
+
presetPalettes.green;
|
|
791
|
+
presetPalettes.cyan;
|
|
792
|
+
presetPalettes.blue;
|
|
793
|
+
presetPalettes.geekblue;
|
|
794
|
+
presetPalettes.purple;
|
|
795
|
+
presetPalettes.magenta;
|
|
796
|
+
presetPalettes.grey;
|
|
784
797
|
|
|
785
798
|
// https://github.com/substack/insert-css
|
|
786
799
|
var containers = []; // will store container HTMLElement references
|
|
@@ -1339,9 +1352,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1339
1352
|
tempRes.push({ checked: true });
|
|
1340
1353
|
} else {
|
|
1341
1354
|
let tempRes2 = tempChildren[j];
|
|
1342
|
-
let tempIndex2 = props.modelValue.indexOf(
|
|
1343
|
-
tempRes2[props.optionValueName]
|
|
1344
|
-
);
|
|
1355
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1345
1356
|
if (tempIndex2 !== -1) {
|
|
1346
1357
|
tempRes.push({ checked: true });
|
|
1347
1358
|
} else {
|
|
@@ -1367,9 +1378,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1367
1378
|
if (tempChildren) {
|
|
1368
1379
|
for (let j = 0; j < tempChildren.length; j++) {
|
|
1369
1380
|
let tempRes2 = tempChildren[j];
|
|
1370
|
-
let tempIndex2 = props.modelValue.indexOf(
|
|
1371
|
-
tempRes2[props.optionValueName]
|
|
1372
|
-
);
|
|
1381
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1373
1382
|
if (path.value[i] && tempRes2[props.optionValueName] === path.value[i][props.optionValueName] && tempIndex2 !== -1) {
|
|
1374
1383
|
parentChecked = true;
|
|
1375
1384
|
break;
|
|
@@ -1451,9 +1460,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1451
1460
|
checked.push(tempOption?.[props.optionValueName]);
|
|
1452
1461
|
if (tempOption?.children) {
|
|
1453
1462
|
let allSonValues = getAllSonValues(tempOption.children);
|
|
1454
|
-
allSonValues = allSonValues.filter(
|
|
1455
|
-
(item) => item !== tempOption?.[props.optionValueName]
|
|
1456
|
-
);
|
|
1463
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption?.[props.optionValueName]);
|
|
1457
1464
|
unChecked = unChecked.concat(allSonValues);
|
|
1458
1465
|
}
|
|
1459
1466
|
for (let i = level; i > 0; i--) {
|
|
@@ -1468,9 +1475,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1468
1475
|
checked.push(tempOption2[props.optionValueName]);
|
|
1469
1476
|
if (tempOption2.children) {
|
|
1470
1477
|
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1471
|
-
allSonValues = allSonValues.filter(
|
|
1472
|
-
(item) => item !== tempOption2[props.optionValueName]
|
|
1473
|
-
);
|
|
1478
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1474
1479
|
unChecked = unChecked.concat(allSonValues);
|
|
1475
1480
|
}
|
|
1476
1481
|
}
|
|
@@ -1496,9 +1501,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1496
1501
|
if (tempStatus.checked) {
|
|
1497
1502
|
checked = [];
|
|
1498
1503
|
} else {
|
|
1499
|
-
checked = modulersOptions.value[level].children?.map(
|
|
1500
|
-
(item) => item[props.optionValueName]
|
|
1501
|
-
) || [];
|
|
1504
|
+
checked = modulersOptions.value[level].children?.map((item) => item[props.optionValueName]) || [];
|
|
1502
1505
|
}
|
|
1503
1506
|
} else {
|
|
1504
1507
|
if (tempStatus.checked) {
|
|
@@ -1521,9 +1524,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1521
1524
|
checked.push(tempOption[props.optionValueName]);
|
|
1522
1525
|
if (tempOption.children) {
|
|
1523
1526
|
let allSonValues = getAllSonValues(tempOption.children);
|
|
1524
|
-
allSonValues = allSonValues.filter(
|
|
1525
|
-
(item) => item !== tempOption[props.optionValueName]
|
|
1526
|
-
);
|
|
1527
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption[props.optionValueName]);
|
|
1527
1528
|
unChecked = unChecked.concat(allSonValues);
|
|
1528
1529
|
}
|
|
1529
1530
|
for (let i = level; i > 0; i--) {
|
|
@@ -1538,9 +1539,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1538
1539
|
checked.push(tempOption2[props.optionValueName]);
|
|
1539
1540
|
if (tempOption2.children) {
|
|
1540
1541
|
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1541
|
-
allSonValues = allSonValues.filter(
|
|
1542
|
-
(item) => item !== tempOption2[props.optionValueName]
|
|
1543
|
-
);
|
|
1542
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1544
1543
|
unChecked = unChecked.concat(allSonValues);
|
|
1545
1544
|
}
|
|
1546
1545
|
}
|
|
@@ -1626,9 +1625,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1626
1625
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1627
1626
|
key: index,
|
|
1628
1627
|
class: vue.normalizeClass(["bm-multi-cascader-item", {
|
|
1629
|
-
"is-active": path.value.find(
|
|
1630
|
-
(item) => option[props.optionValueName] === item[props.optionValueName]
|
|
1631
|
-
)
|
|
1628
|
+
"is-active": path.value.find((item) => option[props.optionValueName] === item[props.optionValueName])
|
|
1632
1629
|
}]),
|
|
1633
1630
|
onClick: ($event) => handleClick(option, level, index)
|
|
1634
1631
|
}, [
|
|
@@ -43,19 +43,16 @@ const _sfc_main = {
|
|
|
43
43
|
isShow: false,
|
|
44
44
|
openShow: false
|
|
45
45
|
});
|
|
46
|
-
const observer = new IntersectionObserver(
|
|
47
|
-
(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
threshold: 0.3
|
|
57
|
-
}
|
|
58
|
-
);
|
|
46
|
+
const observer = new IntersectionObserver((entries) => {
|
|
47
|
+
entries.forEach((item) => {
|
|
48
|
+
if (item.intersectionRatio > 0.3) {
|
|
49
|
+
observerDom();
|
|
50
|
+
observer.disconnect();
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}, {
|
|
54
|
+
threshold: 0.3
|
|
55
|
+
});
|
|
59
56
|
function observerDom() {
|
|
60
57
|
if (props.line === 1) {
|
|
61
58
|
if (mySelf.value.scrollWidth > mySelf.value.clientWidth) {
|
|
@@ -71,20 +68,16 @@ const _sfc_main = {
|
|
|
71
68
|
observer.disconnect();
|
|
72
69
|
});
|
|
73
70
|
let mySelf = vue.ref();
|
|
74
|
-
vue.watch(
|
|
75
|
-
()
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
mySelf.value && observer.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
{
|
|
85
|
-
immediate: true
|
|
86
|
-
}
|
|
87
|
-
);
|
|
71
|
+
vue.watch(() => props.showAlways, function(showAlways) {
|
|
72
|
+
if (showAlways)
|
|
73
|
+
state.openShow = showAlways;
|
|
74
|
+
mySelf.value && observer.unobserve(mySelf.value);
|
|
75
|
+
vue.nextTick(function() {
|
|
76
|
+
mySelf.value && observer.observe(mySelf.value);
|
|
77
|
+
});
|
|
78
|
+
}, {
|
|
79
|
+
immediate: true
|
|
80
|
+
});
|
|
88
81
|
const handleVisibleChange = (val) => {
|
|
89
82
|
state.isShow = !state.openShow ? false : val;
|
|
90
83
|
};
|
|
@@ -114,7 +114,9 @@ declare const BmSearchFilter: import("bm-admin-ui/es/utils/with-install").SFCWit
|
|
|
114
114
|
gutter: unknown[];
|
|
115
115
|
};
|
|
116
116
|
form: {
|
|
117
|
-
labelCol:
|
|
117
|
+
labelCol: {
|
|
118
|
+
[x: string]: any;
|
|
119
|
+
};
|
|
118
120
|
labelAlign: string;
|
|
119
121
|
wrapperCol: {
|
|
120
122
|
span: number;
|
|
@@ -74,7 +74,7 @@ function boundAlpha(a) {
|
|
|
74
74
|
*/
|
|
75
75
|
function convertToPercentage(n) {
|
|
76
76
|
if (n <= 1) {
|
|
77
|
-
return
|
|
77
|
+
return Number(n) * 100 + "%";
|
|
78
78
|
}
|
|
79
79
|
return n;
|
|
80
80
|
}
|
|
@@ -456,12 +456,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
456
456
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
457
457
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
458
458
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
459
|
-
var CSS_UNIT = "(?:"
|
|
459
|
+
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
460
460
|
// Actual matching.
|
|
461
461
|
// Parentheses and commas are optional, but not required.
|
|
462
462
|
// Whitespace can take the place of commas or opening paren
|
|
463
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
464
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
463
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
464
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
465
465
|
var matchers = {
|
|
466
466
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
467
467
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -786,6 +786,19 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
786
786
|
});
|
|
787
787
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
788
788
|
});
|
|
789
|
+
presetPalettes.red;
|
|
790
|
+
presetPalettes.volcano;
|
|
791
|
+
presetPalettes.gold;
|
|
792
|
+
presetPalettes.orange;
|
|
793
|
+
presetPalettes.yellow;
|
|
794
|
+
presetPalettes.lime;
|
|
795
|
+
presetPalettes.green;
|
|
796
|
+
presetPalettes.cyan;
|
|
797
|
+
presetPalettes.blue;
|
|
798
|
+
presetPalettes.geekblue;
|
|
799
|
+
presetPalettes.purple;
|
|
800
|
+
presetPalettes.magenta;
|
|
801
|
+
presetPalettes.grey;
|
|
789
802
|
|
|
790
803
|
// https://github.com/substack/insert-css
|
|
791
804
|
var containers = []; // will store container HTMLElement references
|
|
@@ -1285,7 +1298,6 @@ const _hoisted_2$1 = { class: "bm-search-filter-actions" };
|
|
|
1285
1298
|
const _hoisted_3$1 = /* @__PURE__ */ vue.createTextVNode("\u91CD\u7F6E");
|
|
1286
1299
|
const _hoisted_4$1 = /* @__PURE__ */ vue.createTextVNode("\u67E5\u8BE2");
|
|
1287
1300
|
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
1288
|
-
__name: "search-reset-btn",
|
|
1289
1301
|
props: searchResetBtnProps,
|
|
1290
1302
|
emits: ["submit", "reset", "expand"],
|
|
1291
1303
|
setup(__props, { emit: emits }) {
|
|
@@ -1490,9 +1502,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1490
1502
|
tempRes.push({ checked: true });
|
|
1491
1503
|
} else {
|
|
1492
1504
|
let tempRes2 = tempChildren[j];
|
|
1493
|
-
let tempIndex2 = props.modelValue.indexOf(
|
|
1494
|
-
tempRes2[props.optionValueName]
|
|
1495
|
-
);
|
|
1505
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1496
1506
|
if (tempIndex2 !== -1) {
|
|
1497
1507
|
tempRes.push({ checked: true });
|
|
1498
1508
|
} else {
|
|
@@ -1518,9 +1528,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1518
1528
|
if (tempChildren) {
|
|
1519
1529
|
for (let j = 0; j < tempChildren.length; j++) {
|
|
1520
1530
|
let tempRes2 = tempChildren[j];
|
|
1521
|
-
let tempIndex2 = props.modelValue.indexOf(
|
|
1522
|
-
tempRes2[props.optionValueName]
|
|
1523
|
-
);
|
|
1531
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1524
1532
|
if (path.value[i] && tempRes2[props.optionValueName] === path.value[i][props.optionValueName] && tempIndex2 !== -1) {
|
|
1525
1533
|
parentChecked = true;
|
|
1526
1534
|
break;
|
|
@@ -1602,9 +1610,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1602
1610
|
checked.push(tempOption?.[props.optionValueName]);
|
|
1603
1611
|
if (tempOption?.children) {
|
|
1604
1612
|
let allSonValues = getAllSonValues(tempOption.children);
|
|
1605
|
-
allSonValues = allSonValues.filter(
|
|
1606
|
-
(item) => item !== tempOption?.[props.optionValueName]
|
|
1607
|
-
);
|
|
1613
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption?.[props.optionValueName]);
|
|
1608
1614
|
unChecked = unChecked.concat(allSonValues);
|
|
1609
1615
|
}
|
|
1610
1616
|
for (let i = level; i > 0; i--) {
|
|
@@ -1619,9 +1625,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1619
1625
|
checked.push(tempOption2[props.optionValueName]);
|
|
1620
1626
|
if (tempOption2.children) {
|
|
1621
1627
|
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1622
|
-
allSonValues = allSonValues.filter(
|
|
1623
|
-
(item) => item !== tempOption2[props.optionValueName]
|
|
1624
|
-
);
|
|
1628
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1625
1629
|
unChecked = unChecked.concat(allSonValues);
|
|
1626
1630
|
}
|
|
1627
1631
|
}
|
|
@@ -1647,9 +1651,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1647
1651
|
if (tempStatus.checked) {
|
|
1648
1652
|
checked = [];
|
|
1649
1653
|
} else {
|
|
1650
|
-
checked = modulersOptions.value[level].children?.map(
|
|
1651
|
-
(item) => item[props.optionValueName]
|
|
1652
|
-
) || [];
|
|
1654
|
+
checked = modulersOptions.value[level].children?.map((item) => item[props.optionValueName]) || [];
|
|
1653
1655
|
}
|
|
1654
1656
|
} else {
|
|
1655
1657
|
if (tempStatus.checked) {
|
|
@@ -1672,9 +1674,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1672
1674
|
checked.push(tempOption[props.optionValueName]);
|
|
1673
1675
|
if (tempOption.children) {
|
|
1674
1676
|
let allSonValues = getAllSonValues(tempOption.children);
|
|
1675
|
-
allSonValues = allSonValues.filter(
|
|
1676
|
-
(item) => item !== tempOption[props.optionValueName]
|
|
1677
|
-
);
|
|
1677
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption[props.optionValueName]);
|
|
1678
1678
|
unChecked = unChecked.concat(allSonValues);
|
|
1679
1679
|
}
|
|
1680
1680
|
for (let i = level; i > 0; i--) {
|
|
@@ -1689,9 +1689,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1689
1689
|
checked.push(tempOption2[props.optionValueName]);
|
|
1690
1690
|
if (tempOption2.children) {
|
|
1691
1691
|
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1692
|
-
allSonValues = allSonValues.filter(
|
|
1693
|
-
(item) => item !== tempOption2[props.optionValueName]
|
|
1694
|
-
);
|
|
1692
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1695
1693
|
unChecked = unChecked.concat(allSonValues);
|
|
1696
1694
|
}
|
|
1697
1695
|
}
|
|
@@ -1777,9 +1775,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1777
1775
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1778
1776
|
key: index,
|
|
1779
1777
|
class: vue.normalizeClass(["bm-multi-cascader-item", {
|
|
1780
|
-
"is-active": path.value.find(
|
|
1781
|
-
(item) => option[props.optionValueName] === item[props.optionValueName]
|
|
1782
|
-
)
|
|
1778
|
+
"is-active": path.value.find((item) => option[props.optionValueName] === item[props.optionValueName])
|
|
1783
1779
|
}]),
|
|
1784
1780
|
onClick: ($event) => handleClick(option, level, index)
|
|
1785
1781
|
}, [
|
|
@@ -1949,15 +1945,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1949
1945
|
vue.onBeforeUnmount(() => {
|
|
1950
1946
|
window.removeEventListener("resize", handleResize);
|
|
1951
1947
|
});
|
|
1952
|
-
vue.watch(
|
|
1953
|
-
()
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
{
|
|
1958
|
-
immediate: true
|
|
1959
|
-
}
|
|
1960
|
-
);
|
|
1948
|
+
vue.watch(() => props.showExpandBtn, (val) => {
|
|
1949
|
+
handleShowExpandBtn(val);
|
|
1950
|
+
}, {
|
|
1951
|
+
immediate: true
|
|
1952
|
+
});
|
|
1961
1953
|
const expandRule = vue.computed(() => {
|
|
1962
1954
|
const fixedCount = props.fixedCount && props.fixedCount >= 0 ? props.fixedCount : 0;
|
|
1963
1955
|
const fixedFields = props.fixedFields?.length ? props.fixedFields : [];
|
|
@@ -1976,15 +1968,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1976
1968
|
});
|
|
1977
1969
|
}
|
|
1978
1970
|
}
|
|
1979
|
-
vue.watch(
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
{
|
|
1985
|
-
immediate: true
|
|
1986
|
-
}
|
|
1987
|
-
);
|
|
1971
|
+
vue.watch(isExpand, (val) => {
|
|
1972
|
+
handleChangeExpand(val);
|
|
1973
|
+
}, {
|
|
1974
|
+
immediate: true
|
|
1975
|
+
});
|
|
1988
1976
|
expose({
|
|
1989
1977
|
fApi
|
|
1990
1978
|
});
|
|
@@ -1998,7 +1986,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1998
1986
|
"onUpdate:api": _cache[0] || (_cache[0] = ($event) => fApi.value = $event),
|
|
1999
1987
|
"model-value": props.value,
|
|
2000
1988
|
rule: vue.unref(rule),
|
|
2001
|
-
option,
|
|
1989
|
+
option: vue.unref(option),
|
|
2002
1990
|
onChange: handleChange
|
|
2003
1991
|
}, null, 8, ["api", "model-value", "rule", "option"])
|
|
2004
1992
|
], 2);
|