bm-admin-ui 1.0.13-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 -9
- package/es/components/input-tags-display/index.js +54 -47
- package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +6 -9
- 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 +1049 -37384
- package/index.js +1049 -37384
- 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 -9
- package/lib/components/input-tags-display/index.js +54 -47
- package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +6 -9
- 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 -9
- package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +6 -9
- package/types/components/search-filter/index.d.ts +3 -1
- package/types/components/search-filter/src/search-filter.vue.d.ts +3 -1
|
@@ -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);
|
|
@@ -70,7 +70,7 @@ function boundAlpha(a) {
|
|
|
70
70
|
*/
|
|
71
71
|
function convertToPercentage(n) {
|
|
72
72
|
if (n <= 1) {
|
|
73
|
-
return
|
|
73
|
+
return Number(n) * 100 + "%";
|
|
74
74
|
}
|
|
75
75
|
return n;
|
|
76
76
|
}
|
|
@@ -452,12 +452,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
452
452
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
453
453
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
454
454
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
455
|
-
var CSS_UNIT = "(?:"
|
|
455
|
+
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
456
456
|
// Actual matching.
|
|
457
457
|
// Parentheses and commas are optional, but not required.
|
|
458
458
|
// Whitespace can take the place of commas or opening paren
|
|
459
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
460
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
459
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
460
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
461
461
|
var matchers = {
|
|
462
462
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
463
463
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -782,6 +782,19 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
782
782
|
});
|
|
783
783
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
784
784
|
});
|
|
785
|
+
presetPalettes.red;
|
|
786
|
+
presetPalettes.volcano;
|
|
787
|
+
presetPalettes.gold;
|
|
788
|
+
presetPalettes.orange;
|
|
789
|
+
presetPalettes.yellow;
|
|
790
|
+
presetPalettes.lime;
|
|
791
|
+
presetPalettes.green;
|
|
792
|
+
presetPalettes.cyan;
|
|
793
|
+
presetPalettes.blue;
|
|
794
|
+
presetPalettes.geekblue;
|
|
795
|
+
presetPalettes.purple;
|
|
796
|
+
presetPalettes.magenta;
|
|
797
|
+
presetPalettes.grey;
|
|
785
798
|
|
|
786
799
|
// https://github.com/substack/insert-css
|
|
787
800
|
var containers = []; // will store container HTMLElement references
|
|
@@ -1326,28 +1339,22 @@ const _sfc_main = defineComponent({
|
|
|
1326
1339
|
};
|
|
1327
1340
|
props.loadFilter().then((data) => {
|
|
1328
1341
|
state.filterArr = data;
|
|
1329
|
-
state.filterSelects = state.filterArr.map(
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
}
|
|
1333
|
-
);
|
|
1342
|
+
state.filterSelects = state.filterArr.map((item) => {
|
|
1343
|
+
return item.multiple ? [] : "";
|
|
1344
|
+
});
|
|
1334
1345
|
}).finally(() => {
|
|
1335
1346
|
methods.fetchData();
|
|
1336
1347
|
});
|
|
1337
|
-
watch(
|
|
1338
|
-
|
|
1339
|
-
()
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
methods.checkboxChange();
|
|
1348
|
-
},
|
|
1349
|
-
{ deep: true }
|
|
1350
|
-
);
|
|
1348
|
+
watch(() => state.shopCheck, () => {
|
|
1349
|
+
let list = [];
|
|
1350
|
+
for (let [key, value] of Object.entries(state.shopCheck)) {
|
|
1351
|
+
value && list.push(key);
|
|
1352
|
+
}
|
|
1353
|
+
state.selected = list;
|
|
1354
|
+
emit("update:selected", list);
|
|
1355
|
+
emit("change", list);
|
|
1356
|
+
methods.checkboxChange();
|
|
1357
|
+
}, { deep: true });
|
|
1351
1358
|
if (props.showAlways) {
|
|
1352
1359
|
state.isActive = true;
|
|
1353
1360
|
}
|
|
@@ -71,7 +71,7 @@ function boundAlpha(a) {
|
|
|
71
71
|
*/
|
|
72
72
|
function convertToPercentage(n) {
|
|
73
73
|
if (n <= 1) {
|
|
74
|
-
return
|
|
74
|
+
return Number(n) * 100 + "%";
|
|
75
75
|
}
|
|
76
76
|
return n;
|
|
77
77
|
}
|
|
@@ -453,12 +453,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
453
453
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
454
454
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
455
455
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
456
|
-
var CSS_UNIT = "(?:"
|
|
456
|
+
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
457
457
|
// Actual matching.
|
|
458
458
|
// Parentheses and commas are optional, but not required.
|
|
459
459
|
// Whitespace can take the place of commas or opening paren
|
|
460
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
461
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
460
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
461
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
462
462
|
var matchers = {
|
|
463
463
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
464
464
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -783,6 +783,19 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
783
783
|
});
|
|
784
784
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
785
785
|
});
|
|
786
|
+
presetPalettes.red;
|
|
787
|
+
presetPalettes.volcano;
|
|
788
|
+
presetPalettes.gold;
|
|
789
|
+
presetPalettes.orange;
|
|
790
|
+
presetPalettes.yellow;
|
|
791
|
+
presetPalettes.lime;
|
|
792
|
+
presetPalettes.green;
|
|
793
|
+
presetPalettes.cyan;
|
|
794
|
+
presetPalettes.blue;
|
|
795
|
+
presetPalettes.geekblue;
|
|
796
|
+
presetPalettes.purple;
|
|
797
|
+
presetPalettes.magenta;
|
|
798
|
+
presetPalettes.grey;
|
|
786
799
|
|
|
787
800
|
// https://github.com/substack/insert-css
|
|
788
801
|
var containers = []; // will store container HTMLElement references
|
|
@@ -1247,50 +1260,39 @@ const _sfc_main$3 = defineComponent({
|
|
|
1247
1260
|
return data ? data.title : "\u672A\u77E5";
|
|
1248
1261
|
}
|
|
1249
1262
|
};
|
|
1250
|
-
watch(
|
|
1251
|
-
|
|
1252
|
-
()
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
()
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
let curlistKeys = props.curlistKeys;
|
|
1271
|
-
let hadselected = new Set(props.selected);
|
|
1272
|
-
let curselect = new Set(state.departmentChecked);
|
|
1273
|
-
for (let key of hadselected) {
|
|
1274
|
-
if (curlistKeys.has(key) && (!curselect.has(key) || curselect.has(key) && curselect.has(flatMap.get(key)["parent"]))) {
|
|
1275
|
-
hadselected.delete(key);
|
|
1276
|
-
}
|
|
1263
|
+
watch(() => state.listChecked, () => {
|
|
1264
|
+
let list = [];
|
|
1265
|
+
for (let [key, value] of Object.entries(state.listChecked)) {
|
|
1266
|
+
value && list.push(key);
|
|
1267
|
+
}
|
|
1268
|
+
if (props.limit > 0 && list.length >= props.limit)
|
|
1269
|
+
state.isFulfill = true;
|
|
1270
|
+
else
|
|
1271
|
+
state.isFulfill = false;
|
|
1272
|
+
methods.setState();
|
|
1273
|
+
emit("update:selected", list);
|
|
1274
|
+
}, { deep: true });
|
|
1275
|
+
watch(() => state.departmentChecked, () => {
|
|
1276
|
+
let flatMap = props.dataMap;
|
|
1277
|
+
let curlistKeys = props.curlistKeys;
|
|
1278
|
+
let hadselected = new Set(props.selected);
|
|
1279
|
+
let curselect = new Set(state.departmentChecked);
|
|
1280
|
+
for (let key of hadselected) {
|
|
1281
|
+
if (curlistKeys.has(key) && (!curselect.has(key) || curselect.has(key) && curselect.has(flatMap.get(key)["parent"]))) {
|
|
1282
|
+
hadselected.delete(key);
|
|
1277
1283
|
}
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1284
|
+
}
|
|
1285
|
+
for (let key of curselect) {
|
|
1286
|
+
let obj = flatMap.get(key);
|
|
1287
|
+
if (obj && !curselect.has(obj["parent"])) {
|
|
1288
|
+
hadselected.add(key);
|
|
1283
1289
|
}
|
|
1284
|
-
emit("update:selected", Array.from(hadselected));
|
|
1285
|
-
},
|
|
1286
|
-
{ deep: true }
|
|
1287
|
-
);
|
|
1288
|
-
watch(
|
|
1289
|
-
() => props.list,
|
|
1290
|
-
() => {
|
|
1291
|
-
!props.isTree && methods.setState();
|
|
1292
1290
|
}
|
|
1293
|
-
|
|
1291
|
+
emit("update:selected", Array.from(hadselected));
|
|
1292
|
+
}, { deep: true });
|
|
1293
|
+
watch(() => props.list, () => {
|
|
1294
|
+
!props.isTree && methods.setState();
|
|
1295
|
+
});
|
|
1294
1296
|
onMounted(() => {
|
|
1295
1297
|
let list = props.selected;
|
|
1296
1298
|
list && list.forEach((key) => {
|
|
@@ -1415,8 +1417,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1415
1417
|
]),
|
|
1416
1418
|
createElementVNode("div", _hoisted_11$1, [
|
|
1417
1419
|
_ctx.showCount ? (openBlock(), createElementBlock("div", _hoisted_12$1, [
|
|
1418
|
-
createElementVNode("span", null, "\u5DF2\u9009\u62E9" + toDisplayString(_ctx.selected && _ctx.selected.length || 0) +
|
|
1419
|
-
_ctx.limit ? (openBlock(), createElementBlock("span", _hoisted_13$1, "\u6700\u591A\u9009\u62E9" + toDisplayString(_ctx.limit) + toDisplayString(_ctx.unitStr), 1)) : createCommentVNode("v-if", true)
|
|
1420
|
+
createElementVNode("span", null, "\u5DF2\u9009\u62E9" + toDisplayString(_ctx.selected && _ctx.selected.length || 0) + toDisplayString(_ctx.$props.unitStr), 1),
|
|
1421
|
+
_ctx.limit ? (openBlock(), createElementBlock("span", _hoisted_13$1, "\u6700\u591A\u9009\u62E9" + toDisplayString(_ctx.limit) + toDisplayString(_ctx.$props.unitStr), 1)) : createCommentVNode("v-if", true)
|
|
1420
1422
|
])) : createCommentVNode("v-if", true),
|
|
1421
1423
|
createElementVNode("div", _hoisted_14$1, [
|
|
1422
1424
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selected, (item) => {
|
|
@@ -1627,73 +1629,57 @@ const _sfc_main$1 = defineComponent({
|
|
|
1627
1629
|
return data ? data.title : "\u672A\u77E5";
|
|
1628
1630
|
}
|
|
1629
1631
|
};
|
|
1630
|
-
watch(
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
if (curlistKeys.has(key) && (!curselect.has(key) || curselect.has(key) && curselect.has(flatMap.get(key)["parent"]))) {
|
|
1639
|
-
hadselected.delete(key);
|
|
1640
|
-
}
|
|
1632
|
+
watch(() => departmentChecked, () => {
|
|
1633
|
+
let flatMap = props.dataMap;
|
|
1634
|
+
let curlistKeys = props.curlistKeys;
|
|
1635
|
+
let hadselected = new Set(props.selected);
|
|
1636
|
+
let curselect = new Set(departmentChecked.value);
|
|
1637
|
+
for (let key of hadselected) {
|
|
1638
|
+
if (curlistKeys.has(key) && (!curselect.has(key) || curselect.has(key) && curselect.has(flatMap.get(key)["parent"]))) {
|
|
1639
|
+
hadselected.delete(key);
|
|
1641
1640
|
}
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1641
|
+
}
|
|
1642
|
+
for (let key of curselect) {
|
|
1643
|
+
let obj = flatMap.get(key);
|
|
1644
|
+
if (obj && !curselect.has(obj["parent"])) {
|
|
1645
|
+
hadselected.add(key);
|
|
1647
1646
|
}
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
)
|
|
1652
|
-
|
|
1653
|
-
(
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
set.add(key);
|
|
1659
|
-
} else {
|
|
1660
|
-
set.has(key) && set.delete(key);
|
|
1661
|
-
}
|
|
1647
|
+
}
|
|
1648
|
+
emit("update:selected", Array.from(hadselected));
|
|
1649
|
+
}, { deep: true });
|
|
1650
|
+
watch(() => staffsChecked, () => {
|
|
1651
|
+
let set = new Set(props.selected.length ? props.selected : null);
|
|
1652
|
+
for (let [key, value] of Object.entries(staffsChecked.value)) {
|
|
1653
|
+
if (value) {
|
|
1654
|
+
set.add(key);
|
|
1655
|
+
} else {
|
|
1656
|
+
set.has(key) && set.delete(key);
|
|
1662
1657
|
}
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
)
|
|
1667
|
-
|
|
1668
|
-
(
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
set.add(key);
|
|
1674
|
-
} else {
|
|
1675
|
-
set.has(key) && set.delete(key);
|
|
1676
|
-
}
|
|
1658
|
+
}
|
|
1659
|
+
emit("update:selected", Array.from(set));
|
|
1660
|
+
}, { deep: true });
|
|
1661
|
+
watch(() => shopChecked, () => {
|
|
1662
|
+
let set = new Set(props.selected.length ? props.selected : null);
|
|
1663
|
+
for (let [key, value] of Object.entries(shopChecked.value)) {
|
|
1664
|
+
if (value) {
|
|
1665
|
+
set.add(key);
|
|
1666
|
+
} else {
|
|
1667
|
+
set.has(key) && set.delete(key);
|
|
1677
1668
|
}
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
)
|
|
1682
|
-
|
|
1683
|
-
(
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
set.add(key);
|
|
1689
|
-
} else {
|
|
1690
|
-
set.has(key) && set.delete(key);
|
|
1691
|
-
}
|
|
1669
|
+
}
|
|
1670
|
+
emit("update:selected", Array.from(set));
|
|
1671
|
+
}, { deep: true });
|
|
1672
|
+
watch(() => groupChecked, () => {
|
|
1673
|
+
let set = new Set(props.selected.length ? props.selected : null);
|
|
1674
|
+
for (let [key, value] of Object.entries(groupChecked.value)) {
|
|
1675
|
+
if (value) {
|
|
1676
|
+
set.add(key);
|
|
1677
|
+
} else {
|
|
1678
|
+
set.has(key) && set.delete(key);
|
|
1692
1679
|
}
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
);
|
|
1680
|
+
}
|
|
1681
|
+
emit("update:selected", Array.from(set));
|
|
1682
|
+
}, { deep: true });
|
|
1697
1683
|
onMounted(() => {
|
|
1698
1684
|
let list = props.selected;
|
|
1699
1685
|
list && list.forEach((key) => {
|
|
@@ -1860,7 +1846,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1860
1846
|
]);
|
|
1861
1847
|
}), 128))
|
|
1862
1848
|
])) : createCommentVNode("v-if", true)
|
|
1863
|
-
],
|
|
1849
|
+
], 2112))
|
|
1864
1850
|
])
|
|
1865
1851
|
]),
|
|
1866
1852
|
createElementVNode("div", _hoisted_14, [
|
|
@@ -1979,10 +1965,7 @@ const _sfc_main = defineComponent({
|
|
|
1979
1965
|
if (["string", "number"].includes(typeof state.selected)) {
|
|
1980
1966
|
emit("update:select", [state.dataMap.get(state.selected)]);
|
|
1981
1967
|
} else if (state.selected instanceof Array) {
|
|
1982
|
-
emit(
|
|
1983
|
-
"update:select",
|
|
1984
|
-
state.selected.map((item) => state.dataMap.get(item))
|
|
1985
|
-
);
|
|
1968
|
+
emit("update:select", state.selected.map((item) => state.dataMap.get(item)));
|
|
1986
1969
|
} else ;
|
|
1987
1970
|
state.list = [];
|
|
1988
1971
|
methods.modalCancel();
|
|
@@ -34,16 +34,16 @@ function isPlainObject(o) {
|
|
|
34
34
|
return true;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
function t(){return t=Object.assign
|
|
37
|
+
function t(){return t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);}return e},t.apply(this,arguments)}function r(e,t){if(null==e)return {};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}const n={silent:!1,logLevel:"warn"},i=["validator"],o=Object.prototype,a=o.toString,s=o.hasOwnProperty,u=/^\s*function (\w+)/;function l(e){var t;const r=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(r){const e=r.toString().match(u);return e?e[1]:""}return ""}const c=isPlainObject,f=e=>e;let d=f;if("production"!==process.env.NODE_ENV){const e="undefined"!=typeof console;d=e?function(e,t=n.logLevel){!1===n.silent&&console[t](`[VueTypes warn]: ${e}`);}:f;}const p=(e,t)=>s.call(e,t),y=Number.isInteger||function(e){return "number"==typeof e&&isFinite(e)&&Math.floor(e)===e},v=Array.isArray||function(e){return "[object Array]"===a.call(e)},h=e=>"[object Function]"===a.call(e),b=e=>c(e)&&p(e,"_vueTypes_name"),g=e=>c(e)&&(p(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>p(e,t)));function O(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function m(e,t,r=!1){let n,i=!0,o="";n=c(e)?e:{type:e};const a=b(n)?n._vueTypes_name+" - ":"";if(g(n)&&null!==n.type){if(void 0===n.type||!0===n.type)return i;if(!n.required&&void 0===t)return i;v(n.type)?(i=n.type.some(e=>!0===m(e,t,!0)),o=n.type.map(e=>l(e)).join(" or ")):(o=l(n),i="Array"===o?v(t):"Object"===o?c(t):"String"===o||"Number"===o||"Boolean"===o||"Function"===o?function(e){if(null==e)return "";const t=e.constructor.toString().match(u);return t?t[1]:""}(t)===o:t instanceof n.type);}if(!i){const e=`${a}value "${t}" should be of type "${o}"`;return !1===r?(d(e),!1):e}if(p(n,"validator")&&h(n.validator)){const e=d,o=[];if(d=e=>{o.push(e);},i=n.validator(t),d=e,!i){const e=(o.length>1?"* ":"")+o.join("\n* ");return o.length=0,!1===r?(d(e),i):e}}return i}function j(e,t){const r=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(e){return void 0===e?(p(this,"default")&&delete this.default,this):h(e)||!0===m(this,e,!0)?(this.default=v(e)?()=>[...e]:c(e)?()=>Object.assign({},e):e,this):(d(`${this._vueTypes_name} - invalid default value: "${e}"`),this)}}}),{validator:n}=r;return h(n)&&(r.validator=O(n,r)),r}function _(e,t){const r=j(e,t);return Object.defineProperty(r,"validate",{value(e){return h(this.validator)&&d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=O(e,this),this}})}function T(e,t,n){const o=function(e){const t={};return Object.getOwnPropertyNames(e).forEach(r=>{t[r]=Object.getOwnPropertyDescriptor(e,r);}),Object.defineProperties({},t)}(t);if(o._vueTypes_name=e,!c(n))return o;const{validator:a}=n,s=r(n,i);if(h(a)){let{validator:e}=o;e&&(e=null!==(l=(u=e).__original)&&void 0!==l?l:u),o.validator=O(e?function(t){return e.call(this,t)&&a.call(this,t)}:a,o);}var u,l;return Object.assign(o,s)}function $(e){return e.replace(/^(?!\s*$)/gm," ")}const w=()=>_("any",{}),P=()=>_("function",{type:Function}),x=()=>_("boolean",{type:Boolean}),E=()=>_("string",{type:String}),N=()=>_("number",{type:Number}),q=()=>_("array",{type:Array}),A=()=>_("object",{type:Object}),V=()=>j("integer",{type:Number,validator:e=>y(e)}),S=()=>j("symbol",{validator:e=>"symbol"==typeof e});function k(e,t="custom validation failed"){if("function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return j(e.name||"<<anonymous function>>",{type:null,validator(r){const n=e(r);return n||d(`${this._vueTypes_name} - ${t}`),n}})}function D(e){if(!v(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.join('", "')}".`,r=e.reduce((e,t)=>{if(null!=t){const r=t.constructor;-1===e.indexOf(r)&&e.push(r);}return e},[]);return j("oneOf",{type:r.length>0?r:void 0,validator(r){const n=-1!==e.indexOf(r);return n||d(t),n}})}function L(e){if(!v(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,r=[];for(let n=0;n<e.length;n+=1){const i=e[n];if(g(i)){if(b(i)&&"oneOf"===i._vueTypes_name&&i.type){r=r.concat(i.type);continue}if(h(i.validator)&&(t=!0),!0===i.type||!i.type){d('oneOfType - invalid usage of "true" or "null" as types.');continue}r=r.concat(i.type);}else r.push(i);}r=r.filter((e,t)=>r.indexOf(e)===t);const n=r.length>0?r:null;return j("oneOfType",t?{type:n,validator(t){const r=[],n=e.some(e=>{const n=m(b(e)&&"oneOf"===e._vueTypes_name?e.type||null:e,t,!0);return "string"==typeof n&&r.push(n),!0===n});return n||d(`oneOfType - provided value does not match any of the ${r.length} passed-in validators:\n${$(r.join("\n"))}`),n}}:{type:n})}function F(e){return j("arrayOf",{type:Array,validator(t){let r="";const n=t.every(t=>(r=m(e,t,!0),!0===r));return n||d(`arrayOf - value validation error:\n${$(r)}`),n}})}function Y(e){return j("instanceOf",{type:e})}function B(e){return j("objectOf",{type:Object,validator(t){let r="";const n=Object.keys(t).every(n=>(r=m(e,t[n],!0),!0===r));return n||d(`objectOf - value validation error:\n${$(r)}`),n}})}function I(e){const t=Object.keys(e),r=t.filter(t=>{var r;return !(null===(r=e[t])||void 0===r||!r.required)}),n=j("shape",{type:Object,validator(n){if(!c(n))return !1;const i=Object.keys(n);if(r.length>0&&r.some(e=>-1===i.indexOf(e))){const e=r.filter(e=>-1===i.indexOf(e));return d(1===e.length?`shape - required property "${e[0]}" is not defined.`:`shape - required properties "${e.join('", "')}" are not defined.`),!1}return i.every(r=>{if(-1===t.indexOf(r))return !0===this._vueTypes_isLoose||(d(`shape - shape definition does not include a "${r}" property. Allowed keys: "${t.join('", "')}".`),!1);const i=m(e[r],n[r],!0);return "string"==typeof i&&d(`shape - "${r}" property validation error:\n ${$(i)}`),!0===i})}});return Object.defineProperty(n,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(n,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),n}const J=["name","validate","getter"],M=/*#__PURE__*/(()=>{var e,t;return t=e=class{static get any(){return w()}static get func(){return P().def(this.defaults.func)}static get bool(){return x().def(this.defaults.bool)}static get string(){return E().def(this.defaults.string)}static get number(){return N().def(this.defaults.number)}static get array(){return q().def(this.defaults.array)}static get object(){return A().def(this.defaults.object)}static get integer(){return V().def(this.defaults.integer)}static get symbol(){return S()}static extend(e){if(v(e))return e.forEach(e=>this.extend(e)),this;const{name:t,validate:n=!1,getter:i=!1}=e,o=r(e,J);if(p(this,t))throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);const{type:a}=o;if(b(a))return delete o.type,Object.defineProperty(this,t,i?{get:()=>T(t,a,o)}:{value(...e){const r=T(t,a,o);return r.validator&&(r.validator=r.validator.bind(r,...e)),r}});let s;return s=i?{get(){const e=Object.assign({},o);return n?_(t,e):j(t,e)},enumerable:!0}:{value(...e){const r=Object.assign({},o);let i;return i=n?_(t,r):j(t,r),r.validator&&(i.validator=r.validator.bind(i,...e)),i},enumerable:!0},Object.defineProperty(this,t,s)}},e.defaults={},e.sensibleDefaults=void 0,e.config=n,e.custom=k,e.oneOf=D,e.instanceOf=Y,e.oneOfType=L,e.arrayOf=F,e.objectOf=B,e.shape=I,e.utils={validate:(e,t)=>!0===m(t,e,!0),toType:(e,t,r=!1)=>r?_(e,t):j(e,t)},t})();function R(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var r,n;return n=r=class extends M{static get sensibleDefaults(){return t({},this.defaults)}static set sensibleDefaults(r){this.defaults=!1!==r?t({},!0!==r?r:e):{};}},r.defaults=t({},e),n}class z extends(R()){}
|
|
38
38
|
|
|
39
39
|
const timelineProps = () => ({
|
|
40
|
-
mode:
|
|
41
|
-
labelWidth:
|
|
40
|
+
mode: z.oneOf(['left', 'right']).def('left'),
|
|
41
|
+
labelWidth: z.string.def(''),
|
|
42
42
|
});
|
|
43
43
|
const timelineItemProps = () => ({
|
|
44
|
-
color:
|
|
45
|
-
dot:
|
|
46
|
-
label:
|
|
44
|
+
color: z.oneOf(['blue', 'red', 'green', 'gray']).def('blue'),
|
|
45
|
+
dot: z.any,
|
|
46
|
+
label: z.any,
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
var _export_sfc = (sfc, props) => {
|