bm-admin-ui 1.0.12-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.
- package/es/components/feedback/index.js +25 -21
- package/es/components/float-table/index.d.ts +2 -2
- package/es/components/float-table/index.js +36 -27
- package/es/components/float-table/src/float-table.vue.d.ts +2 -2
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +1 -0
- package/es/components/input-tags-display/index.d.ts +75 -0
- package/es/components/input-tags-display/index.js +1286 -0
- package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +72 -0
- package/es/components/multi-cascader-compose/index.js +28 -25
- package/es/components/over-tooltips/index.js +27 -20
- package/es/components/search-filter/index.d.ts +1 -3
- package/es/components/search-filter/index.js +48 -36
- package/es/components/search-filter/src/search-filter.vue.d.ts +1 -3
- package/es/components/shops-filter/index.js +23 -30
- package/es/components/staffs-selector/index.d.ts +27 -0
- package/es/components/staffs-selector/index.js +150 -103
- package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +21 -3
- 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.js +86 -76
- package/index.esm.js +37839 -1300
- package/index.js +37839 -1299
- package/lib/components/feedback/index.js +24 -20
- package/lib/components/float-table/index.d.ts +2 -2
- package/lib/components/float-table/index.js +36 -27
- package/lib/components/float-table/src/float-table.vue.d.ts +2 -2
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +7 -0
- package/lib/components/input-tags-display/index.d.ts +75 -0
- package/lib/components/input-tags-display/index.js +1296 -0
- package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +72 -0
- package/lib/components/multi-cascader-compose/index.js +28 -25
- package/lib/components/over-tooltips/index.js +27 -20
- package/lib/components/search-filter/index.d.ts +1 -3
- package/lib/components/search-filter/index.js +48 -36
- package/lib/components/search-filter/src/search-filter.vue.d.ts +1 -3
- package/lib/components/shops-filter/index.js +23 -30
- package/lib/components/staffs-selector/index.d.ts +27 -0
- package/lib/components/staffs-selector/index.js +150 -103
- package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +21 -3
- 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.js +86 -76
- 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 -0
- 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/staffs-selector.css +1 -1
- package/theme-chalk/timeline.css +1 -1
- package/theme-chalk/upload.css +1 -1
- package/types/components/float-table/index.d.ts +2 -2
- package/types/components/float-table/src/float-table.vue.d.ts +2 -2
- package/types/components/index.d.ts +1 -0
- package/types/components/input-tags-display/index.d.ts +75 -0
- package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +72 -0
- package/types/components/search-filter/index.d.ts +1 -3
- package/types/components/search-filter/src/search-filter.vue.d.ts +1 -3
- package/types/components/staffs-selector/index.d.ts +27 -0
- package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +21 -3
- 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
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { notification, Modal, Button } from 'ant-design-vue';
|
|
2
2
|
import { withInstall } from 'bm-admin-ui/es/utils/with-install';
|
|
3
3
|
import { h, nextTick, createVNode, defineComponent, computed, openBlock, createBlock, unref, withCtx, resolveDynamicComponent, renderSlot, useSlots, resolveComponent, createSlots, createElementVNode, createTextVNode } from 'vue';
|
|
4
4
|
import AAlert from 'ant-design-vue/lib/alert';
|
|
5
5
|
import AModal$1 from 'ant-design-vue/lib/modal';
|
|
6
6
|
import message from 'ant-design-vue/lib/message';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/******************************************************************************
|
|
9
9
|
Copyright (c) Microsoft Corporation.
|
|
10
10
|
|
|
11
11
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -94,7 +94,7 @@ function boundAlpha(a) {
|
|
|
94
94
|
*/
|
|
95
95
|
function convertToPercentage(n) {
|
|
96
96
|
if (n <= 1) {
|
|
97
|
-
return Number(n) * 100
|
|
97
|
+
return "".concat(Number(n) * 100, "%");
|
|
98
98
|
}
|
|
99
99
|
return n;
|
|
100
100
|
}
|
|
@@ -476,12 +476,12 @@ var CSS_INTEGER = '[-\\+]?\\d+%?';
|
|
|
476
476
|
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
477
477
|
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
|
|
478
478
|
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
479
|
-
var CSS_UNIT = "(?:"
|
|
479
|
+
var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
|
|
480
480
|
// Actual matching.
|
|
481
481
|
// Parentheses and commas are optional, but not required.
|
|
482
482
|
// Whitespace can take the place of commas or opening paren
|
|
483
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+("
|
|
484
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+("
|
|
483
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
|
|
484
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
|
|
485
485
|
var matchers = {
|
|
486
486
|
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
487
487
|
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
|
|
@@ -806,19 +806,6 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
806
806
|
});
|
|
807
807
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
808
808
|
});
|
|
809
|
-
presetPalettes.red;
|
|
810
|
-
presetPalettes.volcano;
|
|
811
|
-
presetPalettes.gold;
|
|
812
|
-
presetPalettes.orange;
|
|
813
|
-
presetPalettes.yellow;
|
|
814
|
-
presetPalettes.lime;
|
|
815
|
-
presetPalettes.green;
|
|
816
|
-
presetPalettes.cyan;
|
|
817
|
-
presetPalettes.blue;
|
|
818
|
-
presetPalettes.geekblue;
|
|
819
|
-
presetPalettes.purple;
|
|
820
|
-
presetPalettes.magenta;
|
|
821
|
-
presetPalettes.grey;
|
|
822
809
|
|
|
823
810
|
// https://github.com/substack/insert-css
|
|
824
811
|
var containers = []; // will store container HTMLElement references
|
|
@@ -1492,6 +1479,23 @@ var feedbackType;
|
|
|
1492
1479
|
feedbackType["CONFIRM"] = "confirm";
|
|
1493
1480
|
feedbackType["WARN"] = "warn";
|
|
1494
1481
|
})(feedbackType || (feedbackType = {}));
|
|
1482
|
+
var feedbackColor;
|
|
1483
|
+
(function (feedbackColor) {
|
|
1484
|
+
feedbackColor["SUCCESS"] = "#29CC7A";
|
|
1485
|
+
feedbackColor["ERROR"] = "#E64C2E";
|
|
1486
|
+
feedbackColor["INFO"] = "#2F4EED";
|
|
1487
|
+
feedbackColor["WARNING"] = "#FF9019";
|
|
1488
|
+
feedbackColor["CONFIRM"] = "#2F4EED";
|
|
1489
|
+
feedbackColor["WARN"] = "#FF9019";
|
|
1490
|
+
})(feedbackColor || (feedbackColor = {}));
|
|
1491
|
+
const feedbackIcon = {
|
|
1492
|
+
success: () => h(CheckCircleFilled$1, { style: `color: ${feedbackColor.SUCCESS}` }),
|
|
1493
|
+
error: () => h(CloseCircleFilled$1, { style: `color: ${feedbackColor.ERROR}` }),
|
|
1494
|
+
warning: () => h(ExclamationCircleFilled$1, { style: `color: ${feedbackColor.WARNING}` }),
|
|
1495
|
+
info: () => h(InfoCircleFilled$1, { style: `color: ${feedbackColor.INFO}` }),
|
|
1496
|
+
confirm: () => h(InfoCircleFilled$1, { style: `color: ${feedbackColor.INFO}` }),
|
|
1497
|
+
warn: () => h(ExclamationCircleFilled$1, { style: `color: ${feedbackColor.WARNING}` })
|
|
1498
|
+
};
|
|
1495
1499
|
function __createBtn(btnText = '确定', onClick = (() => '点击'), style = '', type = 'primary', size = 'small') {
|
|
1496
1500
|
return h(Button, {
|
|
1497
1501
|
type,
|
|
@@ -1524,14 +1528,14 @@ const BmNotification = (config) => {
|
|
|
1524
1528
|
if (btn)
|
|
1525
1529
|
config['btn'] = btn;
|
|
1526
1530
|
if ([feedbackType.WARNING, feedbackType.WARN].indexOf(type) !== -1) {
|
|
1527
|
-
notification.warning(Object.assign({ key, icon:
|
|
1531
|
+
notification.warning(Object.assign({ key, icon: feedbackIcon['warning'] }, config));
|
|
1528
1532
|
return;
|
|
1529
1533
|
}
|
|
1530
1534
|
notification[type](Object.assign({ key }, config));
|
|
1531
1535
|
};
|
|
1532
1536
|
const StaticBmModal = (config) => {
|
|
1533
1537
|
const type = config['type'] || feedbackType.INFO;
|
|
1534
|
-
return Modal[type](Object.assign({ cancelButtonProps: { type: 'second' }, okType: 'primary', cancelText: '取消', okText: '确认', autoFocusButton: null }, config));
|
|
1538
|
+
return Modal[type](Object.assign({ cancelButtonProps: { type: 'second' }, okType: 'primary', cancelText: '取消', okText: '确认', autoFocusButton: null, icon: feedbackIcon[type] }, config));
|
|
1535
1539
|
};
|
|
1536
1540
|
const BmMessage = (config) => {
|
|
1537
1541
|
const type = config.type;
|
|
@@ -42,9 +42,9 @@ declare const BmFloatTable: import("bm-admin-ui/es/utils/with-install").SFCWithI
|
|
|
42
42
|
gridOptions: import("vue").ComputedRef<any>;
|
|
43
43
|
gridEvents: import("vue").ComputedRef<any>;
|
|
44
44
|
pager: import("vue").ComputedRef<any>;
|
|
45
|
-
simpleImage: import("vue").Ref<(string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
45
|
+
simpleImage: import("vue").Ref<JSX.Element | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
46
|
[key: string]: any;
|
|
47
|
-
}> | null | undefined) |
|
|
47
|
+
}> | null | undefined) | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
48
48
|
[key: string]: any;
|
|
49
49
|
}> | null | undefined)[]>;
|
|
50
50
|
floatRefsId: import("vue").Ref<{}>;
|
|
@@ -234,7 +234,9 @@ const _sfc_main = {
|
|
|
234
234
|
if (state.floatHandleDomCol)
|
|
235
235
|
return;
|
|
236
236
|
let id = column.id;
|
|
237
|
-
state.floatHandleDomCol = floatTable.value.querySelector(
|
|
237
|
+
state.floatHandleDomCol = floatTable.value.querySelector(
|
|
238
|
+
`.vxe-table--header-wrapper .vxe-header--row .${id}`
|
|
239
|
+
);
|
|
238
240
|
},
|
|
239
241
|
leaveFloatTable() {
|
|
240
242
|
let timer = setTimeout(() => {
|
|
@@ -295,36 +297,43 @@ const _sfc_main = {
|
|
|
295
297
|
let closeSetRow;
|
|
296
298
|
let headerWrapper;
|
|
297
299
|
if (props.isNeedFloatHandle) {
|
|
298
|
-
inObserverDom = new IntersectionObserver(
|
|
299
|
-
entries
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
300
|
+
inObserverDom = new IntersectionObserver(
|
|
301
|
+
(entries) => {
|
|
302
|
+
entries.forEach((item) => {
|
|
303
|
+
if (item.intersectionRatio > 0.1) {
|
|
304
|
+
closeSetRow = closeSetRow || item.target.closest(".vxe-header--row");
|
|
305
|
+
headerWrapper = headerWrapper || item.target.closest(".vxe-table--header-wrapper");
|
|
306
|
+
if (closeSetRow.clientWidth <= headerWrapper.clientWidth && !isHasOver) {
|
|
307
|
+
inObserverDom.disconnect();
|
|
308
|
+
} else {
|
|
309
|
+
isHasOver = true;
|
|
310
|
+
}
|
|
311
|
+
state.isShowFloatHandle = false;
|
|
312
|
+
state.atVisible = true;
|
|
305
313
|
} else {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
if (gridOptions.value.data && gridOptions.value.data.length > 0) {
|
|
312
|
-
state.goAnimationEnd = false;
|
|
313
|
-
state.isShowFloatHandle = true;
|
|
314
|
-
state.atVisible = false;
|
|
314
|
+
if (gridOptions.value.data && gridOptions.value.data.length > 0) {
|
|
315
|
+
state.goAnimationEnd = false;
|
|
316
|
+
state.isShowFloatHandle = true;
|
|
317
|
+
state.atVisible = false;
|
|
318
|
+
}
|
|
315
319
|
}
|
|
320
|
+
});
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
threshold: 0.1
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
watch(
|
|
327
|
+
() => state.floatHandleDomCol,
|
|
328
|
+
function(col) {
|
|
329
|
+
if (col) {
|
|
330
|
+
inObserverDom.observe(col);
|
|
316
331
|
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
});
|
|
321
|
-
watch(() => state.floatHandleDomCol, function(col) {
|
|
322
|
-
if (col) {
|
|
323
|
-
inObserverDom.observe(col);
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
immediate: true
|
|
324
335
|
}
|
|
325
|
-
|
|
326
|
-
immediate: true
|
|
327
|
-
});
|
|
336
|
+
);
|
|
328
337
|
}
|
|
329
338
|
return {
|
|
330
339
|
floatTable,
|
|
@@ -42,9 +42,9 @@ declare const _default: {
|
|
|
42
42
|
gridOptions: import("vue").ComputedRef<any>;
|
|
43
43
|
gridEvents: import("vue").ComputedRef<any>;
|
|
44
44
|
pager: import("vue").ComputedRef<any>;
|
|
45
|
-
simpleImage: import("vue").Ref<(string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
45
|
+
simpleImage: import("vue").Ref<JSX.Element | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
46
|
[key: string]: any;
|
|
47
|
-
}> | null | undefined) |
|
|
47
|
+
}> | null | undefined) | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
48
48
|
[key: string]: any;
|
|
49
49
|
}> | null | undefined)[]>;
|
|
50
50
|
floatRefsId: import("vue").Ref<{}>;
|
package/es/components/index.d.ts
CHANGED
package/es/components/index.js
CHANGED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
declare const BmTagsDisplay: import("bm-admin-ui/es/utils/with-install").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
list: {
|
|
3
|
+
type: ArrayConstructor;
|
|
4
|
+
default: () => {
|
|
5
|
+
key: any;
|
|
6
|
+
title: string;
|
|
7
|
+
}[];
|
|
8
|
+
};
|
|
9
|
+
showEmpty: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
showEmptyBtn: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
btnText: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
placement: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
width: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
containId: string;
|
|
31
|
+
clear: () => void;
|
|
32
|
+
toAddTags: () => void;
|
|
33
|
+
getPopupContainer: () => HTMLElement;
|
|
34
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "update:list" | "addClick")[], "clear" | "update:list" | "addClick", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
|
+
list: {
|
|
36
|
+
type: ArrayConstructor;
|
|
37
|
+
default: () => {
|
|
38
|
+
key: any;
|
|
39
|
+
title: string;
|
|
40
|
+
}[];
|
|
41
|
+
};
|
|
42
|
+
showEmpty: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
showEmptyBtn: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
btnText: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
placement: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
width: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
}>> & {
|
|
63
|
+
onClear?: ((...args: any[]) => any) | undefined;
|
|
64
|
+
"onUpdate:list"?: ((...args: any[]) => any) | undefined;
|
|
65
|
+
onAddClick?: ((...args: any[]) => any) | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
width: string;
|
|
68
|
+
placement: string;
|
|
69
|
+
list: unknown[];
|
|
70
|
+
showEmpty: boolean;
|
|
71
|
+
showEmptyBtn: boolean;
|
|
72
|
+
btnText: string;
|
|
73
|
+
}>>;
|
|
74
|
+
export { BmTagsDisplay };
|
|
75
|
+
export default BmTagsDisplay;
|