bm-admin-ui 1.0.17-alpha → 1.0.18-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/float-table/index.d.ts +2 -2
- package/es/components/float-table/src/float-table.vue.d.ts +2 -2
- package/es/components/multi-cascader-compose/index.d.ts +3 -3
- package/es/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +3 -3
- package/es/components/search-filter/index.d.ts +4 -2
- package/es/components/search-filter/index.js +1 -2
- package/es/components/search-filter/src/search-filter.vue.d.ts +4 -2
- package/es/components/shops-filter/index.d.ts +1 -1
- package/es/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
- package/es/components/staffs-selector/index.js +1 -1
- package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +2 -2
- package/es/components/timeline/index.d.ts +20 -6
- package/es/components/timeline/index.js +2 -2
- package/es/components/timeline/src/props.d.ts +6 -2
- package/es/components/timeline/src/timeline-item.vue.d.ts +20 -6
- package/es/components/upload/index.d.ts +9 -0
- package/es/components/upload/index.js +61 -11
- package/es/components/upload/src/upload.vue.d.ts +9 -0
- package/index.esm.js +223 -355
- package/index.js +221 -353
- package/lib/components/float-table/index.d.ts +2 -2
- package/lib/components/float-table/src/float-table.vue.d.ts +2 -2
- package/lib/components/multi-cascader-compose/index.d.ts +3 -3
- package/lib/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +3 -3
- package/lib/components/search-filter/index.d.ts +4 -2
- package/lib/components/search-filter/index.js +1 -2
- package/lib/components/search-filter/src/search-filter.vue.d.ts +4 -2
- package/lib/components/shops-filter/index.d.ts +1 -1
- package/lib/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
- package/lib/components/staffs-selector/index.js +1 -1
- package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +2 -2
- package/lib/components/timeline/index.d.ts +20 -6
- package/lib/components/timeline/index.js +2 -2
- package/lib/components/timeline/src/props.d.ts +6 -2
- package/lib/components/timeline/src/timeline-item.vue.d.ts +20 -6
- package/lib/components/upload/index.d.ts +9 -0
- package/lib/components/upload/index.js +61 -11
- package/lib/components/upload/src/upload.vue.d.ts +9 -0
- package/package.json +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/multi-cascader-compose/index.d.ts +3 -3
- package/types/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +3 -3
- package/types/components/search-filter/index.d.ts +4 -2
- package/types/components/search-filter/src/search-filter.vue.d.ts +4 -2
- package/types/components/shops-filter/index.d.ts +1 -1
- package/types/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
- package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +2 -2
- package/types/components/timeline/index.d.ts +20 -6
- package/types/components/timeline/src/props.d.ts +6 -2
- package/types/components/timeline/src/timeline-item.vue.d.ts +20 -6
- package/types/components/upload/index.d.ts +9 -0
- package/types/components/upload/src/upload.vue.d.ts +9 -0
|
@@ -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<
|
|
45
|
+
simpleImage: import("vue").Ref<(string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
46
|
[key: string]: any;
|
|
47
|
-
}> | null | undefined) | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
47
|
+
}> | null | undefined) | JSX.Element | (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<{}>;
|
|
@@ -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<
|
|
45
|
+
simpleImage: import("vue").Ref<(string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
46
|
[key: string]: any;
|
|
47
|
-
}> | null | undefined) | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
47
|
+
}> | null | undefined) | JSX.Element | (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<{}>;
|
|
@@ -77,7 +77,7 @@ declare const BmMultiCascaderCompose: import("bm-admin-ui/es/utils/with-install"
|
|
|
77
77
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
78
78
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
79
79
|
}>>;
|
|
80
|
-
emits: (event: "
|
|
80
|
+
emits: (event: "change" | "update:modelValue", ...args: any[]) => void;
|
|
81
81
|
path: import("vue").Ref<{
|
|
82
82
|
[x: string]: any;
|
|
83
83
|
index: number;
|
|
@@ -106,7 +106,7 @@ declare const BmMultiCascaderCompose: import("bm-admin-ui/es/utils/with-install"
|
|
|
106
106
|
RightOutlined: import("@ant-design/icons-vue/lib/icons/RightOutlined").RightOutlinedIconType;
|
|
107
107
|
DownOutlined: import("@ant-design/icons-vue/lib/icons/DownOutlined").DownOutlinedIconType;
|
|
108
108
|
CloseCircleFilled: import("@ant-design/icons-vue/lib/icons/CloseCircleFilled").CloseCircleFilledIconType;
|
|
109
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
109
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
110
110
|
options: {
|
|
111
111
|
type: import("vue").PropType<import("./types").MutilCascaderItem[]>;
|
|
112
112
|
default(): import("./types").MutilCascaderItem[];
|
|
@@ -148,12 +148,12 @@ declare const BmMultiCascaderCompose: import("bm-admin-ui/es/utils/with-install"
|
|
|
148
148
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
149
149
|
}, {
|
|
150
150
|
placeholder: string;
|
|
151
|
+
allowClear: boolean;
|
|
151
152
|
options: import("./types").MutilCascaderItem[];
|
|
152
153
|
modelValue: string[];
|
|
153
154
|
optionValueName: string;
|
|
154
155
|
optionLabelName: string;
|
|
155
156
|
maxTagCount: number;
|
|
156
|
-
allowClear: boolean;
|
|
157
157
|
emptyImage: JSX.Element | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
158
158
|
[key: string]: any;
|
|
159
159
|
}> | null | undefined) | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
@@ -78,7 +78,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
78
78
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
79
79
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
80
80
|
}>>;
|
|
81
|
-
emits: (event: "
|
|
81
|
+
emits: (event: "change" | "update:modelValue", ...args: any[]) => void;
|
|
82
82
|
path: import("vue").Ref<{
|
|
83
83
|
[x: string]: any;
|
|
84
84
|
index: number;
|
|
@@ -107,7 +107,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
107
107
|
RightOutlined: import("@ant-design/icons-vue/lib/icons/RightOutlined").RightOutlinedIconType;
|
|
108
108
|
DownOutlined: import("@ant-design/icons-vue/lib/icons/DownOutlined").DownOutlinedIconType;
|
|
109
109
|
CloseCircleFilled: import("@ant-design/icons-vue/lib/icons/CloseCircleFilled").CloseCircleFilledIconType;
|
|
110
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
110
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
111
111
|
options: {
|
|
112
112
|
type: import("vue").PropType<MutilCascaderItem[]>;
|
|
113
113
|
default(): MutilCascaderItem[];
|
|
@@ -149,12 +149,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
149
149
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
150
150
|
}, {
|
|
151
151
|
placeholder: string;
|
|
152
|
+
allowClear: boolean;
|
|
152
153
|
options: MutilCascaderItem[];
|
|
153
154
|
modelValue: string[];
|
|
154
155
|
optionValueName: string;
|
|
155
156
|
optionLabelName: string;
|
|
156
157
|
maxTagCount: number;
|
|
157
|
-
allowClear: boolean;
|
|
158
158
|
emptyImage: JSX.Element | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
159
159
|
[key: string]: any;
|
|
160
160
|
}> | null | undefined) | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
@@ -114,7 +114,9 @@ declare const BmSearchFilter: import("bm-admin-ui/es/utils/with-install").SFCWit
|
|
|
114
114
|
gutter: unknown[];
|
|
115
115
|
};
|
|
116
116
|
form: {
|
|
117
|
-
labelCol:
|
|
117
|
+
labelCol: {
|
|
118
|
+
[x: string]: any;
|
|
119
|
+
};
|
|
118
120
|
labelAlign: string;
|
|
119
121
|
wrapperCol: {
|
|
120
122
|
span: number;
|
|
@@ -177,11 +179,11 @@ declare const BmSearchFilter: import("bm-admin-ui/es/utils/with-install").SFCWit
|
|
|
177
179
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
178
180
|
onExpand?: ((...args: any[]) => any) | undefined;
|
|
179
181
|
}, {
|
|
180
|
-
value: Record<string, any>;
|
|
181
182
|
showExpandBtn: boolean;
|
|
182
183
|
showSearchIcon: boolean;
|
|
183
184
|
userRule: unknown[];
|
|
184
185
|
labelCol: Record<string, any>;
|
|
186
|
+
value: Record<string, any>;
|
|
185
187
|
ruleSpan: Record<string, any>;
|
|
186
188
|
gutter: unknown[];
|
|
187
189
|
fixedCount: number;
|
|
@@ -1290,7 +1290,6 @@ const _hoisted_2$1 = { class: "bm-search-filter-actions" };
|
|
|
1290
1290
|
const _hoisted_3$1 = /* @__PURE__ */ createTextVNode("\u91CD\u7F6E");
|
|
1291
1291
|
const _hoisted_4$1 = /* @__PURE__ */ createTextVNode("\u67E5\u8BE2");
|
|
1292
1292
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1293
|
-
name: "search-reset-btn",
|
|
1294
1293
|
props: searchResetBtnProps,
|
|
1295
1294
|
emits: ["submit", "reset", "expand"],
|
|
1296
1295
|
setup(__props, { emit: emits }) {
|
|
@@ -1979,7 +1978,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1979
1978
|
"onUpdate:api": _cache[0] || (_cache[0] = ($event) => fApi.value = $event),
|
|
1980
1979
|
"model-value": props.value,
|
|
1981
1980
|
rule: unref(rule),
|
|
1982
|
-
option,
|
|
1981
|
+
option: unref(option),
|
|
1983
1982
|
onChange: handleChange
|
|
1984
1983
|
}, null, 8, ["api", "model-value", "rule", "option"])
|
|
1985
1984
|
], 2);
|
|
@@ -114,7 +114,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
114
114
|
gutter: unknown[];
|
|
115
115
|
};
|
|
116
116
|
form: {
|
|
117
|
-
labelCol:
|
|
117
|
+
labelCol: {
|
|
118
|
+
[x: string]: any;
|
|
119
|
+
};
|
|
118
120
|
labelAlign: string;
|
|
119
121
|
wrapperCol: {
|
|
120
122
|
span: number;
|
|
@@ -177,11 +179,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
177
179
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
178
180
|
onExpand?: ((...args: any[]) => any) | undefined;
|
|
179
181
|
}, {
|
|
180
|
-
value: Record<string, any>;
|
|
181
182
|
showExpandBtn: boolean;
|
|
182
183
|
showSearchIcon: boolean;
|
|
183
184
|
userRule: unknown[];
|
|
184
185
|
labelCol: Record<string, any>;
|
|
186
|
+
value: Record<string, any>;
|
|
185
187
|
ruleSpan: Record<string, any>;
|
|
186
188
|
gutter: unknown[];
|
|
187
189
|
fixedCount: number;
|
|
@@ -58,7 +58,7 @@ declare const BmShopsFilter: import("bm-admin-ui/es/utils/with-install").SFCWith
|
|
|
58
58
|
label?: string | undefined;
|
|
59
59
|
multiple?: boolean | undefined;
|
|
60
60
|
}[]>;
|
|
61
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
61
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:selected" | "change")[], "update:selected" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
62
|
labelTitle: {
|
|
63
63
|
type: StringConstructor;
|
|
64
64
|
default: string;
|
|
@@ -58,7 +58,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
58
|
label?: string | undefined;
|
|
59
59
|
multiple?: boolean | undefined;
|
|
60
60
|
}[]>;
|
|
61
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
61
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:selected" | "change")[], "update:selected" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
62
|
labelTitle: {
|
|
63
63
|
type: StringConstructor;
|
|
64
64
|
default: string;
|
|
@@ -40,9 +40,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
40
|
searchVal: import("vue").Ref<string>;
|
|
41
41
|
selectAll: import("vue").Ref<boolean>;
|
|
42
42
|
indeterminate: import("vue").Ref<boolean>;
|
|
43
|
-
emptyPic: import("vue").Ref<
|
|
43
|
+
emptyPic: import("vue").Ref<(string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
44
44
|
[key: string]: any;
|
|
45
|
-
}> | null | undefined) | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
45
|
+
}> | null | undefined) | JSX.Element | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
46
|
[key: string]: any;
|
|
47
47
|
}> | null | undefined)[]>;
|
|
48
48
|
listChecked: import("vue").Ref<{}>;
|
|
@@ -44,8 +44,12 @@ declare const BmTimelineItem: import("bm-admin-ui/es/utils/with-install").SFCWit
|
|
|
44
44
|
color: import("vue-types").VueTypeDef<string> & {
|
|
45
45
|
default: string;
|
|
46
46
|
};
|
|
47
|
-
dot: import("vue-types").VueTypeValidableDef<any
|
|
48
|
-
|
|
47
|
+
dot: import("vue-types").VueTypeValidableDef<any> & {
|
|
48
|
+
default: any;
|
|
49
|
+
};
|
|
50
|
+
label: import("vue-types").VueTypeValidableDef<any> & {
|
|
51
|
+
default: any;
|
|
52
|
+
};
|
|
49
53
|
}, {
|
|
50
54
|
slots: Readonly<{
|
|
51
55
|
[name: string]: import("vue").Slot | undefined;
|
|
@@ -54,8 +58,12 @@ declare const BmTimelineItem: import("bm-admin-ui/es/utils/with-install").SFCWit
|
|
|
54
58
|
color: import("vue-types").VueTypeDef<string> & {
|
|
55
59
|
default: string;
|
|
56
60
|
};
|
|
57
|
-
dot: import("vue-types").VueTypeValidableDef<any
|
|
58
|
-
|
|
61
|
+
dot: import("vue-types").VueTypeValidableDef<any> & {
|
|
62
|
+
default: any;
|
|
63
|
+
};
|
|
64
|
+
label: import("vue-types").VueTypeValidableDef<any> & {
|
|
65
|
+
default: any;
|
|
66
|
+
};
|
|
59
67
|
}>> & {
|
|
60
68
|
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
61
69
|
}>>;
|
|
@@ -84,10 +92,16 @@ declare const BmTimelineItem: import("bm-admin-ui/es/utils/with-install").SFCWit
|
|
|
84
92
|
color: import("vue-types").VueTypeDef<string> & {
|
|
85
93
|
default: string;
|
|
86
94
|
};
|
|
87
|
-
dot: import("vue-types").VueTypeValidableDef<any
|
|
88
|
-
|
|
95
|
+
dot: import("vue-types").VueTypeValidableDef<any> & {
|
|
96
|
+
default: any;
|
|
97
|
+
};
|
|
98
|
+
label: import("vue-types").VueTypeValidableDef<any> & {
|
|
99
|
+
default: any;
|
|
100
|
+
};
|
|
89
101
|
}>>, {
|
|
90
102
|
color: string;
|
|
103
|
+
label: any;
|
|
104
|
+
dot: any;
|
|
91
105
|
}>>;
|
|
92
106
|
export { BmTimeline, BmTimelineItem };
|
|
93
107
|
export default BmTimeline;
|
|
@@ -42,8 +42,8 @@ const timelineProps = () => ({
|
|
|
42
42
|
});
|
|
43
43
|
const timelineItemProps = () => ({
|
|
44
44
|
color: z.oneOf(['blue', 'red', 'green', 'gray']).def('blue'),
|
|
45
|
-
dot: z.any,
|
|
46
|
-
label: z.any,
|
|
45
|
+
dot: z.any.def(''),
|
|
46
|
+
label: z.any.def(''),
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
var _export_sfc = (sfc, props) => {
|
|
@@ -14,7 +14,11 @@ export declare const timelineItemProps: () => {
|
|
|
14
14
|
color: import("vue-types").VueTypeDef<string> & {
|
|
15
15
|
default: string;
|
|
16
16
|
};
|
|
17
|
-
dot: import("vue-types").VueTypeValidableDef<any
|
|
18
|
-
|
|
17
|
+
dot: import("vue-types").VueTypeValidableDef<any> & {
|
|
18
|
+
default: any;
|
|
19
|
+
};
|
|
20
|
+
label: import("vue-types").VueTypeValidableDef<any> & {
|
|
21
|
+
default: any;
|
|
22
|
+
};
|
|
19
23
|
};
|
|
20
24
|
export declare type TimelineItemProps = Partial<ExtractPropTypes<ReturnType<typeof timelineItemProps>>>;
|
|
@@ -3,8 +3,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3
3
|
color: import("vue-types").VueTypeDef<string> & {
|
|
4
4
|
default: string;
|
|
5
5
|
};
|
|
6
|
-
dot: import("vue-types").VueTypeValidableDef<any
|
|
7
|
-
|
|
6
|
+
dot: import("vue-types").VueTypeValidableDef<any> & {
|
|
7
|
+
default: any;
|
|
8
|
+
};
|
|
9
|
+
label: import("vue-types").VueTypeValidableDef<any> & {
|
|
10
|
+
default: any;
|
|
11
|
+
};
|
|
8
12
|
}, {
|
|
9
13
|
slots: Readonly<{
|
|
10
14
|
[name: string]: import("vue").Slot | undefined;
|
|
@@ -13,8 +17,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
17
|
color: import("vue-types").VueTypeDef<string> & {
|
|
14
18
|
default: string;
|
|
15
19
|
};
|
|
16
|
-
dot: import("vue-types").VueTypeValidableDef<any
|
|
17
|
-
|
|
20
|
+
dot: import("vue-types").VueTypeValidableDef<any> & {
|
|
21
|
+
default: any;
|
|
22
|
+
};
|
|
23
|
+
label: import("vue-types").VueTypeValidableDef<any> & {
|
|
24
|
+
default: any;
|
|
25
|
+
};
|
|
18
26
|
}>> & {
|
|
19
27
|
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
20
28
|
}>>;
|
|
@@ -43,9 +51,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
51
|
color: import("vue-types").VueTypeDef<string> & {
|
|
44
52
|
default: string;
|
|
45
53
|
};
|
|
46
|
-
dot: import("vue-types").VueTypeValidableDef<any
|
|
47
|
-
|
|
54
|
+
dot: import("vue-types").VueTypeValidableDef<any> & {
|
|
55
|
+
default: any;
|
|
56
|
+
};
|
|
57
|
+
label: import("vue-types").VueTypeValidableDef<any> & {
|
|
58
|
+
default: any;
|
|
59
|
+
};
|
|
48
60
|
}>>, {
|
|
49
61
|
color: string;
|
|
62
|
+
label: any;
|
|
63
|
+
dot: any;
|
|
50
64
|
}>;
|
|
51
65
|
export default _default;
|
|
@@ -61,6 +61,14 @@ declare const BmUpload: import("bm-admin-ui/es/utils/with-install").SFCWithInsta
|
|
|
61
61
|
type: StringConstructor;
|
|
62
62
|
default: string;
|
|
63
63
|
};
|
|
64
|
+
holdProgress: {
|
|
65
|
+
type: NumberConstructor;
|
|
66
|
+
default: number;
|
|
67
|
+
};
|
|
68
|
+
customErrors: {
|
|
69
|
+
type: ObjectConstructor;
|
|
70
|
+
default(): undefined;
|
|
71
|
+
};
|
|
64
72
|
};
|
|
65
73
|
emits: string[];
|
|
66
74
|
setup(props: any, { emit }: {
|
|
@@ -68,6 +76,7 @@ declare const BmUpload: import("bm-admin-ui/es/utils/with-install").SFCWithInsta
|
|
|
68
76
|
}): {
|
|
69
77
|
uploadDisabled: import("vue").ComputedRef<boolean>;
|
|
70
78
|
customUploadRequest(file: any): void;
|
|
79
|
+
fileIsDelete(file: any): boolean;
|
|
71
80
|
uploadSuccess(data: any, file: any): void;
|
|
72
81
|
uploadError(error: any, file?: any): void;
|
|
73
82
|
deleteFile(uid: any): Promise<void>;
|
|
@@ -1333,6 +1333,16 @@ const _sfc_main = {
|
|
|
1333
1333
|
cloudReadUrl: {
|
|
1334
1334
|
type: String,
|
|
1335
1335
|
default: ""
|
|
1336
|
+
},
|
|
1337
|
+
holdProgress: {
|
|
1338
|
+
type: Number,
|
|
1339
|
+
default: 0
|
|
1340
|
+
},
|
|
1341
|
+
customErrors: {
|
|
1342
|
+
type: Object,
|
|
1343
|
+
default() {
|
|
1344
|
+
return void 0;
|
|
1345
|
+
}
|
|
1336
1346
|
}
|
|
1337
1347
|
},
|
|
1338
1348
|
emits: [
|
|
@@ -1342,7 +1352,9 @@ const _sfc_main = {
|
|
|
1342
1352
|
"previewFile",
|
|
1343
1353
|
"successFile",
|
|
1344
1354
|
"deleteFile",
|
|
1345
|
-
"error"
|
|
1355
|
+
"error",
|
|
1356
|
+
"updateDisabledStatus",
|
|
1357
|
+
"updateIsUploadingStatus"
|
|
1346
1358
|
],
|
|
1347
1359
|
setup(props, { emit }) {
|
|
1348
1360
|
let acceptList = [
|
|
@@ -1394,15 +1406,15 @@ const _sfc_main = {
|
|
|
1394
1406
|
disabled: false,
|
|
1395
1407
|
async customRequest({ file, fileField, data }) {
|
|
1396
1408
|
if (file.size > state.extraConfigs.maxSize * 1024 * 1024) {
|
|
1397
|
-
return methods.uploadError(new Error(`\u4E0D\u80FD\u4E0A\u4F20\u5927\u4E8E${state.extraConfigs.maxSize}M\u7684\u6587\u4EF6`));
|
|
1409
|
+
return methods.uploadError(new Error(props.customErrors?.maxSize || `\u4E0D\u80FD\u4E0A\u4F20\u5927\u4E8E${state.extraConfigs.maxSize}M\u7684\u6587\u4EF6`));
|
|
1398
1410
|
}
|
|
1399
1411
|
if (Object.keys(state.fileList).length >= state.extraConfigs.maxCount) {
|
|
1400
|
-
return methods.uploadError(new Error(`\u4E0D\u80FD\u4E0A\u4F20\u591A\u4E8E${state.extraConfigs.maxCount}\u4E2A\u6587\u4EF6`));
|
|
1412
|
+
return methods.uploadError(new Error(props.customErrors?.maxCount || `\u4E0D\u80FD\u4E0A\u4F20\u591A\u4E8E${state.extraConfigs.maxCount}\u4E2A\u6587\u4EF6`));
|
|
1401
1413
|
}
|
|
1402
1414
|
let name = file.name;
|
|
1403
1415
|
let fileFormat = name.split(".").pop();
|
|
1404
1416
|
if (!state.uploadConfigs.accept.includes(`.${fileFormat}`)) {
|
|
1405
|
-
return methods.uploadError(new Error(`\u4E0D\u80FD\u4E0A\u4F20\u8BE5\u7C7B\u578B\u6587\u4EF6`));
|
|
1417
|
+
return methods.uploadError(new Error(props.customErrors?.format || `\u4E0D\u80FD\u4E0A\u4F20\u8BE5\u7C7B\u578B\u6587\u4EF6`));
|
|
1406
1418
|
}
|
|
1407
1419
|
state.fileList[file.uid] = {
|
|
1408
1420
|
uid: file.uid,
|
|
@@ -1422,16 +1434,25 @@ const _sfc_main = {
|
|
|
1422
1434
|
});
|
|
1423
1435
|
const methods = {
|
|
1424
1436
|
customUploadRequest(file) {
|
|
1437
|
+
const updateUploadProgress = (progress) => {
|
|
1438
|
+
if (methods.fileIsDelete(file)) {
|
|
1439
|
+
return;
|
|
1440
|
+
}
|
|
1441
|
+
state.fileList[file.uid] = {
|
|
1442
|
+
...state.fileList[file.uid],
|
|
1443
|
+
progress
|
|
1444
|
+
};
|
|
1445
|
+
};
|
|
1425
1446
|
props.uploadRequest?.(file, {
|
|
1426
1447
|
onUploadProgress: (e) => {
|
|
1427
1448
|
let progress = Math.round(e.loaded / e.total * 100);
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1449
|
+
if (props.holdProgress) {
|
|
1450
|
+
progress = progress > props.holdProgress ? props.holdProgress : progress;
|
|
1451
|
+
}
|
|
1452
|
+
updateUploadProgress(progress);
|
|
1432
1453
|
}
|
|
1433
1454
|
}).then(function(data) {
|
|
1434
|
-
|
|
1455
|
+
updateUploadProgress(100);
|
|
1435
1456
|
methods.uploadSuccess(data, file);
|
|
1436
1457
|
}).catch(function(error) {
|
|
1437
1458
|
console.error(error);
|
|
@@ -1441,7 +1462,13 @@ const _sfc_main = {
|
|
|
1441
1462
|
methods.uploadError(error, file);
|
|
1442
1463
|
});
|
|
1443
1464
|
},
|
|
1465
|
+
fileIsDelete(file) {
|
|
1466
|
+
return !state.fileList[file.uid];
|
|
1467
|
+
},
|
|
1444
1468
|
uploadSuccess(data, file) {
|
|
1469
|
+
if (methods.fileIsDelete(file)) {
|
|
1470
|
+
return;
|
|
1471
|
+
}
|
|
1445
1472
|
emit("successFile", data);
|
|
1446
1473
|
let uri = data?.url;
|
|
1447
1474
|
let item = state.extraConfigs.fileDetail ? {
|
|
@@ -1456,6 +1483,9 @@ const _sfc_main = {
|
|
|
1456
1483
|
emit("update", state.uploadedList);
|
|
1457
1484
|
},
|
|
1458
1485
|
uploadError(error, file = {}) {
|
|
1486
|
+
if (methods.fileIsDelete(file)) {
|
|
1487
|
+
return;
|
|
1488
|
+
}
|
|
1459
1489
|
if (file.uid && state.fileList[file.uid]) {
|
|
1460
1490
|
state.fileList[file.uid].status = "error";
|
|
1461
1491
|
}
|
|
@@ -1574,6 +1604,26 @@ const _sfc_main = {
|
|
|
1574
1604
|
watchEffect(() => {
|
|
1575
1605
|
state.uploadConfigs.disabled = uploadDisabled.value;
|
|
1576
1606
|
});
|
|
1607
|
+
watch(() => uploadDisabled.value, (value) => {
|
|
1608
|
+
emit("updateDisabledStatus", value);
|
|
1609
|
+
}, {
|
|
1610
|
+
immediate: true
|
|
1611
|
+
});
|
|
1612
|
+
const isUploading = computed(() => {
|
|
1613
|
+
let ret = false;
|
|
1614
|
+
let fileList = state.fileList || {};
|
|
1615
|
+
Object.keys(fileList).forEach((uid) => {
|
|
1616
|
+
if (fileList[uid]?.progress && fileList[uid].progress < 100) {
|
|
1617
|
+
ret = true;
|
|
1618
|
+
}
|
|
1619
|
+
});
|
|
1620
|
+
return ret;
|
|
1621
|
+
});
|
|
1622
|
+
watch(() => isUploading.value, (value) => {
|
|
1623
|
+
emit("updateIsUploadingStatus", value);
|
|
1624
|
+
}, {
|
|
1625
|
+
immediate: true
|
|
1626
|
+
});
|
|
1577
1627
|
return {
|
|
1578
1628
|
...toRefs(state),
|
|
1579
1629
|
icons,
|
|
@@ -1727,7 +1777,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1727
1777
|
key: 1,
|
|
1728
1778
|
file: item
|
|
1729
1779
|
})
|
|
1730
|
-
],
|
|
1780
|
+
], 2112)) : createCommentVNode("v-if", true),
|
|
1731
1781
|
createCommentVNode(" \u56FE\u7247\u9519\u8BEF\u5C55\u793A "),
|
|
1732
1782
|
item.status === "error" ? (openBlock(), createElementBlock("div", {
|
|
1733
1783
|
key: 2,
|
|
@@ -1773,7 +1823,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1773
1823
|
}, 8, ["class", "disabled"]),
|
|
1774
1824
|
_ctx.extraConfigs.tips && _ctx.extraConfigs.showTips ? (openBlock(), createElementBlock("div", _hoisted_23, toDisplayString(_ctx.extraConfigs.tips), 1)) : createCommentVNode("v-if", true)
|
|
1775
1825
|
])) : createCommentVNode("v-if", true)
|
|
1776
|
-
],
|
|
1826
|
+
], 2112))
|
|
1777
1827
|
]),
|
|
1778
1828
|
_: 3
|
|
1779
1829
|
}, 16, ["class"])) : createCommentVNode("v-if", true),
|
|
@@ -61,6 +61,14 @@ declare const _default: {
|
|
|
61
61
|
type: StringConstructor;
|
|
62
62
|
default: string;
|
|
63
63
|
};
|
|
64
|
+
holdProgress: {
|
|
65
|
+
type: NumberConstructor;
|
|
66
|
+
default: number;
|
|
67
|
+
};
|
|
68
|
+
customErrors: {
|
|
69
|
+
type: ObjectConstructor;
|
|
70
|
+
default(): undefined;
|
|
71
|
+
};
|
|
64
72
|
};
|
|
65
73
|
emits: string[];
|
|
66
74
|
setup(props: any, { emit }: {
|
|
@@ -68,6 +76,7 @@ declare const _default: {
|
|
|
68
76
|
}): {
|
|
69
77
|
uploadDisabled: import("vue").ComputedRef<boolean>;
|
|
70
78
|
customUploadRequest(file: any): void;
|
|
79
|
+
fileIsDelete(file: any): boolean;
|
|
71
80
|
uploadSuccess(data: any, file: any): void;
|
|
72
81
|
uploadError(error: any, file?: any): void;
|
|
73
82
|
deleteFile(uid: any): Promise<void>;
|