bm-admin-ui 1.0.10-alpha → 1.0.13-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 (66) hide show
  1. package/es/components/feedback/index.js +19 -2
  2. package/es/components/float-table/index.js +36 -27
  3. package/es/components/index.d.ts +1 -0
  4. package/es/components/index.js +1 -0
  5. package/es/components/input-tags-display/index.d.ts +75 -0
  6. package/es/components/input-tags-display/index.js +1286 -0
  7. package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +72 -0
  8. package/es/components/multi-cascader-compose/index.js +24 -8
  9. package/es/components/over-tooltips/index.d.ts +2 -2
  10. package/es/components/over-tooltips/index.js +41 -25
  11. package/es/components/over-tooltips/src/over-tooltips.vue.d.ts +2 -2
  12. package/es/components/search-filter/index.js +42 -18
  13. package/es/components/shops-filter/index.js +19 -13
  14. package/es/components/staffs-selector/index.d.ts +27 -0
  15. package/es/components/staffs-selector/index.js +145 -85
  16. package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +19 -1
  17. package/es/components/staffs-selector/src/radioCmp.vue.d.ts +1 -1
  18. package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +27 -0
  19. package/es/components/staffs-selector/src/variedCmp.vue.d.ts +1 -1
  20. package/es/components/timeline/index.js +6 -6
  21. package/es/components/upload/index.d.ts +2 -2
  22. package/es/components/upload/index.js +94 -62
  23. package/es/components/upload/src/upload.vue.d.ts +2 -2
  24. package/index.esm.js +793 -466
  25. package/index.js +793 -465
  26. package/lib/components/feedback/index.js +19 -2
  27. package/lib/components/float-table/index.js +36 -27
  28. package/lib/components/index.d.ts +1 -0
  29. package/lib/components/index.js +7 -0
  30. package/lib/components/input-tags-display/index.d.ts +75 -0
  31. package/lib/components/input-tags-display/index.js +1296 -0
  32. package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +72 -0
  33. package/lib/components/multi-cascader-compose/index.js +24 -8
  34. package/lib/components/over-tooltips/index.d.ts +2 -2
  35. package/lib/components/over-tooltips/index.js +40 -24
  36. package/lib/components/over-tooltips/src/over-tooltips.vue.d.ts +2 -2
  37. package/lib/components/search-filter/index.js +42 -18
  38. package/lib/components/shops-filter/index.js +19 -13
  39. package/lib/components/staffs-selector/index.d.ts +27 -0
  40. package/lib/components/staffs-selector/index.js +145 -85
  41. package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +19 -1
  42. package/lib/components/staffs-selector/src/radioCmp.vue.d.ts +1 -1
  43. package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +27 -0
  44. package/lib/components/staffs-selector/src/variedCmp.vue.d.ts +1 -1
  45. package/lib/components/timeline/index.js +6 -6
  46. package/lib/components/upload/index.d.ts +2 -2
  47. package/lib/components/upload/index.js +93 -61
  48. package/lib/components/upload/src/upload.vue.d.ts +2 -2
  49. package/package.json +1 -1
  50. package/theme-chalk/feedback.css +1 -1
  51. package/theme-chalk/index.css +1 -1
  52. package/theme-chalk/input-tags-display.css +1 -0
  53. package/theme-chalk/over-tooltips.css +1 -1
  54. package/theme-chalk/staffs-selector.css +1 -1
  55. package/types/components/index.d.ts +1 -0
  56. package/types/components/input-tags-display/index.d.ts +75 -0
  57. package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +72 -0
  58. package/types/components/over-tooltips/index.d.ts +2 -2
  59. package/types/components/over-tooltips/src/over-tooltips.vue.d.ts +2 -2
  60. package/types/components/staffs-selector/index.d.ts +27 -0
  61. package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +19 -1
  62. package/types/components/staffs-selector/src/radioCmp.vue.d.ts +1 -1
  63. package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +27 -0
  64. package/types/components/staffs-selector/src/variedCmp.vue.d.ts +1 -1
  65. package/types/components/upload/index.d.ts +2 -2
  66. package/types/components/upload/src/upload.vue.d.ts +2 -2
