bm-admin-ui 1.0.18-alpha → 1.0.20-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 (152) hide show
  1. package/es/components/feedback/index.js +4 -4
  2. package/es/components/input-tags-display/index.js +61 -26
  3. package/es/components/multi-cascader-compose/index.js +4 -4
  4. package/es/components/search-filter/index.js +7 -5
  5. package/es/components/shops-filter/index.js +4 -4
  6. package/es/components/staffs-selector/index.js +4 -4
  7. package/es/components/upload/index.js +89 -30
  8. package/index.esm.js +469 -760
  9. package/index.js +389 -680
  10. package/lib/components/feedback/index.js +4 -4
  11. package/lib/components/input-tags-display/index.js +60 -25
  12. package/lib/components/multi-cascader-compose/index.js +4 -4
  13. package/lib/components/search-filter/index.js +7 -5
  14. package/lib/components/shops-filter/index.js +4 -4
  15. package/lib/components/staffs-selector/index.js +4 -4
  16. package/lib/components/upload/index.js +89 -30
  17. package/package.json +1 -1
  18. package/es/components/button/index.d.ts +0 -307
  19. package/es/components/button/src/button.d.ts +0 -12
  20. package/es/components/button/src/button.vue.d.ts +0 -308
  21. package/es/components/feedback/index.d.ts +0 -1037
  22. package/es/components/feedback/src/bmAlert.vue.d.ts +0 -193
  23. package/es/components/feedback/src/bmModal.vue.d.ts +0 -839
  24. package/es/components/float-table/index.d.ts +0 -70
  25. package/es/components/float-table/src/float-table.vue.d.ts +0 -69
  26. package/es/components/flow-designer/index.d.ts +0 -7
  27. package/es/components/flow-designer/src/flow-designer.vue.d.ts +0 -6
  28. package/es/components/form-designer/index.d.ts +0 -9
  29. package/es/components/form-designer/src/form-designer.vue.d.ts +0 -8
  30. package/es/components/index.d.ts +0 -13
  31. package/es/components/input-tags-display/index.d.ts +0 -72
  32. package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +0 -69
  33. package/es/components/multi-cascader-compose/index.d.ts +0 -164
  34. package/es/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +0 -164
  35. package/es/components/multi-cascader-compose/src/props.d.ts +0 -40
  36. package/es/components/multi-cascader-compose/types.d.ts +0 -10
  37. package/es/components/over-tooltips/index.d.ts +0 -35
  38. package/es/components/over-tooltips/src/over-tooltips.vue.d.ts +0 -34
  39. package/es/components/search-filter/index.d.ts +0 -194
  40. package/es/components/search-filter/src/search-filter.d.ts +0 -57
  41. package/es/components/search-filter/src/search-filter.vue.d.ts +0 -193
  42. package/es/components/search-filter/src/search-reset-btn.vue.d.ts +0 -50
  43. package/es/components/shops-filter/index.d.ts +0 -99
  44. package/es/components/shops-filter/src/shops-filter.d.ts +0 -25
  45. package/es/components/shops-filter/src/shops-filter.vue.d.ts +0 -98
  46. package/es/components/staffs-selector/index.d.ts +0 -109
  47. package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +0 -97
  48. package/es/components/staffs-selector/src/radioCmp.vue.d.ts +0 -31
  49. package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +0 -108
  50. package/es/components/staffs-selector/src/variedCmp.vue.d.ts +0 -62
  51. package/es/components/timeline/index.d.ts +0 -107
  52. package/es/components/timeline/src/props.d.ts +0 -24
  53. package/es/components/timeline/src/timeline-item.vue.d.ts +0 -65
  54. package/es/components/timeline/src/timeline.vue.d.ts +0 -42
  55. package/es/components/upload/index.d.ts +0 -135
  56. package/es/components/upload/src/icons.d.ts +0 -13
  57. package/es/components/upload/src/upload.vue.d.ts +0 -134
  58. package/es/components/upload/utils/index.d.ts +0 -7
  59. package/es/index.d.ts +0 -6
  60. package/es/utils/bm-admin-ui-resolver.d.ts +0 -9
  61. package/es/utils/vxe-table.d.ts +0 -6
  62. package/es/utils/with-install.d.ts +0 -3
  63. package/lib/components/button/index.d.ts +0 -307
  64. package/lib/components/button/src/button.d.ts +0 -12
  65. package/lib/components/button/src/button.vue.d.ts +0 -308
  66. package/lib/components/feedback/index.d.ts +0 -1037
  67. package/lib/components/feedback/src/bmAlert.vue.d.ts +0 -193
  68. package/lib/components/feedback/src/bmModal.vue.d.ts +0 -839
  69. package/lib/components/float-table/index.d.ts +0 -70
  70. package/lib/components/float-table/src/float-table.vue.d.ts +0 -69
  71. package/lib/components/flow-designer/index.d.ts +0 -7
  72. package/lib/components/flow-designer/src/flow-designer.vue.d.ts +0 -6
  73. package/lib/components/form-designer/index.d.ts +0 -9
  74. package/lib/components/form-designer/src/form-designer.vue.d.ts +0 -8
  75. package/lib/components/index.d.ts +0 -13
  76. package/lib/components/input-tags-display/index.d.ts +0 -72
  77. package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +0 -69
  78. package/lib/components/multi-cascader-compose/index.d.ts +0 -164
  79. package/lib/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +0 -164
  80. package/lib/components/multi-cascader-compose/src/props.d.ts +0 -40
  81. package/lib/components/multi-cascader-compose/types.d.ts +0 -10
  82. package/lib/components/over-tooltips/index.d.ts +0 -35
  83. package/lib/components/over-tooltips/src/over-tooltips.vue.d.ts +0 -34
  84. package/lib/components/search-filter/index.d.ts +0 -194
  85. package/lib/components/search-filter/src/search-filter.d.ts +0 -57
  86. package/lib/components/search-filter/src/search-filter.vue.d.ts +0 -193
  87. package/lib/components/search-filter/src/search-reset-btn.vue.d.ts +0 -50
  88. package/lib/components/shops-filter/index.d.ts +0 -99
  89. package/lib/components/shops-filter/src/shops-filter.d.ts +0 -25
  90. package/lib/components/shops-filter/src/shops-filter.vue.d.ts +0 -98
  91. package/lib/components/staffs-selector/index.d.ts +0 -109
  92. package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +0 -97
  93. package/lib/components/staffs-selector/src/radioCmp.vue.d.ts +0 -31
  94. package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +0 -108
  95. package/lib/components/staffs-selector/src/variedCmp.vue.d.ts +0 -62
  96. package/lib/components/timeline/index.d.ts +0 -107
  97. package/lib/components/timeline/src/props.d.ts +0 -24
  98. package/lib/components/timeline/src/timeline-item.vue.d.ts +0 -65
  99. package/lib/components/timeline/src/timeline.vue.d.ts +0 -42
  100. package/lib/components/upload/index.d.ts +0 -135
  101. package/lib/components/upload/src/icons.d.ts +0 -13
  102. package/lib/components/upload/src/upload.vue.d.ts +0 -134
  103. package/lib/components/upload/utils/index.d.ts +0 -7
  104. package/lib/index.d.ts +0 -6
  105. package/lib/utils/bm-admin-ui-resolver.d.ts +0 -9
  106. package/lib/utils/vxe-table.d.ts +0 -6
  107. package/lib/utils/with-install.d.ts +0 -3
  108. package/types/components/button/index.d.ts +0 -307
  109. package/types/components/button/src/button.d.ts +0 -12
  110. package/types/components/button/src/button.vue.d.ts +0 -308
  111. package/types/components/feedback/index.d.ts +0 -1037
  112. package/types/components/feedback/src/bmAlert.vue.d.ts +0 -193
  113. package/types/components/feedback/src/bmModal.vue.d.ts +0 -839
  114. package/types/components/float-table/index.d.ts +0 -70
  115. package/types/components/float-table/src/float-table.vue.d.ts +0 -69
  116. package/types/components/flow-designer/index.d.ts +0 -7
  117. package/types/components/flow-designer/src/flow-designer.vue.d.ts +0 -6
  118. package/types/components/form-designer/index.d.ts +0 -9
  119. package/types/components/form-designer/src/form-designer.vue.d.ts +0 -8
  120. package/types/components/index.d.ts +0 -13
  121. package/types/components/input-tags-display/index.d.ts +0 -72
  122. package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +0 -69
  123. package/types/components/multi-cascader-compose/index.d.ts +0 -164
  124. package/types/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +0 -164
  125. package/types/components/multi-cascader-compose/src/props.d.ts +0 -40
  126. package/types/components/multi-cascader-compose/types.d.ts +0 -10
  127. package/types/components/over-tooltips/index.d.ts +0 -35
  128. package/types/components/over-tooltips/src/over-tooltips.vue.d.ts +0 -34
  129. package/types/components/search-filter/index.d.ts +0 -194
  130. package/types/components/search-filter/src/search-filter.d.ts +0 -57
  131. package/types/components/search-filter/src/search-filter.vue.d.ts +0 -193
  132. package/types/components/search-filter/src/search-reset-btn.vue.d.ts +0 -50
  133. package/types/components/shops-filter/index.d.ts +0 -99
  134. package/types/components/shops-filter/src/shops-filter.d.ts +0 -25
  135. package/types/components/shops-filter/src/shops-filter.vue.d.ts +0 -98
  136. package/types/components/staffs-selector/index.d.ts +0 -109
  137. package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +0 -97
  138. package/types/components/staffs-selector/src/radioCmp.vue.d.ts +0 -31
  139. package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +0 -108
  140. package/types/components/staffs-selector/src/variedCmp.vue.d.ts +0 -62
  141. package/types/components/timeline/index.d.ts +0 -107
  142. package/types/components/timeline/src/props.d.ts +0 -24
  143. package/types/components/timeline/src/timeline-item.vue.d.ts +0 -65
  144. package/types/components/timeline/src/timeline.vue.d.ts +0 -42
  145. package/types/components/upload/index.d.ts +0 -135
  146. package/types/components/upload/src/icons.d.ts +0 -13
  147. package/types/components/upload/src/upload.vue.d.ts +0 -134
  148. package/types/components/upload/utils/index.d.ts +0 -7
  149. package/types/index.d.ts +0 -6
  150. package/types/utils/bm-admin-ui-resolver.d.ts +0 -9
  151. package/types/utils/vxe-table.d.ts +0 -6
  152. package/types/utils/with-install.d.ts +0 -3
