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.
Files changed (84) hide show
  1. package/es/components/feedback/index.js +19 -6
  2. package/es/components/float-table/index.d.ts +2 -2
  3. package/es/components/float-table/index.js +27 -36
  4. package/es/components/float-table/src/float-table.vue.d.ts +2 -2
  5. package/es/components/input-tags-display/index.d.ts +6 -0
  6. package/es/components/input-tags-display/index.js +22 -8
  7. package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +6 -0
  8. package/es/components/multi-cascader-compose/index.d.ts +3 -3
  9. package/es/components/multi-cascader-compose/index.js +25 -28
  10. package/es/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +3 -3
  11. package/es/components/over-tooltips/index.js +20 -27
  12. package/es/components/search-filter/index.d.ts +4 -2
  13. package/es/components/search-filter/index.js +36 -48
  14. package/es/components/search-filter/src/search-filter.vue.d.ts +4 -2
  15. package/es/components/shops-filter/index.d.ts +1 -1
  16. package/es/components/shops-filter/index.js +30 -23
  17. package/es/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
  18. package/es/components/staffs-selector/index.js +98 -115
  19. package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +2 -2
  20. package/es/components/timeline/index.d.ts +20 -6
  21. package/es/components/timeline/index.js +6 -6
  22. package/es/components/timeline/src/props.d.ts +6 -2
  23. package/es/components/timeline/src/timeline-item.vue.d.ts +20 -6
  24. package/es/components/upload/index.d.ts +9 -0
  25. package/es/components/upload/index.js +136 -93
  26. package/es/components/upload/src/upload.vue.d.ts +9 -0
  27. package/index.esm.js +1068 -37345
  28. package/index.js +1068 -37345
  29. package/lib/components/feedback/index.js +18 -5
  30. package/lib/components/float-table/index.d.ts +2 -2
  31. package/lib/components/float-table/index.js +27 -36
  32. package/lib/components/float-table/src/float-table.vue.d.ts +2 -2
  33. package/lib/components/input-tags-display/index.d.ts +6 -0
  34. package/lib/components/input-tags-display/index.js +22 -8
  35. package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +6 -0
  36. package/lib/components/multi-cascader-compose/index.d.ts +3 -3
  37. package/lib/components/multi-cascader-compose/index.js +25 -28
  38. package/lib/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +3 -3
  39. package/lib/components/over-tooltips/index.js +20 -27
  40. package/lib/components/search-filter/index.d.ts +4 -2
  41. package/lib/components/search-filter/index.js +36 -48
  42. package/lib/components/search-filter/src/search-filter.vue.d.ts +4 -2
  43. package/lib/components/shops-filter/index.d.ts +1 -1
  44. package/lib/components/shops-filter/index.js +30 -23
  45. package/lib/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
  46. package/lib/components/staffs-selector/index.js +98 -115
  47. package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +2 -2
  48. package/lib/components/timeline/index.d.ts +20 -6
  49. package/lib/components/timeline/index.js +6 -6
  50. package/lib/components/timeline/src/props.d.ts +6 -2
  51. package/lib/components/timeline/src/timeline-item.vue.d.ts +20 -6
  52. package/lib/components/upload/index.d.ts +9 -0
  53. package/lib/components/upload/index.js +136 -93
  54. package/lib/components/upload/src/upload.vue.d.ts +9 -0
  55. package/package.json +29 -29
  56. package/theme-chalk/button.css +1 -1
  57. package/theme-chalk/feedback.css +1 -1
  58. package/theme-chalk/float-table.css +1 -1
  59. package/theme-chalk/floating-vue.css +1 -1
  60. package/theme-chalk/flow-designer.css +1 -1
  61. package/theme-chalk/index.css +1 -1
  62. package/theme-chalk/input-tags-display.css +1 -1
  63. package/theme-chalk/modal.css +1 -1
  64. package/theme-chalk/multi-cascader-compose.css +1 -1
  65. package/theme-chalk/over-tooltips.css +1 -1
  66. package/theme-chalk/search-filter.css +1 -1
  67. package/theme-chalk/timeline.css +1 -1
  68. package/theme-chalk/upload.css +1 -1
  69. package/types/components/float-table/index.d.ts +2 -2
  70. package/types/components/float-table/src/float-table.vue.d.ts +2 -2
  71. package/types/components/input-tags-display/index.d.ts +6 -0
  72. package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +6 -0
  73. package/types/components/multi-cascader-compose/index.d.ts +3 -3
  74. package/types/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +3 -3
  75. package/types/components/search-filter/index.d.ts +4 -2
  76. package/types/components/search-filter/src/search-filter.vue.d.ts +4 -2
  77. package/types/components/shops-filter/index.d.ts +1 -1
  78. package/types/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
  79. package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +2 -2
  80. package/types/components/timeline/index.d.ts +20 -6
  81. package/types/components/timeline/src/props.d.ts +6 -2
  82. package/types/components/timeline/src/timeline-item.vue.d.ts +20 -6
  83. package/types/components/upload/index.d.ts +9 -0
  84. package/types/components/upload/src/upload.vue.d.ts +9 -0