@@ -1150,11 +1150,11 @@ const _sfc_main$1 = {
1150
1150
  props: {
1151
1151
  title: {
1152
1152
  type: String,
1153
- default: ""
1153
+ default: void 0
1154
1154
  },
1155
1155
  labelTitle: {
1156
1156
  type: String,
1157
- default: ""
1157
+ default: void 0
1158
1158
  },
1159
1159
  line: {
1160
1160
  type: Number,
@@ -1175,16 +1175,19 @@ const _sfc_main$1 = {
1175
1175
  isShow: false,
1176
1176
  openShow: false
1177
1177
  });
1178
- const observer = new IntersectionObserver((entries) => {
1179
- entries.forEach((item) => {
1180
- if (item.intersectionRatio > 0.3) {
1181
- observerDom();
1182
- observer.disconnect();
1183
- }
1184
- });
1185
- }, {
1186
- threshold: 0.3
1187
- });
1178
+ const observer = new IntersectionObserver(
1179
+ (entries) => {
1180
+ entries.forEach((item) => {
1181
+ if (item.intersectionRatio > 0.3) {
1182
+ observerDom();
1183
+ observer.disconnect();
1184
+ }
1185
+ });
1186
+ },
1187
+ {
1188
+ threshold: 0.3
1189
+ }
1190
+ );
1188
1191
  function observerDom() {
1189
1192
  if (props.line === 1) {
1190
1193
  if (mySelf.value.scrollWidth > mySelf.value.clientWidth) {
@@ -1200,16 +1203,20 @@ const _sfc_main$1 = {
1200
1203
  observer.disconnect();
1201
1204
  });
1202
1205
  let mySelf = vue.ref();
1203
- vue.watch(() => props.showAlways, function(showAlways) {
1204
- if (showAlways)
1205
- state.openShow = showAlways;
1206
- mySelf.value && observer.unobserve(mySelf.value);
1207
- vue.nextTick(function() {
1208
- mySelf.value && observer.observe(mySelf.value);
1209
- });
1210
- }, {
1211
- immediate: true
1212
- });
1206
+ vue.watch(
1207
+ () => props.showAlways,
1208
+ function(showAlways) {
1209
+ if (showAlways)
1210
+ state.openShow = showAlways;
1211
+ mySelf.value && observer.unobserve(mySelf.value);
1212
+ vue.nextTick(function() {
1213
+ mySelf.value && observer.observe(mySelf.value);
1214
+ });
1215
+ },
1216
+ {
1217
+ immediate: true
1218
+ }
1219
+ );
1213
1220
  const handleVisibleChange = (val) => {
1214
1221
  state.isShow = !state.openShow ? false : val;
1215
1222
  };
@@ -1233,6 +1240,9 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
1233
1240
  "get-popup-container": $setup.getPopupContainer,
1234
1241
  onVisibleChange: $setup.handleVisibleChange
1235
1242
  }, {
1243
+ title: vue.withCtx(() => [
1244
+ vue.renderSlot(_ctx.$slots, "title")
1245
+ ]),
1236
1246
  default: vue.withCtx(() => [
1237
1247
  vue.createElementVNode("div", {
1238
1248
  ref: "mySelf",
@@ -1241,9 +1251,15 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
1241
1251
  WebkitLineClamp: $props.line
1242
1252
  }),
1243
1253
  class: vue.normalizeClass($props.line === 1 ? `bm-over-tooltip` : `bm-over-tooltip-multi`)
1244
- }, vue.toDisplayString($props.title), 7)
1254
+ }, [
1255
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
1256
+ vue.renderSlot(_ctx.$slots, "title", {}, () => [
1257
+ vue.createTextVNode(vue.toDisplayString($props.title), 1)
1258
+ ])
1259
+ ])
1260
+ ], 6)
1245
1261
  ]),
1246
- _: 1
1262
+ _: 3
1247
1263
  }, 8, ["visible", "title", "get-popup-container", "onVisibleChange"]);
1248
1264
  }
1249
1265
  var OverTooltips$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "over-tooltips.vue"]]);
