bm-admin-ui 1.0.13-alpha → 1.0.16-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/feedback/index.js +19 -6
- package/es/components/float-table/index.js +27 -36
- package/es/components/input-tags-display/index.d.ts +6 -9
- package/es/components/input-tags-display/index.js +54 -47
- package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +6 -9
- package/es/components/multi-cascader-compose/index.js +25 -28
- package/es/components/over-tooltips/index.js +20 -27
- package/es/components/search-filter/index.d.ts +3 -1
- package/es/components/search-filter/index.js +36 -48
- package/es/components/search-filter/src/search-filter.vue.d.ts +3 -1
- package/es/components/shops-filter/index.js +30 -23
- package/es/components/staffs-selector/index.js +97 -114
- package/es/components/timeline/index.js +6 -6
- package/es/components/upload/index.js +76 -86
- package/index.esm.js +1049 -37384
- package/index.js +1049 -37384
- package/lib/components/feedback/index.js +18 -5
- package/lib/components/float-table/index.js +27 -36
- package/lib/components/input-tags-display/index.d.ts +6 -9
- package/lib/components/input-tags-display/index.js +54 -47
- package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +6 -9
- package/lib/components/multi-cascader-compose/index.js +25 -28
- package/lib/components/over-tooltips/index.js +20 -27
- package/lib/components/search-filter/index.d.ts +3 -1
- package/lib/components/search-filter/index.js +36 -48
- package/lib/components/search-filter/src/search-filter.vue.d.ts +3 -1
- package/lib/components/shops-filter/index.js +30 -23
- package/lib/components/staffs-selector/index.js +97 -114
- package/lib/components/timeline/index.js +6 -6
- package/lib/components/upload/index.js +76 -86
- package/package.json +29 -29
- package/theme-chalk/button.css +1 -1
- package/theme-chalk/feedback.css +1 -1
- package/theme-chalk/float-table.css +1 -1
- package/theme-chalk/floating-vue.css +1 -1
- package/theme-chalk/flow-designer.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/input-tags-display.css +1 -1
- package/theme-chalk/modal.css +1 -1
- package/theme-chalk/multi-cascader-compose.css +1 -1
- package/theme-chalk/over-tooltips.css +1 -1
- package/theme-chalk/search-filter.css +1 -1
- package/theme-chalk/timeline.css +1 -1
- package/theme-chalk/upload.css +1 -1
- package/types/components/input-tags-display/index.d.ts +6 -9
- package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +6 -9
- package/types/components/search-filter/index.d.ts +3 -1
- package/types/components/search-filter/src/search-filter.vue.d.ts +3 -1
|
@@ -65,7 +65,7 @@ function boundAlpha(a) {
|
|
|
65
65
|
*/
|
|
66
66
|
function convertToPercentage(n) {
|
|
67
67
|
if (n <= 1) {
|
|
68
|
-
return
|
|
68
|
+
return Number(n) * 100 + "%";
|
|
69
69
|
}
|
|
70
70
|
return n;
|
|
71
71
|
}
|
|
@@ -447,12 +447,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
447
447
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
448
448
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
449
449
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
450
|
-
var CSS_UNIT = "(?:"
|
|
450
|
+
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
451
451
|
// Actual matching.
|
|
452
452
|
// Parentheses and commas are optional, but not required.
|
|
453
453
|
// Whitespace can take the place of commas or opening paren
|
|
454
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
455
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
454
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
455
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
456
456
|
var matchers = {
|
|
457
457
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
458
458
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -777,6 +777,19 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
777
777
|
});
|
|
778
778
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
779
779
|
});
|
|
780
|
+
presetPalettes.red;
|
|
781
|
+
presetPalettes.volcano;
|
|
782
|
+
presetPalettes.gold;
|
|
783
|
+
presetPalettes.orange;
|
|
784
|
+
presetPalettes.yellow;
|
|
785
|
+
presetPalettes.lime;
|
|
786
|
+
presetPalettes.green;
|
|
787
|
+
presetPalettes.cyan;
|
|
788
|
+
presetPalettes.blue;
|
|
789
|
+
presetPalettes.geekblue;
|
|
790
|
+
presetPalettes.purple;
|
|
791
|
+
presetPalettes.magenta;
|
|
792
|
+
presetPalettes.grey;
|
|
780
793
|
|
|
781
794
|
// https://github.com/substack/insert-css
|
|
782
795
|
var containers = []; // will store container HTMLElement references
|
|
@@ -1171,19 +1184,16 @@ const _sfc_main$1 = {
|
|
|
1171
1184
|
isShow: false,
|
|
1172
1185
|
openShow: false
|
|
1173
1186
|
});
|
|
1174
|
-
const observer = new IntersectionObserver(
|
|
1175
|
-
(
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
threshold: 0.3
|
|
1185
|
-
}
|
|
1186
|
-
);
|
|
1187
|
+
const observer = new IntersectionObserver((entries) => {
|
|
1188
|
+
entries.forEach((item) => {
|
|
1189
|
+
if (item.intersectionRatio > 0.3) {
|
|
1190
|
+
observerDom();
|
|
1191
|
+
observer.disconnect();
|
|
1192
|
+
}
|
|
1193
|
+
});
|
|
1194
|
+
}, {
|
|
1195
|
+
threshold: 0.3
|
|
1196
|
+
});
|
|
1187
1197
|
function observerDom() {
|
|
1188
1198
|
if (props.line === 1) {
|
|
1189
1199
|
if (mySelf.value.scrollWidth > mySelf.value.clientWidth) {
|
|
@@ -1199,20 +1209,16 @@ const _sfc_main$1 = {
|
|
|
1199
1209
|
observer.disconnect();
|
|
1200
1210
|
});
|
|
1201
1211
|
let mySelf = ref();
|
|
1202
|
-
watch(
|
|
1203
|
-
()
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
mySelf.value && observer.
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
{
|
|
1213
|
-
immediate: true
|
|
1214
|
-
}
|
|
1215
|
-
);
|
|
1212
|
+
watch(() => props.showAlways, function(showAlways) {
|
|
1213
|
+
if (showAlways)
|
|
1214
|
+
state.openShow = showAlways;
|
|
1215
|
+
mySelf.value && observer.unobserve(mySelf.value);
|
|
1216
|
+
nextTick(function() {
|
|
1217
|
+
mySelf.value && observer.observe(mySelf.value);
|
|
1218
|
+
});
|
|
1219
|
+
}, {
|
|
1220
|
+
immediate: true
|
|
1221
|
+
});
|
|
1216
1222
|
const handleVisibleChange = (val) => {
|
|
1217
1223
|
state.isShow = !state.openShow ? false : val;
|
|
1218
1224
|
};
|
|
@@ -1388,14 +1394,10 @@ const _sfc_main = {
|
|
|
1388
1394
|
disabled: false,
|
|
1389
1395
|
async customRequest({ file, fileField, data }) {
|
|
1390
1396
|
if (file.size > state.extraConfigs.maxSize * 1024 * 1024) {
|
|
1391
|
-
return methods.uploadError(
|
|
1392
|
-
new Error(`\u4E0D\u80FD\u4E0A\u4F20\u5927\u4E8E${state.extraConfigs.maxSize}M\u7684\u6587\u4EF6`)
|
|
1393
|
-
);
|
|
1397
|
+
return methods.uploadError(new Error(`\u4E0D\u80FD\u4E0A\u4F20\u5927\u4E8E${state.extraConfigs.maxSize}M\u7684\u6587\u4EF6`));
|
|
1394
1398
|
}
|
|
1395
1399
|
if (Object.keys(state.fileList).length >= state.extraConfigs.maxCount) {
|
|
1396
|
-
return methods.uploadError(
|
|
1397
|
-
new Error(`\u4E0D\u80FD\u4E0A\u4F20\u591A\u4E8E${state.extraConfigs.maxCount}\u4E2A\u6587\u4EF6`)
|
|
1398
|
-
);
|
|
1400
|
+
return methods.uploadError(new Error(`\u4E0D\u80FD\u4E0A\u4F20\u591A\u4E8E${state.extraConfigs.maxCount}\u4E2A\u6587\u4EF6`));
|
|
1399
1401
|
}
|
|
1400
1402
|
let name = file.name;
|
|
1401
1403
|
let fileFormat = name.split(".").pop();
|
|
@@ -1460,9 +1462,7 @@ const _sfc_main = {
|
|
|
1460
1462
|
emit("error", error);
|
|
1461
1463
|
},
|
|
1462
1464
|
async deleteFile(uid) {
|
|
1463
|
-
const index = state.uploadedList.findIndex(
|
|
1464
|
-
(ele) => state.extraConfigs.fileDetail ? ele === state.fileList[uid].url : ele.url === state.fileList[uid].url
|
|
1465
|
-
);
|
|
1465
|
+
const index = state.uploadedList.findIndex((ele) => state.extraConfigs.fileDetail ? ele === state.fileList[uid].url : ele.url === state.fileList[uid].url);
|
|
1466
1466
|
emit("deleteFile", state.fileList[uid]);
|
|
1467
1467
|
state.uploadedList.splice(index, 1);
|
|
1468
1468
|
delete state.fileList[uid];
|
|
@@ -1476,9 +1476,7 @@ const _sfc_main = {
|
|
|
1476
1476
|
state.onepViewImageHover[uid] = false;
|
|
1477
1477
|
},
|
|
1478
1478
|
viewOnePicture(item) {
|
|
1479
|
-
if (["img", "image", "png", "jpg", "jpeg"].includes(
|
|
1480
|
-
item.type.toLowerCase()
|
|
1481
|
-
)) {
|
|
1479
|
+
if (["img", "image", "png", "jpg", "jpeg"].includes(item.type.toLowerCase())) {
|
|
1482
1480
|
state.previewVisible = true;
|
|
1483
1481
|
state.onepViewImage = item;
|
|
1484
1482
|
return;
|
|
@@ -1530,48 +1528,40 @@ const _sfc_main = {
|
|
|
1530
1528
|
}
|
|
1531
1529
|
}
|
|
1532
1530
|
};
|
|
1533
|
-
watch(
|
|
1534
|
-
()
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
state.uploadedList.push(item);
|
|
1550
|
-
});
|
|
1551
|
-
}
|
|
1552
|
-
},
|
|
1553
|
-
{
|
|
1554
|
-
immediate: true
|
|
1555
|
-
}
|
|
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
|
|
1531
|
+
watch(() => props.defaultList, function(list) {
|
|
1532
|
+
if (list.length) {
|
|
1533
|
+
list.forEach(function(item) {
|
|
1534
|
+
let uid = utils.getuid();
|
|
1535
|
+
if (!item.url.includes("http") && !item.url.includes(CLOUND_PRE))
|
|
1536
|
+
item.url = props.cloudReadUrl + item.url;
|
|
1537
|
+
state.fileList[uid] = {
|
|
1538
|
+
uid,
|
|
1539
|
+
name: item.name,
|
|
1540
|
+
url: item.url,
|
|
1541
|
+
type: item.type || "png",
|
|
1542
|
+
progress: 100,
|
|
1543
|
+
isDoneDeloy: true
|
|
1544
|
+
};
|
|
1545
|
+
state.uploadedList.push(item);
|
|
1546
|
+
});
|
|
1573
1547
|
}
|
|
1574
|
-
|
|
1548
|
+
}, {
|
|
1549
|
+
immediate: true
|
|
1550
|
+
});
|
|
1551
|
+
watch([() => props.uploadProps, () => props.extraProps], function([config, extra]) {
|
|
1552
|
+
state.uploadConfigs = {
|
|
1553
|
+
...state.uploadConfigs,
|
|
1554
|
+
...config,
|
|
1555
|
+
showUploadList: false
|
|
1556
|
+
};
|
|
1557
|
+
state.extraConfigs = {
|
|
1558
|
+
...state.extraConfigs,
|
|
1559
|
+
...extra
|
|
1560
|
+
};
|
|
1561
|
+
}, {
|
|
1562
|
+
immediate: true,
|
|
1563
|
+
deep: true
|
|
1564
|
+
});
|
|
1575
1565
|
const uploadDisabled = computed(() => {
|
|
1576
1566
|
if (Object.keys(state.fileList).length >= state.extraConfigs.maxCount) {
|
|
1577
1567
|
return true;
|
|
@@ -1734,7 +1724,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1734
1724
|
key: 1,
|
|
1735
1725
|
file: item
|
|
1736
1726
|
})
|
|
1737
|
-
],
|
|
1727
|
+
], 2112)) : createCommentVNode("v-if", true),
|
|
1738
1728
|
createCommentVNode(" \u56FE\u7247\u9519\u8BEF\u5C55\u793A "),
|
|
1739
1729
|
item.status === "error" ? (openBlock(), createElementBlock("div", {
|
|
1740
1730
|
key: 2,
|
|
@@ -1780,7 +1770,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1780
1770
|
}, 8, ["class", "disabled"]),
|
|
1781
1771
|
_ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (openBlock(), createElementBlock("div", _hoisted_23, toDisplayString(_ctx.extraConfigs.tips), 1)) : createCommentVNode("v-if", true)
|
|
1782
1772
|
])) : createCommentVNode("v-if", true)
|
|
1783
|
-
],
|
|
1773
|
+
], 2112))
|
|
1784
1774
|
]),
|
|
1785
1775
|
_: 3
|
|
1786
1776
|
}, 16, ["class"])) : createCommentVNode("v-if", true),
|