@@ -66,7 +66,7 @@ function boundAlpha(a) {
66
66
  */
67
67
  function convertToPercentage(n) {
68
68
  if (n <= 1) {
69
- return "".concat(Number(n) * 100, "%");
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 = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
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|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
456
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\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
- () => props.showExpandBtn,
1946
- (val) => {
1947
- handleShowExpandBtn(val);
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
- isExpand,
1973
- (val) => {
1974
- handleChangeExpand(val);
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);
@@ -114,7 +114,9 @@ declare const _default: import("vue").DefineComponent<{
114
114
  gutter: unknown[];
115
115
  };
116
116
  form: {
117
- labelCol: Record<string, any>;
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, ("change" | "update:selected")[], "change" | "update:selected", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
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;
@@ -70,7 +70,7 @@ function boundAlpha(a) {
70
70
  */
71
71
  function convertToPercentage(n) {
72
72
  if (n <= 1) {
73
- return "".concat(Number(n) * 100, "%");
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 = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
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|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
460
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\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
- (item) => {
1331
- return item.multiple ? [] : "";
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
- () => state.shopCheck,
1339
- () => {
1340
- let list = [];
1341
- for (let [key, value] of Object.entries(state.shopCheck)) {
1342
- value && list.push(key);
1343
- }
1344
- state.selected = list;
1345
- emit("update:selected", list);
1346
- emit("change", list);
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
  }
@@ -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, ("change" | "update:selected")[], "change" | "update:selected", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
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;
@@ -71,7 +71,7 @@ function boundAlpha(a) {
71
71
  */
72
72
  function convertToPercentage(n) {
73
73
  if (n <= 1) {
74
- return "".concat(Number(n) * 100, "%");
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 = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
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|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
461
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\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
- () => state.listChecked,
1252
- () => {
1253
- let list = [];
1254
- for (let [key, value] of Object.entries(state.listChecked)) {
1255
- value && list.push(key);
1256
- }
1257
- if (props.limit > 0 && list.length >= props.limit)
1258
- state.isFulfill = true;
1259
- else
1260
- state.isFulfill = false;
1261
- methods.setState();
1262
- emit("update:selected", list);
1263
- },
1264
- { deep: true }
1265
- );
1266
- watch(
1267
- () => state.departmentChecked,
1268
- () => {
1269
- let flatMap = props.dataMap;
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
- for (let key of curselect) {
1279
- let obj = flatMap.get(key);
1280
- if (obj && !curselect.has(obj["parent"])) {
1281
- hadselected.add(key);
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) + "\u4EBA", 1),
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) => {
@@ -1623,77 +1625,61 @@ const _sfc_main$1 = defineComponent({
1623
1625
  });
1624
1626
  },
1625
1627
  getSelectName(key) {
1626
- let data = props.dataMap.get(String(key)) || null;
1628
+ let data = props.dataMap.get(key) || null;
1627
1629
  return data ? data.title : "\u672A\u77E5";
1628
1630
  }
1629
1631
  };
1630
- watch(
1631
- () => departmentChecked,
1632
- () => {
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);
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
- for (let key of curselect) {
1643
- let obj = flatMap.get(key);
1644
- if (obj && !curselect.has(obj["parent"])) {
1645
- hadselected.add(key);
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
- emit("update:selected", Array.from(hadselected));
1649
- },
1650
- { deep: true }
1651
- );
1652
- watch(
1653
- () => staffsChecked,
1654
- () => {
1655
- let set = new Set(props.selected.length ? props.selected : null);
1656
- for (let [key, value] of Object.entries(staffsChecked.value)) {
1657
- if (value) {
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
- emit("update:selected", Array.from(set));
1664
- },
1665
- { deep: true }
1666
- );
1667
- watch(
1668
- () => shopChecked,
1669
- () => {
1670
- let set = new Set(props.selected.length ? props.selected : null);
1671
- for (let [key, value] of Object.entries(shopChecked.value)) {
1672
- if (value) {
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
- emit("update:selected", Array.from(set));
1679
- },
1680
- { deep: true }
1681
- );
1682
- watch(
1683
- () => groupChecked,
1684
- () => {
1685
- let set = new Set(props.selected.length ? props.selected : null);
1686
- for (let [key, value] of Object.entries(groupChecked.value)) {
1687
- if (value) {
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
- emit("update:selected", Array.from(set));
1694
- },
1695
- { deep: true }
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
- ], 64))
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();
@@ -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<JSX.Element | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
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<{}>;