bm-admin-ui 1.0.15-alpha → 1.0.18-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.d.ts +2 -2
- package/es/components/float-table/index.js +27 -36
- package/es/components/float-table/src/float-table.vue.d.ts +2 -2
- 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.d.ts +3 -3
- package/es/components/multi-cascader-compose/index.js +25 -28
- package/es/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +3 -3
- package/es/components/over-tooltips/index.js +20 -27
- package/es/components/search-filter/index.d.ts +4 -2
- package/es/components/search-filter/index.js +36 -48
- package/es/components/search-filter/src/search-filter.vue.d.ts +4 -2
- package/es/components/shops-filter/index.d.ts +1 -1
- package/es/components/shops-filter/index.js +30 -23
- package/es/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
- package/es/components/staffs-selector/index.js +98 -115
- package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +2 -2
- package/es/components/timeline/index.d.ts +20 -6
- package/es/components/timeline/index.js +6 -6
- package/es/components/timeline/src/props.d.ts +6 -2
- package/es/components/timeline/src/timeline-item.vue.d.ts +20 -6
- package/es/components/upload/index.d.ts +9 -0
- package/es/components/upload/index.js +136 -93
- package/es/components/upload/src/upload.vue.d.ts +9 -0
- package/index.esm.js +1068 -37345
- package/index.js +1068 -37345
- package/lib/components/feedback/index.js +18 -5
- package/lib/components/float-table/index.d.ts +2 -2
- package/lib/components/float-table/index.js +27 -36
- package/lib/components/float-table/src/float-table.vue.d.ts +2 -2
- 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.d.ts +3 -3
- package/lib/components/multi-cascader-compose/index.js +25 -28
- package/lib/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +3 -3
- package/lib/components/over-tooltips/index.js +20 -27
- package/lib/components/search-filter/index.d.ts +4 -2
- package/lib/components/search-filter/index.js +36 -48
- package/lib/components/search-filter/src/search-filter.vue.d.ts +4 -2
- package/lib/components/shops-filter/index.d.ts +1 -1
- package/lib/components/shops-filter/index.js +30 -23
- package/lib/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
- package/lib/components/staffs-selector/index.js +98 -115
- package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +2 -2
- package/lib/components/timeline/index.d.ts +20 -6
- package/lib/components/timeline/index.js +6 -6
- package/lib/components/timeline/src/props.d.ts +6 -2
- package/lib/components/timeline/src/timeline-item.vue.d.ts +20 -6
- package/lib/components/upload/index.d.ts +9 -0
- package/lib/components/upload/index.js +136 -93
- package/lib/components/upload/src/upload.vue.d.ts +9 -0
- 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/float-table/index.d.ts +2 -2
- package/types/components/float-table/src/float-table.vue.d.ts +2 -2
- 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/multi-cascader-compose/index.d.ts +3 -3
- package/types/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +3 -3
- package/types/components/search-filter/index.d.ts +4 -2
- package/types/components/search-filter/src/search-filter.vue.d.ts +4 -2
- package/types/components/shops-filter/index.d.ts +1 -1
- package/types/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
- package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +2 -2
- package/types/components/timeline/index.d.ts +20 -6
- package/types/components/timeline/src/props.d.ts +6 -2
- package/types/components/timeline/src/timeline-item.vue.d.ts +20 -6
- package/types/components/upload/index.d.ts +9 -0
- package/types/components/upload/src/upload.vue.d.ts +9 -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,6 @@ const _hoisted_2$1 = { class: "bm-search-filter-actions" };
|
|
|
1285
1298
|
const _hoisted_3$1 = /* @__PURE__ */ vue.createTextVNode("\u91CD\u7F6E");
|
|
1286
1299
|
const _hoisted_4$1 = /* @__PURE__ */ vue.createTextVNode("\u67E5\u8BE2");
|
|
1287
1300
|
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
1288
|
-
__name: "search-reset-btn",
|
|
1289
1301
|
props: searchResetBtnProps,
|
|
1290
1302
|
emits: ["submit", "reset", "expand"],
|
|
1291
1303
|
setup(__props, { emit: emits }) {
|
|
@@ -1490,9 +1502,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1490
1502
|
tempRes.push({ checked: true });
|
|
1491
1503
|
} else {
|
|
1492
1504
|
let tempRes2 = tempChildren[j];
|
|
1493
|
-
let tempIndex2 = props.modelValue.indexOf(
|
|
1494
|
-
tempRes2[props.optionValueName]
|
|
1495
|
-
);
|
|
1505
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1496
1506
|
if (tempIndex2 !== -1) {
|
|
1497
1507
|
tempRes.push({ checked: true });
|
|
1498
1508
|
} else {
|
|
@@ -1518,9 +1528,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1518
1528
|
if (tempChildren) {
|
|
1519
1529
|
for (let j = 0; j < tempChildren.length; j++) {
|
|
1520
1530
|
let tempRes2 = tempChildren[j];
|
|
1521
|
-
let tempIndex2 = props.modelValue.indexOf(
|
|
1522
|
-
tempRes2[props.optionValueName]
|
|
1523
|
-
);
|
|
1531
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1524
1532
|
if (path.value[i] && tempRes2[props.optionValueName] === path.value[i][props.optionValueName] && tempIndex2 !== -1) {
|
|
1525
1533
|
parentChecked = true;
|
|
1526
1534
|
break;
|
|
@@ -1602,9 +1610,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1602
1610
|
checked.push(tempOption?.[props.optionValueName]);
|
|
1603
1611
|
if (tempOption?.children) {
|
|
1604
1612
|
let allSonValues = getAllSonValues(tempOption.children);
|
|
1605
|
-
allSonValues = allSonValues.filter(
|
|
1606
|
-
(item) => item !== tempOption?.[props.optionValueName]
|
|
1607
|
-
);
|
|
1613
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption?.[props.optionValueName]);
|
|
1608
1614
|
unChecked = unChecked.concat(allSonValues);
|
|
1609
1615
|
}
|
|
1610
1616
|
for (let i = level; i > 0; i--) {
|
|
@@ -1619,9 +1625,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1619
1625
|
checked.push(tempOption2[props.optionValueName]);
|
|
1620
1626
|
if (tempOption2.children) {
|
|
1621
1627
|
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1622
|
-
allSonValues = allSonValues.filter(
|
|
1623
|
-
(item) => item !== tempOption2[props.optionValueName]
|
|
1624
|
-
);
|
|
1628
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1625
1629
|
unChecked = unChecked.concat(allSonValues);
|
|
1626
1630
|
}
|
|
1627
1631
|
}
|
|
@@ -1647,9 +1651,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1647
1651
|
if (tempStatus.checked) {
|
|
1648
1652
|
checked = [];
|
|
1649
1653
|
} else {
|
|
1650
|
-
checked = modulersOptions.value[level].children?.map(
|
|
1651
|
-
(item) => item[props.optionValueName]
|
|
1652
|
-
) || [];
|
|
1654
|
+
checked = modulersOptions.value[level].children?.map((item) => item[props.optionValueName]) || [];
|
|
1653
1655
|
}
|
|
1654
1656
|
} else {
|
|
1655
1657
|
if (tempStatus.checked) {
|
|
@@ -1672,9 +1674,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1672
1674
|
checked.push(tempOption[props.optionValueName]);
|
|
1673
1675
|
if (tempOption.children) {
|
|
1674
1676
|
let allSonValues = getAllSonValues(tempOption.children);
|
|
1675
|
-
allSonValues = allSonValues.filter(
|
|
1676
|
-
(item) => item !== tempOption[props.optionValueName]
|
|
1677
|
-
);
|
|
1677
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption[props.optionValueName]);
|
|
1678
1678
|
unChecked = unChecked.concat(allSonValues);
|
|
1679
1679
|
}
|
|
1680
1680
|
for (let i = level; i > 0; i--) {
|
|
@@ -1689,9 +1689,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1689
1689
|
checked.push(tempOption2[props.optionValueName]);
|
|
1690
1690
|
if (tempOption2.children) {
|
|
1691
1691
|
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1692
|
-
allSonValues = allSonValues.filter(
|
|
1693
|
-
(item) => item !== tempOption2[props.optionValueName]
|
|
1694
|
-
);
|
|
1692
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1695
1693
|
unChecked = unChecked.concat(allSonValues);
|
|
1696
1694
|
}
|
|
1697
1695
|
}
|
|
@@ -1777,9 +1775,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1777
1775
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1778
1776
|
key: index,
|
|
1779
1777
|
class: vue.normalizeClass(["bm-multi-cascader-item", {
|
|
1780
|
-
"is-active": path.value.find(
|
|
1781
|
-
(item) => option[props.optionValueName] === item[props.optionValueName]
|
|
1782
|
-
)
|
|
1778
|
+
"is-active": path.value.find((item) => option[props.optionValueName] === item[props.optionValueName])
|
|
1783
1779
|
}]),
|
|
1784
1780
|
onClick: ($event) => handleClick(option, level, index)
|
|
1785
1781
|
}, [
|
|
@@ -1949,15 +1945,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1949
1945
|
vue.onBeforeUnmount(() => {
|
|
1950
1946
|
window.removeEventListener("resize", handleResize);
|
|
1951
1947
|
});
|
|
1952
|
-
vue.watch(
|
|
1953
|
-
()
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
{
|
|
1958
|
-
immediate: true
|
|
1959
|
-
}
|
|
1960
|
-
);
|
|
1948
|
+
vue.watch(() => props.showExpandBtn, (val) => {
|
|
1949
|
+
handleShowExpandBtn(val);
|
|
1950
|
+
}, {
|
|
1951
|
+
immediate: true
|
|
1952
|
+
});
|
|
1961
1953
|
const expandRule = vue.computed(() => {
|
|
1962
1954
|
const fixedCount = props.fixedCount && props.fixedCount >= 0 ? props.fixedCount : 0;
|
|
1963
1955
|
const fixedFields = props.fixedFields?.length ? props.fixedFields : [];
|
|
@@ -1976,15 +1968,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1976
1968
|
});
|
|
1977
1969
|
}
|
|
1978
1970
|
}
|
|
1979
|
-
vue.watch(
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
{
|
|
1985
|
-
immediate: true
|
|
1986
|
-
}
|
|
1987
|
-
);
|
|
1971
|
+
vue.watch(isExpand, (val) => {
|
|
1972
|
+
handleChangeExpand(val);
|
|
1973
|
+
}, {
|
|
1974
|
+
immediate: true
|
|
1975
|
+
});
|
|
1988
1976
|
expose({
|
|
1989
1977
|
fApi
|
|
1990
1978
|
});
|
|
@@ -1998,7 +1986,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1998
1986
|
"onUpdate:api": _cache[0] || (_cache[0] = ($event) => fApi.value = $event),
|
|
1999
1987
|
"model-value": props.value,
|
|
2000
1988
|
rule: vue.unref(rule),
|
|
2001
|
-
option,
|
|
1989
|
+
option: vue.unref(option),
|
|
2002
1990
|
onChange: handleChange
|
|
2003
1991
|
}, null, 8, ["api", "model-value", "rule", "option"])
|
|
2004
1992
|
], 2);
|
|
@@ -114,7 +114,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
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;
|
|
@@ -177,11 +179,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
177
179
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
178
180
|
onExpand?: ((...args: any[]) => any) | undefined;
|
|
179
181
|
}, {
|
|
180
|
-
value: Record<string, any>;
|
|
181
182
|
showExpandBtn: boolean;
|
|
182
183
|
showSearchIcon: boolean;
|
|
183
184
|
userRule: unknown[];
|
|
184
185
|
labelCol: Record<string, any>;
|
|
186
|
+
value: Record<string, any>;
|
|
185
187
|
ruleSpan: Record<string, any>;
|
|
186
188
|
gutter: unknown[];
|
|
187
189
|
fixedCount: number;
|
|
@@ -58,7 +58,7 @@ declare const BmShopsFilter: import("bm-admin-ui/es/utils/with-install").SFCWith
|
|
|
58
58
|
label?: string | undefined;
|
|
59
59
|
multiple?: boolean | undefined;
|
|
60
60
|
}[]>;
|
|
61
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
61
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:selected" | "change")[], "update:selected" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
62
|
labelTitle: {
|
|
63
63
|
type: StringConstructor;
|
|
64
64
|
default: string;
|
|
@@ -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
|
}
|
|
@@ -58,7 +58,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
58
|
label?: string | undefined;
|
|
59
59
|
multiple?: boolean | undefined;
|
|
60
60
|
}[]>;
|
|
61
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
61
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:selected" | "change")[], "update:selected" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
62
|
labelTitle: {
|
|
63
63
|
type: StringConstructor;
|
|
64
64
|
default: string;
|
|
@@ -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) => {
|
|
@@ -1873,7 +1859,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1873
1859
|
]);
|
|
1874
1860
|
}), 128))
|
|
1875
1861
|
])) : vue.createCommentVNode("v-if", true)
|
|
1876
|
-
],
|
|
1862
|
+
], 2112))
|
|
1877
1863
|
])
|
|
1878
1864
|
]),
|
|
1879
1865
|
vue.createElementVNode("div", _hoisted_14, [
|
|
@@ -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();
|
|
@@ -40,9 +40,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
40
|
searchVal: import("vue").Ref<string>;
|
|
41
41
|
selectAll: import("vue").Ref<boolean>;
|
|
42
42
|
indeterminate: import("vue").Ref<boolean>;
|
|
43
|
-
emptyPic: import("vue").Ref<
|
|
43
|
+
emptyPic: import("vue").Ref<(string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
44
44
|
[key: string]: any;
|
|
45
|
-
}> | null | undefined) | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
45
|
+
}> | null | undefined) | JSX.Element | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
46
|
[key: string]: any;
|
|
47
47
|
}> | null | undefined)[]>;
|
|
48
48
|
listChecked: import("vue").Ref<{}>;
|