bm-admin-ui 1.0.11-alpha → 1.0.14-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 -2
- package/es/components/float-table/index.js +36 -27
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +1 -0
- package/es/components/input-tags-display/index.d.ts +66 -0
- package/es/components/input-tags-display/index.js +1280 -0
- package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +63 -0
- package/es/components/multi-cascader-compose/index.js +24 -8
- package/es/components/over-tooltips/index.d.ts +2 -2
- package/es/components/over-tooltips/index.js +41 -25
- package/es/components/over-tooltips/src/over-tooltips.vue.d.ts +2 -2
- package/es/components/search-filter/index.js +42 -18
- package/es/components/shops-filter/index.js +19 -13
- package/es/components/staffs-selector/index.d.ts +27 -0
- package/es/components/staffs-selector/index.js +145 -85
- package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +19 -1
- package/es/components/staffs-selector/src/radioCmp.vue.d.ts +1 -1
- package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +27 -0
- package/es/components/staffs-selector/src/variedCmp.vue.d.ts +1 -1
- package/es/components/timeline/index.js +6 -6
- package/es/components/upload/index.d.ts +2 -2
- package/es/components/upload/index.js +94 -62
- package/es/components/upload/src/upload.vue.d.ts +2 -2
- package/index.esm.js +797 -476
- package/index.js +797 -475
- package/lib/components/feedback/index.js +19 -2
- package/lib/components/float-table/index.js +36 -27
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +7 -0
- package/lib/components/input-tags-display/index.d.ts +66 -0
- package/lib/components/input-tags-display/index.js +1290 -0
- package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +63 -0
- package/lib/components/multi-cascader-compose/index.js +24 -8
- package/lib/components/over-tooltips/index.d.ts +2 -2
- package/lib/components/over-tooltips/index.js +40 -24
- package/lib/components/over-tooltips/src/over-tooltips.vue.d.ts +2 -2
- package/lib/components/search-filter/index.js +42 -18
- package/lib/components/shops-filter/index.js +19 -13
- package/lib/components/staffs-selector/index.d.ts +27 -0
- package/lib/components/staffs-selector/index.js +145 -85
- package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +19 -1
- package/lib/components/staffs-selector/src/radioCmp.vue.d.ts +1 -1
- package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +27 -0
- package/lib/components/staffs-selector/src/variedCmp.vue.d.ts +1 -1
- package/lib/components/timeline/index.js +6 -6
- package/lib/components/upload/index.d.ts +2 -2
- package/lib/components/upload/index.js +93 -61
- package/lib/components/upload/src/upload.vue.d.ts +2 -2
- package/package.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/input-tags-display.css +1 -0
- package/theme-chalk/over-tooltips.css +1 -1
- package/theme-chalk/staffs-selector.css +1 -1
- package/types/components/index.d.ts +1 -0
- package/types/components/input-tags-display/index.d.ts +66 -0
- package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +63 -0
- package/types/components/over-tooltips/index.d.ts +2 -2
- package/types/components/over-tooltips/src/over-tooltips.vue.d.ts +2 -2
- package/types/components/staffs-selector/index.d.ts +27 -0
- package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +19 -1
- package/types/components/staffs-selector/src/radioCmp.vue.d.ts +1 -1
- package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +27 -0
- package/types/components/staffs-selector/src/variedCmp.vue.d.ts +1 -1
- package/types/components/upload/index.d.ts +2 -2
- package/types/components/upload/src/upload.vue.d.ts +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withInstall } from 'bm-admin-ui/es/utils/with-install';
|
|
2
|
-
import { h, nextTick, createVNode, reactive, onBeforeUnmount, ref, watch, toRefs, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle, normalizeClass, toDisplayString, computed, watchEffect, createElementBlock, Fragment, renderList, createCommentVNode,
|
|
2
|
+
import { h, nextTick, createVNode, reactive, onBeforeUnmount, ref, watch, toRefs, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createElementVNode, normalizeStyle, normalizeClass, createTextVNode, toDisplayString, computed, watchEffect, createElementBlock, Fragment, renderList, createCommentVNode, mergeProps } from 'vue';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Take input from [0, n] and return it as [0, 1]
|
|
@@ -1146,11 +1146,11 @@ const _sfc_main$1 = {
|
|
|
1146
1146
|
props: {
|
|
1147
1147
|
title: {
|
|
1148
1148
|
type: String,
|
|
1149
|
-
default:
|
|
1149
|
+
default: void 0
|
|
1150
1150
|
},
|
|
1151
1151
|
labelTitle: {
|
|
1152
1152
|
type: String,
|
|
1153
|
-
default:
|
|
1153
|
+
default: void 0
|
|
1154
1154
|
},
|
|
1155
1155
|
line: {
|
|
1156
1156
|
type: Number,
|
|
@@ -1171,16 +1171,19 @@ const _sfc_main$1 = {
|
|
|
1171
1171
|
isShow: false,
|
|
1172
1172
|
openShow: false
|
|
1173
1173
|
});
|
|
1174
|
-
const observer = new IntersectionObserver(
|
|
1175
|
-
entries
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1174
|
+
const observer = new IntersectionObserver(
|
|
1175
|
+
(entries) => {
|
|
1176
|
+
entries.forEach((item) => {
|
|
1177
|
+
if (item.intersectionRatio > 0.3) {
|
|
1178
|
+
observerDom();
|
|
1179
|
+
observer.disconnect();
|
|
1180
|
+
}
|
|
1181
|
+
});
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
threshold: 0.3
|
|
1185
|
+
}
|
|
1186
|
+
);
|
|
1184
1187
|
function observerDom() {
|
|
1185
1188
|
if (props.line === 1) {
|
|
1186
1189
|
if (mySelf.value.scrollWidth > mySelf.value.clientWidth) {
|
|
@@ -1196,16 +1199,20 @@ const _sfc_main$1 = {
|
|
|
1196
1199
|
observer.disconnect();
|
|
1197
1200
|
});
|
|
1198
1201
|
let mySelf = ref();
|
|
1199
|
-
watch(
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
mySelf.value && observer.
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1202
|
+
watch(
|
|
1203
|
+
() => props.showAlways,
|
|
1204
|
+
function(showAlways) {
|
|
1205
|
+
if (showAlways)
|
|
1206
|
+
state.openShow = showAlways;
|
|
1207
|
+
mySelf.value && observer.unobserve(mySelf.value);
|
|
1208
|
+
nextTick(function() {
|
|
1209
|
+
mySelf.value && observer.observe(mySelf.value);
|
|
1210
|
+
});
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
immediate: true
|
|
1214
|
+
}
|
|
1215
|
+
);
|
|
1209
1216
|
const handleVisibleChange = (val) => {
|
|
1210
1217
|
state.isShow = !state.openShow ? false : val;
|
|
1211
1218
|
};
|
|
@@ -1229,6 +1236,9 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1229
1236
|
"get-popup-container": $setup.getPopupContainer,
|
|
1230
1237
|
onVisibleChange: $setup.handleVisibleChange
|
|
1231
1238
|
}, {
|
|
1239
|
+
title: withCtx(() => [
|
|
1240
|
+
renderSlot(_ctx.$slots, "title")
|
|
1241
|
+
]),
|
|
1232
1242
|
default: withCtx(() => [
|
|
1233
1243
|
createElementVNode("div", {
|
|
1234
1244
|
ref: "mySelf",
|
|
@@ -1237,9 +1247,15 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1237
1247
|
WebkitLineClamp: $props.line
|
|
1238
1248
|
}),
|
|
1239
1249
|
class: normalizeClass($props.line === 1 ? `bm-over-tooltip` : `bm-over-tooltip-multi`)
|
|
1240
|
-
},
|
|
1250
|
+
}, [
|
|
1251
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1252
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
1253
|
+
createTextVNode(toDisplayString($props.title), 1)
|
|
1254
|
+
])
|
|
1255
|
+
])
|
|
1256
|
+
], 6)
|
|
1241
1257
|
]),
|
|
1242
|
-
_:
|
|
1258
|
+
_: 3
|
|
1243
1259
|
}, 8, ["visible", "title", "get-popup-container", "onVisibleChange"]);
|
|
1244
1260
|
}
|
|
1245
1261
|
var OverTooltips$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "over-tooltips.vue"]]);
|
|
@@ -1372,10 +1388,14 @@ const _sfc_main = {
|
|
|
1372
1388
|
disabled: false,
|
|
1373
1389
|
async customRequest({ file, fileField, data }) {
|
|
1374
1390
|
if (file.size > state.extraConfigs.maxSize * 1024 * 1024) {
|
|
1375
|
-
return methods.uploadError(
|
|
1391
|
+
return methods.uploadError(
|
|
1392
|
+
new Error(`\u4E0D\u80FD\u4E0A\u4F20\u5927\u4E8E${state.extraConfigs.maxSize}M\u7684\u6587\u4EF6`)
|
|
1393
|
+
);
|
|
1376
1394
|
}
|
|
1377
1395
|
if (Object.keys(state.fileList).length >= state.extraConfigs.maxCount) {
|
|
1378
|
-
return methods.uploadError(
|
|
1396
|
+
return methods.uploadError(
|
|
1397
|
+
new Error(`\u4E0D\u80FD\u4E0A\u4F20\u591A\u4E8E${state.extraConfigs.maxCount}\u4E2A\u6587\u4EF6`)
|
|
1398
|
+
);
|
|
1379
1399
|
}
|
|
1380
1400
|
let name = file.name;
|
|
1381
1401
|
let fileFormat = name.split(".").pop();
|
|
@@ -1440,7 +1460,9 @@ const _sfc_main = {
|
|
|
1440
1460
|
emit("error", error);
|
|
1441
1461
|
},
|
|
1442
1462
|
async deleteFile(uid) {
|
|
1443
|
-
const index = state.uploadedList.findIndex(
|
|
1463
|
+
const index = state.uploadedList.findIndex(
|
|
1464
|
+
(ele) => state.extraConfigs.fileDetail ? ele === state.fileList[uid].url : ele.url === state.fileList[uid].url
|
|
1465
|
+
);
|
|
1444
1466
|
emit("deleteFile", state.fileList[uid]);
|
|
1445
1467
|
state.uploadedList.splice(index, 1);
|
|
1446
1468
|
delete state.fileList[uid];
|
|
@@ -1454,7 +1476,9 @@ const _sfc_main = {
|
|
|
1454
1476
|
state.onepViewImageHover[uid] = false;
|
|
1455
1477
|
},
|
|
1456
1478
|
viewOnePicture(item) {
|
|
1457
|
-
if (["img", "image", "png", "jpg", "jpeg"].includes(
|
|
1479
|
+
if (["img", "image", "png", "jpg", "jpeg"].includes(
|
|
1480
|
+
item.type.toLowerCase()
|
|
1481
|
+
)) {
|
|
1458
1482
|
state.previewVisible = true;
|
|
1459
1483
|
state.onepViewImage = item;
|
|
1460
1484
|
return;
|
|
@@ -1506,40 +1530,48 @@ const _sfc_main = {
|
|
|
1506
1530
|
}
|
|
1507
1531
|
}
|
|
1508
1532
|
};
|
|
1509
|
-
watch(
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1533
|
+
watch(
|
|
1534
|
+
() => props.defaultList,
|
|
1535
|
+
function(list) {
|
|
1536
|
+
if (list.length) {
|
|
1537
|
+
list.forEach(function(item) {
|
|
1538
|
+
let uid = utils.getuid();
|
|
1539
|
+
if (!item.url.includes("http") && !item.url.includes(CLOUND_PRE))
|
|
1540
|
+
item.url = props.cloudReadUrl + item.url;
|
|
1541
|
+
state.fileList[uid] = {
|
|
1542
|
+
uid,
|
|
1543
|
+
name: item.name,
|
|
1544
|
+
url: item.url,
|
|
1545
|
+
type: item.type || "png",
|
|
1546
|
+
progress: 100,
|
|
1547
|
+
isDoneDeloy: true
|
|
1548
|
+
};
|
|
1549
|
+
state.uploadedList.push(item);
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1552
|
+
},
|
|
1553
|
+
{
|
|
1554
|
+
immediate: true
|
|
1525
1555
|
}
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1556
|
+
);
|
|
1557
|
+
watch(
|
|
1558
|
+
[() => props.uploadProps, () => props.extraProps],
|
|
1559
|
+
function([config, extra]) {
|
|
1560
|
+
state.uploadConfigs = {
|
|
1561
|
+
...state.uploadConfigs,
|
|
1562
|
+
...config,
|
|
1563
|
+
showUploadList: false
|
|
1564
|
+
};
|
|
1565
|
+
state.extraConfigs = {
|
|
1566
|
+
...state.extraConfigs,
|
|
1567
|
+
...extra
|
|
1568
|
+
};
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
immediate: true,
|
|
1572
|
+
deep: true
|
|
1573
|
+
}
|
|
1574
|
+
);
|
|
1543
1575
|
const uploadDisabled = computed(() => {
|
|
1544
1576
|
if (Object.keys(state.fileList).length >= state.extraConfigs.maxCount) {
|
|
1545
1577
|
return true;
|
|
@@ -7,11 +7,11 @@ declare const _default: {
|
|
|
7
7
|
props: {
|
|
8
8
|
title: {
|
|
9
9
|
type: StringConstructor;
|
|
10
|
-
default:
|
|
10
|
+
default: undefined;
|
|
11
11
|
};
|
|
12
12
|
labelTitle: {
|
|
13
13
|
type: StringConstructor;
|
|
14
|
-
default:
|
|
14
|
+
default: undefined;
|
|
15
15
|
};
|
|
16
16
|
line: {
|
|
17
17
|
type: NumberConstructor;
|