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
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { notification, Modal
|
|
1
|
+
import { Button, notification, Modal } from 'ant-design-vue';
|
|
2
2
|
import { withInstall } from 'bm-admin-ui/es/utils/with-install';
|
|
3
3
|
import { h, nextTick, createVNode, defineComponent, computed, openBlock, createBlock, unref, withCtx, resolveDynamicComponent, renderSlot, useSlots, resolveComponent, createSlots, createElementVNode, createTextVNode } from 'vue';
|
|
4
4
|
import AAlert from 'ant-design-vue/lib/alert';
|
|
5
5
|
import AModal$1 from 'ant-design-vue/lib/modal';
|
|
6
6
|
import message from 'ant-design-vue/lib/message';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/*! *****************************************************************************
|
|
9
9
|
Copyright (c) Microsoft Corporation.
|
|
10
10
|
|
|
11
11
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -94,7 +94,7 @@ function boundAlpha(a) {
|
|
|
94
94
|
*/
|
|
95
95
|
function convertToPercentage(n) {
|
|
96
96
|
if (n <= 1) {
|
|
97
|
-
return
|
|
97
|
+
return Number(n) * 100 + "%";
|
|
98
98
|
}
|
|
99
99
|
return n;
|
|
100
100
|
}
|
|
@@ -476,12 +476,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
476
476
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
477
477
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
478
478
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
479
|
-
var CSS_UNIT = "(?:"
|
|
479
|
+
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
480
480
|
// Actual matching.
|
|
481
481
|
// Parentheses and commas are optional, but not required.
|
|
482
482
|
// Whitespace can take the place of commas or opening paren
|
|
483
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
484
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
483
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
484
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
485
485
|
var matchers = {
|
|
486
486
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
487
487
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -806,6 +806,19 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
806
806
|
});
|
|
807
807
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
808
808
|
});
|
|
809
|
+
presetPalettes.red;
|
|
810
|
+
presetPalettes.volcano;
|
|
811
|
+
presetPalettes.gold;
|
|
812
|
+
presetPalettes.orange;
|
|
813
|
+
presetPalettes.yellow;
|
|
814
|
+
presetPalettes.lime;
|
|
815
|
+
presetPalettes.green;
|
|
816
|
+
presetPalettes.cyan;
|
|
817
|
+
presetPalettes.blue;
|
|
818
|
+
presetPalettes.geekblue;
|
|
819
|
+
presetPalettes.purple;
|
|
820
|
+
presetPalettes.magenta;
|
|
821
|
+
presetPalettes.grey;
|
|
809
822
|
|
|
810
823
|
// https://github.com/substack/insert-css
|
|
811
824
|
var containers = []; // will store container HTMLElement references
|
|
@@ -234,9 +234,7 @@ const _sfc_main = {
|
|
|
234
234
|
if (state.floatHandleDomCol)
|
|
235
235
|
return;
|
|
236
236
|
let id = column.id;
|
|
237
|
-
state.floatHandleDomCol = floatTable.value.querySelector(
|
|
238
|
-
`.vxe-table--header-wrapper .vxe-header--row .${id}`
|
|
239
|
-
);
|
|
237
|
+
state.floatHandleDomCol = floatTable.value.querySelector(`.vxe-table--header-wrapper .vxe-header--row .${id}`);
|
|
240
238
|
},
|
|
241
239
|
leaveFloatTable() {
|
|
242
240
|
let timer = setTimeout(() => {
|
|
@@ -297,43 +295,36 @@ const _sfc_main = {
|
|
|
297
295
|
let closeSetRow;
|
|
298
296
|
let headerWrapper;
|
|
299
297
|
if (props.isNeedFloatHandle) {
|
|
300
|
-
inObserverDom = new IntersectionObserver(
|
|
301
|
-
(
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
inObserverDom.disconnect();
|
|
308
|
-
} else {
|
|
309
|
-
isHasOver = true;
|
|
310
|
-
}
|
|
311
|
-
state.isShowFloatHandle = false;
|
|
312
|
-
state.atVisible = true;
|
|
298
|
+
inObserverDom = new IntersectionObserver((entries) => {
|
|
299
|
+
entries.forEach((item) => {
|
|
300
|
+
if (item.intersectionRatio > 0.1) {
|
|
301
|
+
closeSetRow = closeSetRow || item.target.closest(".vxe-header--row");
|
|
302
|
+
headerWrapper = headerWrapper || item.target.closest(".vxe-table--header-wrapper");
|
|
303
|
+
if (closeSetRow.clientWidth <= headerWrapper.clientWidth && !isHasOver) {
|
|
304
|
+
inObserverDom.disconnect();
|
|
313
305
|
} else {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
306
|
+
isHasOver = true;
|
|
307
|
+
}
|
|
308
|
+
state.isShowFloatHandle = false;
|
|
309
|
+
state.atVisible = true;
|
|
310
|
+
} else {
|
|
311
|
+
if (gridOptions.value.data && gridOptions.value.data.length > 0) {
|
|
312
|
+
state.goAnimationEnd = false;
|
|
313
|
+
state.isShowFloatHandle = true;
|
|
314
|
+
state.atVisible = false;
|
|
319
315
|
}
|
|
320
|
-
});
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
threshold: 0.1
|
|
324
|
-
}
|
|
325
|
-
);
|
|
326
|
-
watch(
|
|
327
|
-
() => state.floatHandleDomCol,
|
|
328
|
-
function(col) {
|
|
329
|
-
if (col) {
|
|
330
|
-
inObserverDom.observe(col);
|
|
331
316
|
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
|
|
317
|
+
});
|
|
318
|
+
}, {
|
|
319
|
+
threshold: 0.1
|
|
320
|
+
});
|
|
321
|
+
watch(() => state.floatHandleDomCol, function(col) {
|
|
322
|
+
if (col) {
|
|
323
|
+
inObserverDom.observe(col);
|
|
335
324
|
}
|
|
336
|
-
|
|
325
|
+
}, {
|
|
326
|
+
immediate: true
|
|
327
|
+
});
|
|
337
328
|
}
|
|
338
329
|
return {
|
|
339
330
|
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;
|
|
@@ -67,7 +67,7 @@ function boundAlpha(a) {
|
|
|
67
67
|
*/
|
|
68
68
|
function convertToPercentage(n) {
|
|
69
69
|
if (n <= 1) {
|
|
70
|
-
return
|
|
70
|
+
return Number(n) * 100 + "%";
|
|
71
71
|
}
|
|
72
72
|
return n;
|
|
73
73
|
}
|
|
@@ -449,12 +449,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
449
449
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
450
450
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
451
451
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
452
|
-
var CSS_UNIT = "(?:"
|
|
452
|
+
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
453
453
|
// Actual matching.
|
|
454
454
|
// Parentheses and commas are optional, but not required.
|
|
455
455
|
// Whitespace can take the place of commas or opening paren
|
|
456
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
457
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
456
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
457
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
458
458
|
var matchers = {
|
|
459
459
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
460
460
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -779,6 +779,19 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
779
779
|
});
|
|
780
780
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
781
781
|
});
|
|
782
|
+
presetPalettes.red;
|
|
783
|
+
presetPalettes.volcano;
|
|
784
|
+
presetPalettes.gold;
|
|
785
|
+
presetPalettes.orange;
|
|
786
|
+
presetPalettes.yellow;
|
|
787
|
+
presetPalettes.lime;
|
|
788
|
+
presetPalettes.green;
|
|
789
|
+
presetPalettes.cyan;
|
|
790
|
+
presetPalettes.blue;
|
|
791
|
+
presetPalettes.geekblue;
|
|
792
|
+
presetPalettes.purple;
|
|
793
|
+
presetPalettes.magenta;
|
|
794
|
+
presetPalettes.grey;
|
|
782
795
|
|
|
783
796
|
// https://github.com/substack/insert-css
|
|
784
797
|
var containers = []; // will store container HTMLElement references
|
|
@@ -1134,6 +1147,9 @@ const _sfc_main = defineComponent({
|
|
|
1134
1147
|
type: Boolean,
|
|
1135
1148
|
default: false
|
|
1136
1149
|
},
|
|
1150
|
+
placeholder: {
|
|
1151
|
+
type: String
|
|
1152
|
+
},
|
|
1137
1153
|
showEmptyBtn: {
|
|
1138
1154
|
type: Boolean,
|
|
1139
1155
|
default: true
|
|
@@ -1157,9 +1173,7 @@ const _sfc_main = defineComponent({
|
|
|
1157
1173
|
emit("update:list", []);
|
|
1158
1174
|
emit("clear");
|
|
1159
1175
|
if (!props.showEmptyBtn && !props.showEmpty) {
|
|
1160
|
-
console.error(
|
|
1161
|
-
"\u4E0D\u5E94\u5C06showEmptyBtn\u4E0EshowEmpty\u90FD\u7F6E\u4E3Afalse,\u8282\u70B9\u5E76\u672A\u5B9E\u9645\u9500\u6BC1"
|
|
1162
|
-
);
|
|
1176
|
+
console.error("\u4E0D\u5E94\u5C06showEmptyBtn\u4E0EshowEmpty\u90FD\u7F6E\u4E3Afalse,\u8282\u70B9\u5E76\u672A\u5B9E\u9645\u9500\u6BC1");
|
|
1163
1177
|
}
|
|
1164
1178
|
}
|
|
1165
1179
|
function toAddTags() {
|
|
@@ -1267,7 +1281,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1267
1281
|
createElementVNode("div", {
|
|
1268
1282
|
class: "selector-empty-input",
|
|
1269
1283
|
onClick: _cache[4] || (_cache[4] = withModifiers((...args) => _ctx.toAddTags && _ctx.toAddTags(...args), ["stop"]))
|
|
1270
|
-
}, "\xA0")
|
|
1284
|
+
}, "\xA0\xA0" + toDisplayString(_ctx.placeholder), 1)
|
|
1271
1285
|
])) : createCommentVNode("v-if", true),
|
|
1272
1286
|
_hoisted_10
|
|
1273
1287
|
]);
|
|
@@ -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;
|
|
@@ -65,7 +65,7 @@ function boundAlpha(a) {
|
|
|
65
65
|
*/
|
|
66
66
|
function convertToPercentage(n) {
|
|
67
67
|
if (n <= 1) {
|
|
68
|
-
return
|
|
68
|
+
return Number(n) * 100 + "%";
|
|
69
69
|
}
|
|
70
70
|
return n;
|
|
71
71
|
}
|
|
@@ -447,12 +447,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
447
447
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
448
448
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
449
449
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
450
|
-
var CSS_UNIT = "(?:"
|
|
450
|
+
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
451
451
|
// Actual matching.
|
|
452
452
|
// Parentheses and commas are optional, but not required.
|
|
453
453
|
// Whitespace can take the place of commas or opening paren
|
|
454
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
455
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
454
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
455
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
456
456
|
var matchers = {
|
|
457
457
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
458
458
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -777,6 +777,19 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
777
777
|
});
|
|
778
778
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
779
779
|
});
|
|
780
|
+
presetPalettes.red;
|
|
781
|
+
presetPalettes.volcano;
|
|
782
|
+
presetPalettes.gold;
|
|
783
|
+
presetPalettes.orange;
|
|
784
|
+
presetPalettes.yellow;
|
|
785
|
+
presetPalettes.lime;
|
|
786
|
+
presetPalettes.green;
|
|
787
|
+
presetPalettes.cyan;
|
|
788
|
+
presetPalettes.blue;
|
|
789
|
+
presetPalettes.geekblue;
|
|
790
|
+
presetPalettes.purple;
|
|
791
|
+
presetPalettes.magenta;
|
|
792
|
+
presetPalettes.grey;
|
|
780
793
|
|
|
781
794
|
// https://github.com/substack/insert-css
|
|
782
795
|
var containers = []; // will store container HTMLElement references
|
|
@@ -1335,9 +1348,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1335
1348
|
tempRes.push({ checked: true });
|
|
1336
1349
|
} else {
|
|
1337
1350
|
let tempRes2 = tempChildren[j];
|
|
1338
|
-
let tempIndex2 = props.modelValue.indexOf(
|
|
1339
|
-
tempRes2[props.optionValueName]
|
|
1340
|
-
);
|
|
1351
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1341
1352
|
if (tempIndex2 !== -1) {
|
|
1342
1353
|
tempRes.push({ checked: true });
|
|
1343
1354
|
} else {
|
|
@@ -1363,9 +1374,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1363
1374
|
if (tempChildren) {
|
|
1364
1375
|
for (let j = 0; j < tempChildren.length; j++) {
|
|
1365
1376
|
let tempRes2 = tempChildren[j];
|
|
1366
|
-
let tempIndex2 = props.modelValue.indexOf(
|
|
1367
|
-
tempRes2[props.optionValueName]
|
|
1368
|
-
);
|
|
1377
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1369
1378
|
if (path.value[i] && tempRes2[props.optionValueName] === path.value[i][props.optionValueName] && tempIndex2 !== -1) {
|
|
1370
1379
|
parentChecked = true;
|
|
1371
1380
|
break;
|
|
@@ -1447,9 +1456,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1447
1456
|
checked.push(tempOption?.[props.optionValueName]);
|
|
1448
1457
|
if (tempOption?.children) {
|
|
1449
1458
|
let allSonValues = getAllSonValues(tempOption.children);
|
|
1450
|
-
allSonValues = allSonValues.filter(
|
|
1451
|
-
(item) => item !== tempOption?.[props.optionValueName]
|
|
1452
|
-
);
|
|
1459
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption?.[props.optionValueName]);
|
|
1453
1460
|
unChecked = unChecked.concat(allSonValues);
|
|
1454
1461
|
}
|
|
1455
1462
|
for (let i = level; i > 0; i--) {
|
|
@@ -1464,9 +1471,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1464
1471
|
checked.push(tempOption2[props.optionValueName]);
|
|
1465
1472
|
if (tempOption2.children) {
|
|
1466
1473
|
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1467
|
-
allSonValues = allSonValues.filter(
|
|
1468
|
-
(item) => item !== tempOption2[props.optionValueName]
|
|
1469
|
-
);
|
|
1474
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1470
1475
|
unChecked = unChecked.concat(allSonValues);
|
|
1471
1476
|
}
|
|
1472
1477
|
}
|
|
@@ -1492,9 +1497,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1492
1497
|
if (tempStatus.checked) {
|
|
1493
1498
|
checked = [];
|
|
1494
1499
|
} else {
|
|
1495
|
-
checked = modulersOptions.value[level].children?.map(
|
|
1496
|
-
(item) => item[props.optionValueName]
|
|
1497
|
-
) || [];
|
|
1500
|
+
checked = modulersOptions.value[level].children?.map((item) => item[props.optionValueName]) || [];
|
|
1498
1501
|
}
|
|
1499
1502
|
} else {
|
|
1500
1503
|
if (tempStatus.checked) {
|
|
@@ -1517,9 +1520,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1517
1520
|
checked.push(tempOption[props.optionValueName]);
|
|
1518
1521
|
if (tempOption.children) {
|
|
1519
1522
|
let allSonValues = getAllSonValues(tempOption.children);
|
|
1520
|
-
allSonValues = allSonValues.filter(
|
|
1521
|
-
(item) => item !== tempOption[props.optionValueName]
|
|
1522
|
-
);
|
|
1523
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption[props.optionValueName]);
|
|
1523
1524
|
unChecked = unChecked.concat(allSonValues);
|
|
1524
1525
|
}
|
|
1525
1526
|
for (let i = level; i > 0; i--) {
|
|
@@ -1534,9 +1535,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1534
1535
|
checked.push(tempOption2[props.optionValueName]);
|
|
1535
1536
|
if (tempOption2.children) {
|
|
1536
1537
|
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1537
|
-
allSonValues = allSonValues.filter(
|
|
1538
|
-
(item) => item !== tempOption2[props.optionValueName]
|
|
1539
|
-
);
|
|
1538
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1540
1539
|
unChecked = unChecked.concat(allSonValues);
|
|
1541
1540
|
}
|
|
1542
1541
|
}
|
|
@@ -1622,9 +1621,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1622
1621
|
return openBlock(), createElementBlock("div", {
|
|
1623
1622
|
key: index,
|
|
1624
1623
|
class: normalizeClass(["bm-multi-cascader-item", {
|
|
1625
|
-
"is-active": path.value.find(
|
|
1626
|
-
(item) => option[props.optionValueName] === item[props.optionValueName]
|
|
1627
|
-
)
|
|
1624
|
+
"is-active": path.value.find((item) => option[props.optionValueName] === item[props.optionValueName])
|
|
1628
1625
|
}]),
|
|
1629
1626
|
onClick: ($event) => handleClick(option, level, index)
|
|
1630
1627
|
}, [
|
|
@@ -39,19 +39,16 @@ const _sfc_main = {
|
|
|
39
39
|
isShow: false,
|
|
40
40
|
openShow: false
|
|
41
41
|
});
|
|
42
|
-
const observer = new IntersectionObserver(
|
|
43
|
-
(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
threshold: 0.3
|
|
53
|
-
}
|
|
54
|
-
);
|
|
42
|
+
const observer = new IntersectionObserver((entries) => {
|
|
43
|
+
entries.forEach((item) => {
|
|
44
|
+
if (item.intersectionRatio > 0.3) {
|
|
45
|
+
observerDom();
|
|
46
|
+
observer.disconnect();
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}, {
|
|
50
|
+
threshold: 0.3
|
|
51
|
+
});
|
|
55
52
|
function observerDom() {
|
|
56
53
|
if (props.line === 1) {
|
|
57
54
|
if (mySelf.value.scrollWidth > mySelf.value.clientWidth) {
|
|
@@ -67,20 +64,16 @@ const _sfc_main = {
|
|
|
67
64
|
observer.disconnect();
|
|
68
65
|
});
|
|
69
66
|
let mySelf = ref();
|
|
70
|
-
watch(
|
|
71
|
-
()
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
mySelf.value && observer.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{
|
|
81
|
-
immediate: true
|
|
82
|
-
}
|
|
83
|
-
);
|
|
67
|
+
watch(() => props.showAlways, function(showAlways) {
|
|
68
|
+
if (showAlways)
|
|
69
|
+
state.openShow = showAlways;
|
|
70
|
+
mySelf.value && observer.unobserve(mySelf.value);
|
|
71
|
+
nextTick(function() {
|
|
72
|
+
mySelf.value && observer.observe(mySelf.value);
|
|
73
|
+
});
|
|
74
|
+
}, {
|
|
75
|
+
immediate: true
|
|
76
|
+
});
|
|
84
77
|
const handleVisibleChange = (val) => {
|
|
85
78
|
state.isShow = !state.openShow ? false : val;
|
|
86
79
|
};
|
|
@@ -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;
|
|
@@ -66,7 +66,7 @@ function boundAlpha(a) {
|
|
|
66
66
|
*/
|
|
67
67
|
function convertToPercentage(n) {
|
|
68
68
|
if (n <= 1) {
|
|
69
|
-
return
|
|
69
|
+
return Number(n) * 100 + "%";
|
|
70
70
|
}
|
|
71
71
|
return n;
|
|
72
72
|
}
|
|
@@ -448,12 +448,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
448
448
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
449
449
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
450
450
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
451
|
-
var CSS_UNIT = "(?:"
|
|
451
|
+
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
452
452
|
// Actual matching.
|
|
453
453
|
// Parentheses and commas are optional, but not required.
|
|
454
454
|
// Whitespace can take the place of commas or opening paren
|
|
455
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
456
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
455
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
456
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
457
457
|
var matchers = {
|
|
458
458
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
459
459
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -778,6 +778,19 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
778
778
|
});
|
|
779
779
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
780
780
|
});
|
|
781
|
+
presetPalettes.red;
|
|
782
|
+
presetPalettes.volcano;
|
|
783
|
+
presetPalettes.gold;
|
|
784
|
+
presetPalettes.orange;
|
|
785
|
+
presetPalettes.yellow;
|
|
786
|
+
presetPalettes.lime;
|
|
787
|
+
presetPalettes.green;
|
|
788
|
+
presetPalettes.cyan;
|
|
789
|
+
presetPalettes.blue;
|
|
790
|
+
presetPalettes.geekblue;
|
|
791
|
+
presetPalettes.purple;
|
|
792
|
+
presetPalettes.magenta;
|
|
793
|
+
presetPalettes.grey;
|
|
781
794
|
|
|
782
795
|
// https://github.com/substack/insert-css
|
|
783
796
|
var containers = []; // will store container HTMLElement references
|
|
@@ -1277,7 +1290,6 @@ const _hoisted_2$1 = { class: "bm-search-filter-actions" };
|
|
|
1277
1290
|
const _hoisted_3$1 = /* @__PURE__ */ createTextVNode("\u91CD\u7F6E");
|
|
1278
1291
|
const _hoisted_4$1 = /* @__PURE__ */ createTextVNode("\u67E5\u8BE2");
|
|
1279
1292
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1280
|
-
__name: "search-reset-btn",
|
|
1281
1293
|
props: searchResetBtnProps,
|
|
1282
1294
|
emits: ["submit", "reset", "expand"],
|
|
1283
1295
|
setup(__props, { emit: emits }) {
|
|
@@ -1482,9 +1494,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1482
1494
|
tempRes.push({ checked: true });
|
|
1483
1495
|
} else {
|
|
1484
1496
|
let tempRes2 = tempChildren[j];
|
|
1485
|
-
let tempIndex2 = props.modelValue.indexOf(
|
|
1486
|
-
tempRes2[props.optionValueName]
|
|
1487
|
-
);
|
|
1497
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1488
1498
|
if (tempIndex2 !== -1) {
|
|
1489
1499
|
tempRes.push({ checked: true });
|
|
1490
1500
|
} else {
|
|
@@ -1510,9 +1520,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1510
1520
|
if (tempChildren) {
|
|
1511
1521
|
for (let j = 0; j < tempChildren.length; j++) {
|
|
1512
1522
|
let tempRes2 = tempChildren[j];
|
|
1513
|
-
let tempIndex2 = props.modelValue.indexOf(
|
|
1514
|
-
tempRes2[props.optionValueName]
|
|
1515
|
-
);
|
|
1523
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1516
1524
|
if (path.value[i] && tempRes2[props.optionValueName] === path.value[i][props.optionValueName] && tempIndex2 !== -1) {
|
|
1517
1525
|
parentChecked = true;
|
|
1518
1526
|
break;
|
|
@@ -1594,9 +1602,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1594
1602
|
checked.push(tempOption?.[props.optionValueName]);
|
|
1595
1603
|
if (tempOption?.children) {
|
|
1596
1604
|
let allSonValues = getAllSonValues(tempOption.children);
|
|
1597
|
-
allSonValues = allSonValues.filter(
|
|
1598
|
-
(item) => item !== tempOption?.[props.optionValueName]
|
|
1599
|
-
);
|
|
1605
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption?.[props.optionValueName]);
|
|
1600
1606
|
unChecked = unChecked.concat(allSonValues);
|
|
1601
1607
|
}
|
|
1602
1608
|
for (let i = level; i > 0; i--) {
|
|
@@ -1611,9 +1617,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1611
1617
|
checked.push(tempOption2[props.optionValueName]);
|
|
1612
1618
|
if (tempOption2.children) {
|
|
1613
1619
|
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1614
|
-
allSonValues = allSonValues.filter(
|
|
1615
|
-
(item) => item !== tempOption2[props.optionValueName]
|
|
1616
|
-
);
|
|
1620
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1617
1621
|
unChecked = unChecked.concat(allSonValues);
|
|
1618
1622
|
}
|
|
1619
1623
|
}
|
|
@@ -1639,9 +1643,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1639
1643
|
if (tempStatus.checked) {
|
|
1640
1644
|
checked = [];
|
|
1641
1645
|
} else {
|
|
1642
|
-
checked = modulersOptions.value[level].children?.map(
|
|
1643
|
-
(item) => item[props.optionValueName]
|
|
1644
|
-
) || [];
|
|
1646
|
+
checked = modulersOptions.value[level].children?.map((item) => item[props.optionValueName]) || [];
|
|
1645
1647
|
}
|
|
1646
1648
|
} else {
|
|
1647
1649
|
if (tempStatus.checked) {
|
|
@@ -1664,9 +1666,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1664
1666
|
checked.push(tempOption[props.optionValueName]);
|
|
1665
1667
|
if (tempOption.children) {
|
|
1666
1668
|
let allSonValues = getAllSonValues(tempOption.children);
|
|
1667
|
-
allSonValues = allSonValues.filter(
|
|
1668
|
-
(item) => item !== tempOption[props.optionValueName]
|
|
1669
|
-
);
|
|
1669
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption[props.optionValueName]);
|
|
1670
1670
|
unChecked = unChecked.concat(allSonValues);
|
|
1671
1671
|
}
|
|
1672
1672
|
for (let i = level; i > 0; i--) {
|
|
@@ -1681,9 +1681,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1681
1681
|
checked.push(tempOption2[props.optionValueName]);
|
|
1682
1682
|
if (tempOption2.children) {
|
|
1683
1683
|
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1684
|
-
allSonValues = allSonValues.filter(
|
|
1685
|
-
(item) => item !== tempOption2[props.optionValueName]
|
|
1686
|
-
);
|
|
1684
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1687
1685
|
unChecked = unChecked.concat(allSonValues);
|
|
1688
1686
|
}
|
|
1689
1687
|
}
|
|
@@ -1769,9 +1767,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1769
1767
|
return openBlock(), createElementBlock("div", {
|
|
1770
1768
|
key: index,
|
|
1771
1769
|
class: normalizeClass(["bm-multi-cascader-item", {
|
|
1772
|
-
"is-active": path.value.find(
|
|
1773
|
-
(item) => option[props.optionValueName] === item[props.optionValueName]
|
|
1774
|
-
)
|
|
1770
|
+
"is-active": path.value.find((item) => option[props.optionValueName] === item[props.optionValueName])
|
|
1775
1771
|
}]),
|
|
1776
1772
|
onClick: ($event) => handleClick(option, level, index)
|
|
1777
1773
|
}, [
|
|
@@ -1941,15 +1937,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1941
1937
|
onBeforeUnmount(() => {
|
|
1942
1938
|
window.removeEventListener("resize", handleResize);
|
|
1943
1939
|
});
|
|
1944
|
-
watch(
|
|
1945
|
-
()
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
{
|
|
1950
|
-
immediate: true
|
|
1951
|
-
}
|
|
1952
|
-
);
|
|
1940
|
+
watch(() => props.showExpandBtn, (val) => {
|
|
1941
|
+
handleShowExpandBtn(val);
|
|
1942
|
+
}, {
|
|
1943
|
+
immediate: true
|
|
1944
|
+
});
|
|
1953
1945
|
const expandRule = computed(() => {
|
|
1954
1946
|
const fixedCount = props.fixedCount && props.fixedCount >= 0 ? props.fixedCount : 0;
|
|
1955
1947
|
const fixedFields = props.fixedFields?.length ? props.fixedFields : [];
|
|
@@ -1968,15 +1960,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1968
1960
|
});
|
|
1969
1961
|
}
|
|
1970
1962
|
}
|
|
1971
|
-
watch(
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
{
|
|
1977
|
-
immediate: true
|
|
1978
|
-
}
|
|
1979
|
-
);
|
|
1963
|
+
watch(isExpand, (val) => {
|
|
1964
|
+
handleChangeExpand(val);
|
|
1965
|
+
}, {
|
|
1966
|
+
immediate: true
|
|
1967
|
+
});
|
|
1980
1968
|
expose({
|
|
1981
1969
|
fApi
|
|
1982
1970
|
});
|
|
@@ -1990,7 +1978,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1990
1978
|
"onUpdate:api": _cache[0] || (_cache[0] = ($event) => fApi.value = $event),
|
|
1991
1979
|
"model-value": props.value,
|
|
1992
1980
|
rule: unref(rule),
|
|
1993
|
-
option,
|
|
1981
|
+
option: unref(option),
|
|
1994
1982
|
onChange: handleChange
|
|
1995
1983
|
}, null, 8, ["api", "model-value", "rule", "option"])
|
|
1996
1984
|
], 2);
|