bm-admin-ui 1.0.14-alpha → 1.0.17-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 +28 -15
- 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.js +36 -47
- 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 +77 -84
- package/index.esm.js +1263 -37407
- package/index.js +1261 -37405
- 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 +29 -16
- 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.js +36 -47
- 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 +77 -84
- 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
|
@@ -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,7 @@ 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
|
-
|
|
1301
|
+
name: "search-reset-btn",
|
|
1289
1302
|
props: searchResetBtnProps,
|
|
1290
1303
|
emits: ["submit", "reset", "expand"],
|
|
1291
1304
|
setup(__props, { emit: emits }) {
|
|
@@ -1490,9 +1503,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1490
1503
|
tempRes.push({ checked: true });
|
|
1491
1504
|
} else {
|
|
1492
1505
|
let tempRes2 = tempChildren[j];
|
|
1493
|
-
let tempIndex2 = props.modelValue.indexOf(
|
|
1494
|
-
tempRes2[props.optionValueName]
|
|
1495
|
-
);
|
|
1506
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1496
1507
|
if (tempIndex2 !== -1) {
|
|
1497
1508
|
tempRes.push({ checked: true });
|
|
1498
1509
|
} else {
|
|
@@ -1518,9 +1529,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1518
1529
|
if (tempChildren) {
|
|
1519
1530
|
for (let j = 0; j < tempChildren.length; j++) {
|
|
1520
1531
|
let tempRes2 = tempChildren[j];
|
|
1521
|
-
let tempIndex2 = props.modelValue.indexOf(
|
|
1522
|
-
tempRes2[props.optionValueName]
|
|
1523
|
-
);
|
|
1532
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1524
1533
|
if (path.value[i] && tempRes2[props.optionValueName] === path.value[i][props.optionValueName] && tempIndex2 !== -1) {
|
|
1525
1534
|
parentChecked = true;
|
|
1526
1535
|
break;
|
|
@@ -1602,9 +1611,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1602
1611
|
checked.push(tempOption?.[props.optionValueName]);
|
|
1603
1612
|
if (tempOption?.children) {
|
|
1604
1613
|
let allSonValues = getAllSonValues(tempOption.children);
|
|
1605
|
-
allSonValues = allSonValues.filter(
|
|
1606
|
-
(item) => item !== tempOption?.[props.optionValueName]
|
|
1607
|
-
);
|
|
1614
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption?.[props.optionValueName]);
|
|
1608
1615
|
unChecked = unChecked.concat(allSonValues);
|
|
1609
1616
|
}
|
|
1610
1617
|
for (let i = level; i > 0; i--) {
|
|
@@ -1619,9 +1626,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1619
1626
|
checked.push(tempOption2[props.optionValueName]);
|
|
1620
1627
|
if (tempOption2.children) {
|
|
1621
1628
|
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1622
|
-
allSonValues = allSonValues.filter(
|
|
1623
|
-
(item) => item !== tempOption2[props.optionValueName]
|
|
1624
|
-
);
|
|
1629
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1625
1630
|
unChecked = unChecked.concat(allSonValues);
|
|
1626
1631
|
}
|
|
1627
1632
|
}
|
|
@@ -1647,9 +1652,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1647
1652
|
if (tempStatus.checked) {
|
|
1648
1653
|
checked = [];
|
|
1649
1654
|
} else {
|
|
1650
|
-
checked = modulersOptions.value[level].children?.map(
|
|
1651
|
-
(item) => item[props.optionValueName]
|
|
1652
|
-
) || [];
|
|
1655
|
+
checked = modulersOptions.value[level].children?.map((item) => item[props.optionValueName]) || [];
|
|
1653
1656
|
}
|
|
1654
1657
|
} else {
|
|
1655
1658
|
if (tempStatus.checked) {
|
|
@@ -1672,9 +1675,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1672
1675
|
checked.push(tempOption[props.optionValueName]);
|
|
1673
1676
|
if (tempOption.children) {
|
|
1674
1677
|
let allSonValues = getAllSonValues(tempOption.children);
|
|
1675
|
-
allSonValues = allSonValues.filter(
|
|
1676
|
-
(item) => item !== tempOption[props.optionValueName]
|
|
1677
|
-
);
|
|
1678
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption[props.optionValueName]);
|
|
1678
1679
|
unChecked = unChecked.concat(allSonValues);
|
|
1679
1680
|
}
|
|
1680
1681
|
for (let i = level; i > 0; i--) {
|
|
@@ -1689,9 +1690,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1689
1690
|
checked.push(tempOption2[props.optionValueName]);
|
|
1690
1691
|
if (tempOption2.children) {
|
|
1691
1692
|
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1692
|
-
allSonValues = allSonValues.filter(
|
|
1693
|
-
(item) => item !== tempOption2[props.optionValueName]
|
|
1694
|
-
);
|
|
1693
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1695
1694
|
unChecked = unChecked.concat(allSonValues);
|
|
1696
1695
|
}
|
|
1697
1696
|
}
|
|
@@ -1777,9 +1776,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1777
1776
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1778
1777
|
key: index,
|
|
1779
1778
|
class: vue.normalizeClass(["bm-multi-cascader-item", {
|
|
1780
|
-
"is-active": path.value.find(
|
|
1781
|
-
(item) => option[props.optionValueName] === item[props.optionValueName]
|
|
1782
|
-
)
|
|
1779
|
+
"is-active": path.value.find((item) => option[props.optionValueName] === item[props.optionValueName])
|
|
1783
1780
|
}]),
|
|
1784
1781
|
onClick: ($event) => handleClick(option, level, index)
|
|
1785
1782
|
}, [
|
|
@@ -1949,15 +1946,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1949
1946
|
vue.onBeforeUnmount(() => {
|
|
1950
1947
|
window.removeEventListener("resize", handleResize);
|
|
1951
1948
|
});
|
|
1952
|
-
vue.watch(
|
|
1953
|
-
()
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
{
|
|
1958
|
-
immediate: true
|
|
1959
|
-
}
|
|
1960
|
-
);
|
|
1949
|
+
vue.watch(() => props.showExpandBtn, (val) => {
|
|
1950
|
+
handleShowExpandBtn(val);
|
|
1951
|
+
}, {
|
|
1952
|
+
immediate: true
|
|
1953
|
+
});
|
|
1961
1954
|
const expandRule = vue.computed(() => {
|
|
1962
1955
|
const fixedCount = props.fixedCount && props.fixedCount >= 0 ? props.fixedCount : 0;
|
|
1963
1956
|
const fixedFields = props.fixedFields?.length ? props.fixedFields : [];
|
|
@@ -1976,15 +1969,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1976
1969
|
});
|
|
1977
1970
|
}
|
|
1978
1971
|
}
|
|
1979
|
-
vue.watch(
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
{
|
|
1985
|
-
immediate: true
|
|
1986
|
-
}
|
|
1987
|
-
);
|
|
1972
|
+
vue.watch(isExpand, (val) => {
|
|
1973
|
+
handleChangeExpand(val);
|
|
1974
|
+
}, {
|
|
1975
|
+
immediate: true
|
|
1976
|
+
});
|
|
1988
1977
|
expose({
|
|
1989
1978
|
fApi
|
|
1990
1979
|
});
|
|
@@ -81,7 +81,7 @@ function boundAlpha(a) {
|
|
|
81
81
|
*/
|
|
82
82
|
function convertToPercentage(n) {
|
|
83
83
|
if (n <= 1) {
|
|
84
|
-
return
|
|
84
|
+
return Number(n) * 100 + "%";
|
|
85
85
|
}
|
|
86
86
|
return n;
|
|
87
87
|
}
|
|
@@ -463,12 +463,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
463
463
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
464
464
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
465
465
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
466
|
-
var CSS_UNIT = "(?:"
|
|
466
|
+
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
467
467
|
// Actual matching.
|
|
468
468
|
// Parentheses and commas are optional, but not required.
|
|
469
469
|
// Whitespace can take the place of commas or opening paren
|
|
470
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
471
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
470
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
471
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
472
472
|
var matchers = {
|
|
473
473
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
474
474
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -793,6 +793,19 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
793
793
|
});
|
|
794
794
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
795
795
|
});
|
|
796
|
+
presetPalettes.red;
|
|
797
|
+
presetPalettes.volcano;
|
|
798
|
+
presetPalettes.gold;
|
|
799
|
+
presetPalettes.orange;
|
|
800
|
+
presetPalettes.yellow;
|
|
801
|
+
presetPalettes.lime;
|
|
802
|
+
presetPalettes.green;
|
|
803
|
+
presetPalettes.cyan;
|
|
804
|
+
presetPalettes.blue;
|
|
805
|
+
presetPalettes.geekblue;
|
|
806
|
+
presetPalettes.purple;
|
|
807
|
+
presetPalettes.magenta;
|
|
808
|
+
presetPalettes.grey;
|
|
796
809
|
|
|
797
810
|
// https://github.com/substack/insert-css
|
|
798
811
|
var containers = []; // will store container HTMLElement references
|
|
@@ -1337,28 +1350,22 @@ const _sfc_main = vue.defineComponent({
|
|
|
1337
1350
|
};
|
|
1338
1351
|
props.loadFilter().then((data) => {
|
|
1339
1352
|
state.filterArr = data;
|
|
1340
|
-
state.filterSelects = state.filterArr.map(
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
}
|
|
1344
|
-
);
|
|
1353
|
+
state.filterSelects = state.filterArr.map((item) => {
|
|
1354
|
+
return item.multiple ? [] : "";
|
|
1355
|
+
});
|
|
1345
1356
|
}).finally(() => {
|
|
1346
1357
|
methods.fetchData();
|
|
1347
1358
|
});
|
|
1348
|
-
vue.watch(
|
|
1349
|
-
|
|
1350
|
-
()
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
methods.checkboxChange();
|
|
1359
|
-
},
|
|
1360
|
-
{ deep: true }
|
|
1361
|
-
);
|
|
1359
|
+
vue.watch(() => state.shopCheck, () => {
|
|
1360
|
+
let list = [];
|
|
1361
|
+
for (let [key, value] of Object.entries(state.shopCheck)) {
|
|
1362
|
+
value && list.push(key);
|
|
1363
|
+
}
|
|
1364
|
+
state.selected = list;
|
|
1365
|
+
emit("update:selected", list);
|
|
1366
|
+
emit("change", list);
|
|
1367
|
+
methods.checkboxChange();
|
|
1368
|
+
}, { deep: true });
|
|
1362
1369
|
if (props.showAlways) {
|
|
1363
1370
|
state.isActive = true;
|
|
1364
1371
|
}
|
|
@@ -84,7 +84,7 @@ function boundAlpha(a) {
|
|
|
84
84
|
*/
|
|
85
85
|
function convertToPercentage(n) {
|
|
86
86
|
if (n <= 1) {
|
|
87
|
-
return
|
|
87
|
+
return Number(n) * 100 + "%";
|
|
88
88
|
}
|
|
89
89
|
return n;
|
|
90
90
|
}
|
|
@@ -466,12 +466,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
466
466
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
467
467
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
468
468
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
469
|
-
var CSS_UNIT = "(?:"
|
|
469
|
+
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
470
470
|
// Actual matching.
|
|
471
471
|
// Parentheses and commas are optional, but not required.
|
|
472
472
|
// Whitespace can take the place of commas or opening paren
|
|
473
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
474
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
473
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
474
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
475
475
|
var matchers = {
|
|
476
476
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
477
477
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -796,6 +796,19 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
796
796
|
});
|
|
797
797
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
798
798
|
});
|
|
799
|
+
presetPalettes.red;
|
|
800
|
+
presetPalettes.volcano;
|
|
801
|
+
presetPalettes.gold;
|
|
802
|
+
presetPalettes.orange;
|
|
803
|
+
presetPalettes.yellow;
|
|
804
|
+
presetPalettes.lime;
|
|
805
|
+
presetPalettes.green;
|
|
806
|
+
presetPalettes.cyan;
|
|
807
|
+
presetPalettes.blue;
|
|
808
|
+
presetPalettes.geekblue;
|
|
809
|
+
presetPalettes.purple;
|
|
810
|
+
presetPalettes.magenta;
|
|
811
|
+
presetPalettes.grey;
|
|
799
812
|
|
|
800
813
|
// https://github.com/substack/insert-css
|
|
801
814
|
var containers = []; // will store container HTMLElement references
|
|
@@ -1260,50 +1273,39 @@ const _sfc_main$3 = vue.defineComponent({
|
|
|
1260
1273
|
return data ? data.title : "\u672A\u77E5";
|
|
1261
1274
|
}
|
|
1262
1275
|
};
|
|
1263
|
-
vue.watch(
|
|
1264
|
-
|
|
1265
|
-
()
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
()
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
let curlistKeys = props.curlistKeys;
|
|
1284
|
-
let hadselected = new Set(props.selected);
|
|
1285
|
-
let curselect = new Set(state.departmentChecked);
|
|
1286
|
-
for (let key of hadselected) {
|
|
1287
|
-
if (curlistKeys.has(key) && (!curselect.has(key) || curselect.has(key) && curselect.has(flatMap.get(key)["parent"]))) {
|
|
1288
|
-
hadselected.delete(key);
|
|
1289
|
-
}
|
|
1276
|
+
vue.watch(() => state.listChecked, () => {
|
|
1277
|
+
let list = [];
|
|
1278
|
+
for (let [key, value] of Object.entries(state.listChecked)) {
|
|
1279
|
+
value && list.push(key);
|
|
1280
|
+
}
|
|
1281
|
+
if (props.limit > 0 && list.length >= props.limit)
|
|
1282
|
+
state.isFulfill = true;
|
|
1283
|
+
else
|
|
1284
|
+
state.isFulfill = false;
|
|
1285
|
+
methods.setState();
|
|
1286
|
+
emit("update:selected", list);
|
|
1287
|
+
}, { deep: true });
|
|
1288
|
+
vue.watch(() => state.departmentChecked, () => {
|
|
1289
|
+
let flatMap = props.dataMap;
|
|
1290
|
+
let curlistKeys = props.curlistKeys;
|
|
1291
|
+
let hadselected = new Set(props.selected);
|
|
1292
|
+
let curselect = new Set(state.departmentChecked);
|
|
1293
|
+
for (let key of hadselected) {
|
|
1294
|
+
if (curlistKeys.has(key) && (!curselect.has(key) || curselect.has(key) && curselect.has(flatMap.get(key)["parent"]))) {
|
|
1295
|
+
hadselected.delete(key);
|
|
1290
1296
|
}
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1297
|
+
}
|
|
1298
|
+
for (let key of curselect) {
|
|
1299
|
+
let obj = flatMap.get(key);
|
|
1300
|
+
if (obj && !curselect.has(obj["parent"])) {
|
|
1301
|
+
hadselected.add(key);
|
|
1296
1302
|
}
|
|
1297
|
-
emit("update:selected", Array.from(hadselected));
|
|
1298
|
-
},
|
|
1299
|
-
{ deep: true }
|
|
1300
|
-
);
|
|
1301
|
-
vue.watch(
|
|
1302
|
-
() => props.list,
|
|
1303
|
-
() => {
|
|
1304
|
-
!props.isTree && methods.setState();
|
|
1305
1303
|
}
|
|
1306
|
-
|
|
1304
|
+
emit("update:selected", Array.from(hadselected));
|
|
1305
|
+
}, { deep: true });
|
|
1306
|
+
vue.watch(() => props.list, () => {
|
|
1307
|
+
!props.isTree && methods.setState();
|
|
1308
|
+
});
|
|
1307
1309
|
vue.onMounted(() => {
|
|
1308
1310
|
let list = props.selected;
|
|
1309
1311
|
list && list.forEach((key) => {
|
|
@@ -1428,8 +1430,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1428
1430
|
]),
|
|
1429
1431
|
vue.createElementVNode("div", _hoisted_11$1, [
|
|
1430
1432
|
_ctx.showCount ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12$1, [
|
|
1431
|
-
vue.createElementVNode("span", null, "\u5DF2\u9009\u62E9" + vue.toDisplayString(_ctx.selected && _ctx.selected.length || 0) +
|
|
1432
|
-
_ctx.limit ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_13$1, "\u6700\u591A\u9009\u62E9" + vue.toDisplayString(_ctx.limit) + vue.toDisplayString(_ctx.unitStr), 1)) : vue.createCommentVNode("v-if", true)
|
|
1433
|
+
vue.createElementVNode("span", null, "\u5DF2\u9009\u62E9" + vue.toDisplayString(_ctx.selected && _ctx.selected.length || 0) + vue.toDisplayString(_ctx.$props.unitStr), 1),
|
|
1434
|
+
_ctx.limit ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_13$1, "\u6700\u591A\u9009\u62E9" + vue.toDisplayString(_ctx.limit) + vue.toDisplayString(_ctx.$props.unitStr), 1)) : vue.createCommentVNode("v-if", true)
|
|
1433
1435
|
])) : vue.createCommentVNode("v-if", true),
|
|
1434
1436
|
vue.createElementVNode("div", _hoisted_14$1, [
|
|
1435
1437
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.selected, (item) => {
|
|
@@ -1636,77 +1638,61 @@ const _sfc_main$1 = vue.defineComponent({
|
|
|
1636
1638
|
});
|
|
1637
1639
|
},
|
|
1638
1640
|
getSelectName(key) {
|
|
1639
|
-
let data = props.dataMap.get(
|
|
1641
|
+
let data = props.dataMap.get(key) || null;
|
|
1640
1642
|
return data ? data.title : "\u672A\u77E5";
|
|
1641
1643
|
}
|
|
1642
1644
|
};
|
|
1643
|
-
vue.watch(
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
if (curlistKeys.has(key) && (!curselect.has(key) || curselect.has(key) && curselect.has(flatMap.get(key)["parent"]))) {
|
|
1652
|
-
hadselected.delete(key);
|
|
1653
|
-
}
|
|
1645
|
+
vue.watch(() => departmentChecked, () => {
|
|
1646
|
+
let flatMap = props.dataMap;
|
|
1647
|
+
let curlistKeys = props.curlistKeys;
|
|
1648
|
+
let hadselected = new Set(props.selected);
|
|
1649
|
+
let curselect = new Set(departmentChecked.value);
|
|
1650
|
+
for (let key of hadselected) {
|
|
1651
|
+
if (curlistKeys.has(key) && (!curselect.has(key) || curselect.has(key) && curselect.has(flatMap.get(key)["parent"]))) {
|
|
1652
|
+
hadselected.delete(key);
|
|
1654
1653
|
}
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1654
|
+
}
|
|
1655
|
+
for (let key of curselect) {
|
|
1656
|
+
let obj = flatMap.get(key);
|
|
1657
|
+
if (obj && !curselect.has(obj["parent"])) {
|
|
1658
|
+
hadselected.add(key);
|
|
1660
1659
|
}
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
)
|
|
1665
|
-
|
|
1666
|
-
(
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
set.add(key);
|
|
1672
|
-
} else {
|
|
1673
|
-
set.has(key) && set.delete(key);
|
|
1674
|
-
}
|
|
1660
|
+
}
|
|
1661
|
+
emit("update:selected", Array.from(hadselected));
|
|
1662
|
+
}, { deep: true });
|
|
1663
|
+
vue.watch(() => staffsChecked, () => {
|
|
1664
|
+
let set = new Set(props.selected.length ? props.selected : null);
|
|
1665
|
+
for (let [key, value] of Object.entries(staffsChecked.value)) {
|
|
1666
|
+
if (value) {
|
|
1667
|
+
set.add(key);
|
|
1668
|
+
} else {
|
|
1669
|
+
set.has(key) && set.delete(key);
|
|
1675
1670
|
}
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
)
|
|
1680
|
-
|
|
1681
|
-
(
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
set.add(key);
|
|
1687
|
-
} else {
|
|
1688
|
-
set.has(key) && set.delete(key);
|
|
1689
|
-
}
|
|
1671
|
+
}
|
|
1672
|
+
emit("update:selected", Array.from(set));
|
|
1673
|
+
}, { deep: true });
|
|
1674
|
+
vue.watch(() => shopChecked, () => {
|
|
1675
|
+
let set = new Set(props.selected.length ? props.selected : null);
|
|
1676
|
+
for (let [key, value] of Object.entries(shopChecked.value)) {
|
|
1677
|
+
if (value) {
|
|
1678
|
+
set.add(key);
|
|
1679
|
+
} else {
|
|
1680
|
+
set.has(key) && set.delete(key);
|
|
1690
1681
|
}
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
)
|
|
1695
|
-
|
|
1696
|
-
(
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
set.add(key);
|
|
1702
|
-
} else {
|
|
1703
|
-
set.has(key) && set.delete(key);
|
|
1704
|
-
}
|
|
1682
|
+
}
|
|
1683
|
+
emit("update:selected", Array.from(set));
|
|
1684
|
+
}, { deep: true });
|
|
1685
|
+
vue.watch(() => groupChecked, () => {
|
|
1686
|
+
let set = new Set(props.selected.length ? props.selected : null);
|
|
1687
|
+
for (let [key, value] of Object.entries(groupChecked.value)) {
|
|
1688
|
+
if (value) {
|
|
1689
|
+
set.add(key);
|
|
1690
|
+
} else {
|
|
1691
|
+
set.has(key) && set.delete(key);
|
|
1705
1692
|
}
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
);
|
|
1693
|
+
}
|
|
1694
|
+
emit("update:selected", Array.from(set));
|
|
1695
|
+
}, { deep: true });
|
|
1710
1696
|
vue.onMounted(() => {
|
|
1711
1697
|
let list = props.selected;
|
|
1712
1698
|
list && list.forEach((key) => {
|
|
@@ -1992,10 +1978,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
1992
1978
|
if (["string", "number"].includes(typeof state.selected)) {
|
|
1993
1979
|
emit("update:select", [state.dataMap.get(state.selected)]);
|
|
1994
1980
|
} else if (state.selected instanceof Array) {
|
|
1995
|
-
emit(
|
|
1996
|
-
"update:select",
|
|
1997
|
-
state.selected.map((item) => state.dataMap.get(item))
|
|
1998
|
-
);
|
|
1981
|
+
emit("update:select", state.selected.map((item) => state.dataMap.get(item)));
|
|
1999
1982
|
} else ;
|
|
2000
1983
|
state.list = [];
|
|
2001
1984
|
methods.modalCancel();
|
|
@@ -38,16 +38,16 @@ function isPlainObject(o) {
|
|
|
38
38
|
return true;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
function t(){return t=Object.assign
|
|
41
|
+
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()){}
|
|
42
42
|
|
|
43
43
|
const timelineProps = () => ({
|
|
44
|
-
mode:
|
|
45
|
-
labelWidth:
|
|
44
|
+
mode: z.oneOf(['left', 'right']).def('left'),
|
|
45
|
+
labelWidth: z.string.def(''),
|
|
46
46
|
});
|
|
47
47
|
const timelineItemProps = () => ({
|
|
48
|
-
color:
|
|
49
|
-
dot:
|
|
50
|
-
label:
|
|
48
|
+
color: z.oneOf(['blue', 'red', 'green', 'gray']).def('blue'),
|
|
49
|
+
dot: z.any,
|
|
50
|
+
label: z.any,
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
var _export_sfc = (sfc, props) => {
|