@@ -1376,10 +1392,14 @@ const _sfc_main = {
1376
1392
  disabled: false,
1377
1393
  async customRequest({ file, fileField, data }) {
1378
1394
  if (file.size > state.extraConfigs.maxSize * 1024 * 1024) {
1379
- return methods.uploadError(new Error(`\u4E0D\u80FD\u4E0A\u4F20\u5927\u4E8E${state.extraConfigs.maxSize}M\u7684\u6587\u4EF6`));
1395
+ return methods.uploadError(
1396
+ new Error(`\u4E0D\u80FD\u4E0A\u4F20\u5927\u4E8E${state.extraConfigs.maxSize}M\u7684\u6587\u4EF6`)
1397
+ );
1380
1398
  }
1381
1399
  if (Object.keys(state.fileList).length >= state.extraConfigs.maxCount) {
1382
- return methods.uploadError(new Error(`\u4E0D\u80FD\u4E0A\u4F20\u591A\u4E8E${state.extraConfigs.maxCount}\u4E2A\u6587\u4EF6`));
1400
+ return methods.uploadError(
1401
+ new Error(`\u4E0D\u80FD\u4E0A\u4F20\u591A\u4E8E${state.extraConfigs.maxCount}\u4E2A\u6587\u4EF6`)
1402
+ );
1383
1403
  }
1384
1404
  let name = file.name;
1385
1405
  let fileFormat = name.split(".").pop();
@@ -1444,7 +1464,9 @@ const _sfc_main = {
1444
1464
  emit("error", error);
1445
1465
  },
1446
1466
  async deleteFile(uid) {
1447
- const index = state.uploadedList.findIndex((ele) => state.extraConfigs.fileDetail ? ele === state.fileList[uid].url : ele.url === state.fileList[uid].url);
1467
+ const index = state.uploadedList.findIndex(
1468
+ (ele) => state.extraConfigs.fileDetail ? ele === state.fileList[uid].url : ele.url === state.fileList[uid].url
1469
+ );
1448
1470
  emit("deleteFile", state.fileList[uid]);
1449
1471
  state.uploadedList.splice(index, 1);
1450
1472
  delete state.fileList[uid];
@@ -1458,7 +1480,9 @@ const _sfc_main = {
1458
1480
  state.onepViewImageHover[uid] = false;
1459
1481
  },
1460
1482
  viewOnePicture(item) {
1461
- if (["img", "image", "png", "jpg", "jpeg"].includes(item.type.toLowerCase())) {
1483
+ if (["img", "image", "png", "jpg", "jpeg"].includes(
1484
+ item.type.toLowerCase()
1485
+ )) {
1462
1486
  state.previewVisible = true;
1463
1487
  state.onepViewImage = item;
1464
1488
  return;
@@ -1510,40 +1534,48 @@ const _sfc_main = {
1510
1534
  }
1511
1535
  }
1512
1536
  };
1513
- vue.watch(() => props.defaultList, function(list) {
1514
- if (list.length) {
1515
- list.forEach(function(item) {
1516
- let uid = utils.getuid();
1517
- if (!item.url.includes("http") && !item.url.includes(CLOUND_PRE))
1518
- item.url = props.cloudReadUrl + item.url;
1519
- state.fileList[uid] = {
1520
- uid,
1521
- name: item.name,
1522
- url: item.url,
1523
- type: item.type || "png",
1524
- progress: 100,
1525
- isDoneDeloy: true
1526
- };
1527
- state.uploadedList.push(item);
1528
- });
1537
+ vue.watch(
1538
+ () => props.defaultList,
1539
+ function(list) {
1540
+ if (list.length) {
1541
+ list.forEach(function(item) {
1542
+ let uid = utils.getuid();
1543
+ if (!item.url.includes("http") && !item.url.includes(CLOUND_PRE))
1544
+ item.url = props.cloudReadUrl + item.url;
1545
+ state.fileList[uid] = {
1546
+ uid,
1547
+ name: item.name,
1548
+ url: item.url,
1549
+ type: item.type || "png",
1550
+ progress: 100,
1551
+ isDoneDeloy: true
1552
+ };
1553
+ state.uploadedList.push(item);
1554
+ });
1555
+ }
1556
+ },
1557
+ {
1558
+ immediate: true
1529
1559
  }
1530
- }, {
1531
- immediate: true
1532
- });
1533
- vue.watch([() => props.uploadProps, () => props.extraProps], function([config, extra]) {
1534
- state.uploadConfigs = {
1535
- ...state.uploadConfigs,
1536
- ...config,
1537
- showUploadList: false
1538
- };
1539
- state.extraConfigs = {
1540
- ...state.extraConfigs,
1541
- ...extra
1542
- };
1543
- }, {
1544
- immediate: true,
1545
- deep: true
1546
- });
1560
+ );
1561
+ vue.watch(
1562
+ [() => props.uploadProps, () => props.extraProps],
1563
+ function([config, extra]) {
1564
+ state.uploadConfigs = {
1565
+ ...state.uploadConfigs,
1566
+ ...config,
1567
+ showUploadList: false
1568
+ };
1569
+ state.extraConfigs = {
1570
+ ...state.extraConfigs,
1571
+ ...extra
1572
+ };
1573
+ },
1574
+ {
1575
+ immediate: true,
1576
+ deep: true
1577
+ }
1578
+ );
1547
1579
  const uploadDisabled = vue.computed(() => {
1548
1580
  if (Object.keys(state.fileList).length >= state.extraConfigs.maxCount) {
1549
1581
  return true;
@@ -7,11 +7,11 @@ declare const _default: {
7
7
  props: {
8
8
  title: {
9
9
  type: StringConstructor;
10
- default: string;
10
+ default: undefined;
11
11
  };
12
12
  labelTitle: {
13
13
  type: StringConstructor;
14
- default: string;
14
+ default: undefined;
15
15
  };
16
16
  line: {
17
17
  type: NumberConstructor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bm-admin-ui",
3
- "version": "1.0.10-alpha",
3
+ "version": "1.0.13-alpha",
4
4
  "private": false,
5
5
  "description": "An Admin Component Library for Bm",
6
6
  "license": "UNLICENSED",