@@ -104,7 +104,7 @@ function boundAlpha(a) {
104
104
  */
105
105
  function convertToPercentage(n) {
106
106
  if (n <= 1) {
107
- return Number(n) * 100 + "%";
107
+ return "".concat(Number(n) * 100, "%");
108
108
  }
109
109
  return n;
110
110
  }
@@ -486,12 +486,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
486
486
  // <http://www.w3.org/TR/css3-values/#number-value>
487
487
  var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
488
488
  // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
489
- var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
489
+ var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
490
490
  // Actual matching.
491
491
  // Parentheses and commas are optional, but not required.
492
492
  // Whitespace can take the place of commas or opening paren
493
- var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
494
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
493
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
494
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
495
495
  var matchers = {
496
496
  CSS_UNIT: new RegExp(CSS_UNIT),
497
497
  rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
@@ -76,7 +76,7 @@ function boundAlpha(a) {
76
76
  */
77
77
  function convertToPercentage(n) {
78
78
  if (n <= 1) {
79
- return Number(n) * 100 + "%";
79
+ return "".concat(Number(n) * 100, "%");
80
80
  }
81
81
  return n;
82
82
  }
@@ -458,12 +458,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
458
458
  // <http://www.w3.org/TR/css3-values/#number-value>
459
459
  var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
460
460
  // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
461
- var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
461
+ var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
462
462
  // Actual matching.
463
463
  // Parentheses and commas are optional, but not required.
464
464
  // Whitespace can take the place of commas or opening paren
465
- var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
466
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
465
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
466
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
467
467
  var matchers = {
468
468
  CSS_UNIT: new RegExp(CSS_UNIT),
469
469
  rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
@@ -1163,6 +1163,10 @@ const _sfc_main = vue.defineComponent({
1163
1163
  type: Boolean,
1164
1164
  default: true
1165
1165
  },
1166
+ unitStr: {
1167
+ type: String,
1168
+ default: "\u9879"
1169
+ },
1166
1170
  btnText: {
1167
1171
  type: String,
1168
1172
  default: "\u6DFB\u52A0"
@@ -1170,6 +1174,16 @@ const _sfc_main = vue.defineComponent({
1170
1174
  placement: {
1171
1175
  type: String,
1172
1176
  default: "bottom"
1177
+ },
1178
+ toolTipProps: {
1179
+ type: Object,
1180
+ default: () => {
1181
+ return {};
1182
+ }
1183
+ },
1184
+ alwaysInvoke: {
1185
+ type: Boolean,
1186
+ default: true
1173
1187
  }
1174
1188
  },
1175
1189
  emits: ["clear", "update:list", "addClick"],
@@ -1186,13 +1200,38 @@ const _sfc_main = vue.defineComponent({
1186
1200
  }
1187
1201
  }
1188
1202
  function toAddTags() {
1189
- emit("addClick");
1203
+ if (!props.list.length || props.alwaysInvoke)
1204
+ emit("addClick");
1190
1205
  }
1206
+ const tooltipConfig = ref({
1207
+ align: void 0,
1208
+ arrowPointAtCenter: false,
1209
+ autoAdjustOverflow: true,
1210
+ color: "#fff",
1211
+ defaultVisible: false,
1212
+ destroyTooltipOnHide: false,
1213
+ getPopupContainer,
1214
+ mouseEnterDelay: 0.1,
1215
+ mouseLeaveDelay: 0.1,
1216
+ overlayClassName: "__list-filter-popover",
1217
+ overlayStyle: null,
1218
+ placement: props.placement,
1219
+ trigger: "hover"
1220
+ });
1221
+ watch(() => props.toolTipProps, (tooltipprop) => {
1222
+ tooltipConfig.value = {
1223
+ ...tooltipConfig.value,
1224
+ ...tooltipprop
1225
+ };
1226
+ }, {
1227
+ immediate: true,
1228
+ deep: true
1229
+ });
1191
1230
  return {
1192
1231
  containId,
1193
1232
  clear,
1194
1233
  toAddTags,
1195
- getPopupContainer
1234
+ tooltipConfig
1196
1235
  };
1197
1236
  }
1198
1237
  });
@@ -1201,11 +1240,9 @@ const _hoisted_2 = ["id"];
1201
1240
  const _hoisted_3 = { class: "pop-seleted" };
1202
1241
  const _hoisted_4 = { class: "pop-seleted-title" };
1203
1242
  const _hoisted_5 = /* @__PURE__ */ vue.createTextVNode(" \u5DF2\u9009\u62E9");
1204
- const _hoisted_6 = /* @__PURE__ */ vue.createTextVNode("\u9879 ");
1205
- const _hoisted_7 = { class: "select-input-wrapper" };
1206
- const _hoisted_8 = { key: 1 };
1207
- const _hoisted_9 = { key: 2 };
1208
- const _hoisted_10 = /* @__PURE__ */ vue.createElementVNode("div", null, null, -1);
1243
+ const _hoisted_6 = { key: 1 };
1244
+ const _hoisted_7 = { key: 2 };
1245
+ const _hoisted_8 = /* @__PURE__ */ vue.createElementVNode("div", null, null, -1);
1209
1246
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1210
1247
  const _component_a_tag = vue.resolveComponent("a-tag");
1211
1248
  const _component_CloseCircleFilled = vue.resolveComponent("CloseCircleFilled");
@@ -1217,18 +1254,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1217
1254
  id: _ctx.containId,
1218
1255
  class: "bm-tags-display-wrapper"
1219
1256
  }, [
1220
- vue.createVNode(_component_ToolTip, {
1221
- color: "#fff",
1222
- "get-popup-container": _ctx.getPopupContainer,
1223
- placement: _ctx.placement,
1224
- "overlay-class-name": "__list-filter-popover"
1225
- }, {
1257
+ vue.createVNode(_component_ToolTip, vue.normalizeProps(vue.guardReactiveProps(_ctx.tooltipConfig)), {
1226
1258
  title: vue.withCtx(() => [
1227
1259
  vue.createElementVNode("div", _hoisted_3, [
1228
1260
  vue.createElementVNode("div", _hoisted_4, [
1229
1261
  _hoisted_5,
1230
1262
  vue.createElementVNode("span", null, vue.toDisplayString(_ctx.list.length), 1),
1231
- _hoisted_6
1263
+ vue.createTextVNode(vue.toDisplayString(_ctx.unitStr), 1)
1232
1264
  ])
1233
1265
  ]),
1234
1266
  vue.createElementVNode("div", {
@@ -1250,7 +1282,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1250
1282
  ], 32)
1251
1283
  ]),
1252
1284
  default: vue.withCtx(() => [
1253
- vue.createElementVNode("div", _hoisted_7, [
1285
+ vue.createElementVNode("div", {
1286
+ class: "select-input-wrapper",
1287
+ onClick: _cache[4] || (_cache[4] = (...args) => _ctx.toAddTags && _ctx.toAddTags(...args))
1288
+ }, [
1254
1289
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
1255
1290
  return vue.openBlock(), vue.createBlock(_component_a_tag, {
1256
1291
  key: item.key
@@ -1274,9 +1309,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1274
1309
  ])
1275
1310
  ]),
1276
1311
  _: 1
1277
- }, 8, ["get-popup-container", "placement"])
1312
+ }, 16)
1278
1313
  ], 8, _hoisted_2)) : vue.createCommentVNode("v-if", true),
1279
- _ctx.showEmptyBtn && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
1314
+ _ctx.showEmptyBtn && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
1280
1315
  vue.createVNode(_component_Button, {
1281
1316
  onClick: vue.withModifiers(_ctx.toAddTags, ["stop"])
1282
1317
  }, {
@@ -1286,13 +1321,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1286
1321
  _: 1
1287
1322
  }, 8, ["onClick"])
1288
1323
  ])) : vue.createCommentVNode("v-if", true),
1289
- _ctx.showEmpty && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
1324
+ _ctx.showEmpty && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
1290
1325
  vue.createElementVNode("div", {
1291
1326
  class: "selector-empty-input",
1292
- onClick: _cache[4] || (_cache[4] = vue.withModifiers((...args) => _ctx.toAddTags && _ctx.toAddTags(...args), ["stop"]))
1293
- }, "\xA0\xA0" + vue.toDisplayString(_ctx.placeholder), 1)
1327
+ onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => _ctx.toAddTags && _ctx.toAddTags(...args), ["stop"]))
1328
+ }, " \xA0\xA0" + vue.toDisplayString(_ctx.placeholder), 1)
1294
1329
  ])) : vue.createCommentVNode("v-if", true),
1295
- _hoisted_10
1330
+ _hoisted_8
1296
1331
  ]);
1297
1332
  }
1298
1333
  var InputTagsDisplay = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "input-tags-display.vue"]]);
@@ -69,7 +69,7 @@ function boundAlpha(a) {
69
69
  */
70
70
  function convertToPercentage(n) {
71
71
  if (n <= 1) {
72
- return Number(n) * 100 + "%";
72
+ return "".concat(Number(n) * 100, "%");
73
73
  }
74
74
  return n;
75
75
  }
@@ -451,12 +451,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
451
451
  // <http://www.w3.org/TR/css3-values/#number-value>
452
452
  var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
453
453
  // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
454
- var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
454
+ var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
455
455
  // Actual matching.
456
456
  // Parentheses and commas are optional, but not required.
457
457
  // Whitespace can take the place of commas or opening paren
458
- var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
459
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
458
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
459
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
460
460
  var matchers = {
461
461
  CSS_UNIT: new RegExp(CSS_UNIT),
462
462
  rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
@@ -74,7 +74,7 @@ function boundAlpha(a) {
74
74
  */
75
75
  function convertToPercentage(n) {
76
76
  if (n <= 1) {
77
- return Number(n) * 100 + "%";
77
+ return "".concat(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 = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
459
+ var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(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|\\(]+(" + 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*\\)?";
463
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
464
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
465
465
  var matchers = {
466
466
  CSS_UNIT: new RegExp(CSS_UNIT),
467
467
  rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
@@ -1969,7 +1969,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
1969
1969
  }
1970
1970
  }
1971
1971
  vue.watch(isExpand, (val) => {
1972
- handleChangeExpand(val);
1972
+ setTimeout(() => {
1973
+ handleChangeExpand(val);
1974
+ }, 0);
1973
1975
  }, {
1974
1976
  immediate: true
1975
1977
  });
@@ -81,7 +81,7 @@ function boundAlpha(a) {
81
81
  */
82
82
  function convertToPercentage(n) {
83
83
  if (n <= 1) {
84
- return Number(n) * 100 + "%";
84
+ return "".concat(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 = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
466
+ var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(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|\\(]+(" + 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*\\)?";
470
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
471
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
472
472
  var matchers = {
473
473
  CSS_UNIT: new RegExp(CSS_UNIT),
474
474
  rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
@@ -84,7 +84,7 @@ function boundAlpha(a) {
84
84
  */
85
85
  function convertToPercentage(n) {
86
86
  if (n <= 1) {
87
- return Number(n) * 100 + "%";
87
+ return "".concat(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 = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
469
+ var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(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|\\(]+(" + 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*\\)?";
473
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
474
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
475
475
  var matchers = {
476
476
  CSS_UNIT: new RegExp(CSS_UNIT),
477
477
  rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
@@ -69,7 +69,7 @@ function boundAlpha(a) {
69
69
  */
70
70
  function convertToPercentage(n) {
71
71
  if (n <= 1) {
72
- return Number(n) * 100 + "%";
72
+ return "".concat(Number(n) * 100, "%");
73
73
  }
74
74
  return n;
75
75
  }
@@ -451,12 +451,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
451
451
  // <http://www.w3.org/TR/css3-values/#number-value>
452
452
  var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
453
453
  // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
454
- var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
454
+ var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
455
455
  // Actual matching.
456
456
  // Parentheses and commas are optional, but not required.
457
457
  // Whitespace can take the place of commas or opening paren
458
- var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
459
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
458
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
459
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
460
460
  var matchers = {
461
461
  CSS_UNIT: new RegExp(CSS_UNIT),
462
462
  rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
@@ -1363,18 +1363,29 @@ const _sfc_main = {
1363
1363
  setup(props, { emit }) {
1364
1364
  let acceptList = [
1365
1365
  ".xlsx",
1366
+ ".XLSX",
1366
1367
  ".pdf",
1368
+ ".PDF",
1367
1369
  ".doc",
1370
+ ".DOC",
1368
1371
  ".docx",
1372
+ ".DOCX",
1369
1373
  ".jpg",
1370
- ".jpeg",
1371
1374
  ".JPG",
1375
+ ".jpeg",
1376
+ ".JPEG",
1372
1377
  ".png",
1378
+ ".PNG",
1373
1379
  ".rar",
1380
+ ".RAR",
1374
1381
  ".zip",
1382
+ ".ZIP",
1375
1383
  ".ppt",
1384
+ ".PPT",
1376
1385
  ".pptx",
1377
- ".mp4"
1386
+ ".PPTX",
1387
+ ".mp4",
1388
+ ".MP4"
1378
1389
  ];
1379
1390
  const state = vue.reactive({
1380
1391
  uploadBarColor: "#4DA0FF",
@@ -1437,26 +1448,26 @@ const _sfc_main = {
1437
1448
  }
1438
1449
  });
1439
1450
  const methods = {
1440
- customUploadRequest(file) {
1441
- const updateUploadProgress = (progress) => {
1442
- if (methods.fileIsDelete(file)) {
1443
- return;
1444
- }
1445
- state.fileList[file.uid] = {
1446
- ...state.fileList[file.uid],
1447
- progress
1448
- };
1451
+ updateUploadProgress(file, progress) {
1452
+ if (methods.fileIsDelete(file)) {
1453
+ return;
1454
+ }
1455
+ state.fileList[file.uid] = {
1456
+ ...state.fileList[file.uid],
1457
+ progress
1449
1458
  };
1459
+ },
1460
+ customUploadRequest(file) {
1450
1461
  props.uploadRequest?.(file, {
1451
1462
  onUploadProgress: (e) => {
1452
1463
  let progress = Math.round(e.loaded / e.total * 100);
1453
1464
  if (props.holdProgress) {
1454
1465
  progress = progress > props.holdProgress ? props.holdProgress : progress;
1455
1466
  }
1456
- updateUploadProgress(progress);
1467
+ methods.updateUploadProgress(file, progress);
1457
1468
  }
1458
1469
  }).then(function(data) {
1459
- updateUploadProgress(100);
1470
+ methods.updateUploadProgress(file, 100);
1460
1471
  methods.uploadSuccess(data, file);
1461
1472
  }).catch(function(error) {
1462
1473
  console.error(error);
@@ -1474,11 +1485,13 @@ const _sfc_main = {
1474
1485
  return;
1475
1486
  }
1476
1487
  emit("successFile", data);
1488
+ state.fileList[file.uid].status = "success";
1477
1489
  let uri = data?.url;
1478
1490
  let item = state.extraConfigs.fileDetail ? {
1479
1491
  name: file.name,
1480
1492
  size: file.size,
1481
1493
  type: file.type,
1494
+ uid: file.uid,
1482
1495
  url: uri
1483
1496
  } : uri;
1484
1497
  state.uploadedList.push(item);
@@ -1490,9 +1503,7 @@ const _sfc_main = {
1490
1503
  if (methods.fileIsDelete(file)) {
1491
1504
  return;
1492
1505
  }
1493
- if (file.uid && state.fileList[file.uid]) {
1494
- state.fileList[file.uid].status = "error";
1495
- }
1506
+ state.fileList[file.uid].status = "error";
1496
1507
  emit("error", error);
1497
1508
  },
1498
1509
  async deleteFile(uid) {
@@ -1510,7 +1521,7 @@ const _sfc_main = {
1510
1521
  state.onepViewImageHover[uid] = false;
1511
1522
  },
1512
1523
  viewOnePicture(item) {
1513
- if (["img", "image", "png", "jpg", "jpeg"].includes(item.type.toLowerCase())) {
1524
+ if (["img", "image", "png", "PNG", "jpg", "JPG", "jpeg", "JPEG"].includes(item.type.toLowerCase())) {
1514
1525
  state.previewVisible = true;
1515
1526
  state.onepViewImage = item;
1516
1527
  return;
@@ -1563,9 +1574,14 @@ const _sfc_main = {
1563
1574
  }
1564
1575
  };
1565
1576
  vue.watch(() => props.defaultList, function(list) {
1566
- if (list.length) {
1577
+ if (list?.length) {
1578
+ list.forEach((item) => {
1579
+ if (!item.uid) {
1580
+ item.uid = utils.getuid();
1581
+ }
1582
+ });
1567
1583
  list.forEach(function(item) {
1568
- let uid = utils.getuid();
1584
+ let uid = item.uid || utils.getuid();
1569
1585
  if (!item.url.includes("http") && !item.url.includes(CLOUND_PRE))
1570
1586
  item.url = props.cloudReadUrl + item.url;
1571
1587
  state.fileList[uid] = {
@@ -1576,7 +1592,9 @@ const _sfc_main = {
1576
1592
  progress: 100,
1577
1593
  isDoneDeloy: true
1578
1594
  };
1579
- state.uploadedList.push(item);
1595
+ if (!state.uploadedList.find((item2) => item2.uid === uid)) {
1596
+ state.uploadedList.push(item);
1597
+ }
1580
1598
  });
1581
1599
  } else {
1582
1600
  state.fileList = {};
@@ -1734,27 +1752,59 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1734
1752
  onMouseleave: ($event) => _ctx.pictureHoverLeave(item.uid),
1735
1753
  onClick: _cache[0] || (_cache[0] = (e) => e.stopPropagation())
1736
1754
  }, [
1737
- item.type === "pdf" ? (vue.openBlock(), vue.createElementBlock("img", {
1755
+ ["pdf", "PDF", "application/pdf"].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1738
1756
  key: 0,
1739
1757
  class: "bm-upload__picture-result__image",
1740
1758
  src: $setup.icons.pdf,
1741
1759
  alt: "avatar"
1742
- }, null, 8, _hoisted_4)) : item.type === "xlsx" ? (vue.openBlock(), vue.createElementBlock("img", {
1760
+ }, null, 8, _hoisted_4)) : [
1761
+ "xlsx",
1762
+ "XLSX",
1763
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
1764
+ ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1743
1765
  key: 1,
1744
1766
  class: "bm-upload__picture-result__image",
1745
1767
  src: $setup.icons.excel,
1746
1768
  alt: "avatar"
1747
- }, null, 8, _hoisted_5)) : item.type === "ppt" ? (vue.openBlock(), vue.createElementBlock("img", {
1769
+ }, null, 8, _hoisted_5)) : [
1770
+ "ppt",
1771
+ "PPT",
1772
+ "application/vnd.ms-powerpoint",
1773
+ "pptx",
1774
+ "PPTX",
1775
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation"
1776
+ ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1748
1777
  key: 2,
1749
1778
  class: "bm-upload__picture-result__image",
1750
1779
  src: $setup.icons.ppt,
1751
1780
  alt: "avatar"
1752
- }, null, 8, _hoisted_6)) : ["docx", "doc"].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1781
+ }, null, 8, _hoisted_6)) : [
1782
+ "doc",
1783
+ "DOC",
1784
+ "application/msword",
1785
+ "docx",
1786
+ "DOCX",
1787
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
1788
+ ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1753
1789
  key: 3,
1754
1790
  class: "bm-upload__picture-result__image",
1755
1791
  src: $setup.icons.doc,
1756
1792
  alt: "avatar"
1757
- }, null, 8, _hoisted_7)) : ["img", "image", "png", "jpg", "jpeg"].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1793
+ }, null, 8, _hoisted_7)) : [
1794
+ "img",
1795
+ "image",
1796
+ "png",
1797
+ "PNG",
1798
+ "image/png",
1799
+ "jpg",
1800
+ "JPG",
1801
+ "jpeg",
1802
+ "JPEG",
1803
+ "image/jpeg",
1804
+ "gif",
1805
+ "GIF",
1806
+ "image/gif"
1807
+ ].includes(item.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1758
1808
  key: 4,
1759
1809
  class: "bm-upload__picture-result__image",
1760
1810
  src: item.url,
@@ -1881,7 +1931,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1881
1931
  }, {
1882
1932
  default: vue.withCtx(() => [
1883
1933
  vue.createElementVNode("div", _hoisted_32, [
1884
- ["img", "image", "png", "jpg", "jpeg"].includes(_ctx.onepViewImage.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1934
+ [
1935
+ "img",
1936
+ "image",
1937
+ "png",
1938
+ "PNG",
1939
+ "jpg",
1940
+ "JPG",
1941
+ "jpeg",
1942
+ "JPEG"
1943
+ ].includes(_ctx.onepViewImage.type) ? (vue.openBlock(), vue.createElementBlock("img", {
1885
1944
  key: 0,
1886
1945
  style: { "width": "100%" },
1887
1946
  src: _ctx.onepViewImage.url,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bm-admin-ui",
3
- "version": "1.0.18-alpha",
3
+ "version": "1.0.20-alpha",
4
4
  "private": false,
5
5
  "description": "An Admin Component Library for Bm",
6
6
  "license": "UNLICENSED",