@aplus-frontend/ui 6.18.0 → 6.19.0
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/src/ap-action/item-popconfirm/index.vue.d.ts +31 -2
- package/es/src/ap-button/ap-action-button.vue.mjs +11 -7
- package/es/src/ap-button/ap-button.vue.mjs +24 -20
- package/es/src/ap-button/ap-confirm-button.vue.mjs +14 -10
- package/es/src/ap-download/ap-download.vue.mjs +21 -18
- package/es/src/ap-field/number/index.vue.d.ts +29 -29
- package/es/src/ap-field/rate/index.vue.d.ts +4 -4
- package/es/src/ap-field/segmented/index.vue.mjs +17 -12
- package/es/src/ap-field/select/index.vue.d.ts +97 -97
- package/es/src/ap-field/select/index.vue.mjs +8 -8
- package/es/src/ap-field/slider/index.vue.d.ts +8 -8
- package/es/src/ap-field/text-area/index.vue.d.ts +54 -54
- package/es/src/ap-field/text-area/index.vue.mjs +9 -9
- package/es/src/ap-field/tree-select/index.vue.d.ts +93 -93
- package/es/src/ap-field/tree-select/index.vue.mjs +16 -16
- package/es/src/ap-form/ap-form.vue.d.ts +13 -13
- package/es/src/ap-form/drawer-form/index.vue.d.ts +15 -15
- package/es/src/ap-form/items/number/index.vue.d.ts +31 -31
- package/es/src/ap-form/items/select/index.vue.d.ts +99 -99
- package/es/src/ap-form/items/text/index.vue.d.ts +3 -3
- package/es/src/ap-form/items/text/password.vue.d.ts +3 -3
- package/es/src/ap-form/items/text-area/index.vue.d.ts +106 -106
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +95 -95
- package/es/src/ap-form/modal-form/index.vue.d.ts +45 -16
- package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +29 -10
- package/es/src/ap-form/search-form/index.vue.d.ts +15 -15
- package/es/src/ap-table/constants.d.ts +326 -326
- package/es/src/ap-tag/ap-tag-group.vue.mjs +73 -78
- package/es/src/ap-tag/ap-tag.vue.d.ts +1 -0
- package/es/src/ap-tag/ap-tag.vue.mjs +45 -30
- package/es/src/ap-tag/interface.d.ts +6 -0
- package/es/src/ap-tag/utils.d.ts +1 -0
- package/es/src/ap-tag/utils.mjs +12 -0
- package/es/src/ap-upload/components/MultipleFile.vue.d.ts +2 -2
- package/es/src/business/ap-batch-action-group/index.d.ts +30 -8
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +8 -8
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +8 -8
- package/es/src/business/batch-input-group/index.vue.d.ts +2 -2
- package/es/src/business/batch-input-group/popover-input/index.vue.d.ts +54 -54
- package/es/src/config-provider/config-provider-props.d.ts +4 -5
- package/es/src/config-provider/config-provider.d.ts +8 -9
- package/es/src/config-provider/hooks/use-global-config.d.ts +4 -5
- package/es/src/config-provider/index.d.ts +13 -14
- package/es/src/utils/config-provider-preset.d.ts +5 -6
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/es/src/work-order-modal/work-order-modal.vue.d.ts +8 -8
- package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +31 -2
- package/lib/src/ap-button/ap-action-button.vue.js +1 -1
- package/lib/src/ap-button/ap-button.vue.js +1 -1
- package/lib/src/ap-button/ap-confirm-button.vue.js +1 -1
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-field/number/index.vue.d.ts +29 -29
- package/lib/src/ap-field/rate/index.vue.d.ts +4 -4
- package/lib/src/ap-field/segmented/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +97 -97
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/slider/index.vue.d.ts +8 -8
- package/lib/src/ap-field/text-area/index.vue.d.ts +54 -54
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.d.ts +93 -93
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +13 -13
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +15 -15
- package/lib/src/ap-form/items/number/index.vue.d.ts +31 -31
- package/lib/src/ap-form/items/select/index.vue.d.ts +99 -99
- package/lib/src/ap-form/items/text/index.vue.d.ts +3 -3
- package/lib/src/ap-form/items/text/password.vue.d.ts +3 -3
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +106 -106
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +95 -95
- package/lib/src/ap-form/modal-form/index.vue.d.ts +45 -16
- package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +29 -10
- package/lib/src/ap-form/search-form/index.vue.d.ts +15 -15
- package/lib/src/ap-table/constants.d.ts +326 -326
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/ap-tag/ap-tag.vue.d.ts +1 -0
- package/lib/src/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/ap-tag/interface.d.ts +6 -0
- package/lib/src/ap-tag/utils.d.ts +1 -0
- package/lib/src/ap-tag/utils.js +1 -0
- package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +2 -2
- package/lib/src/business/ap-batch-action-group/index.d.ts +30 -8
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +8 -8
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +8 -8
- package/lib/src/business/batch-input-group/index.vue.d.ts +2 -2
- package/lib/src/business/batch-input-group/popover-input/index.vue.d.ts +54 -54
- package/lib/src/config-provider/config-provider-props.d.ts +4 -5
- package/lib/src/config-provider/config-provider.d.ts +8 -9
- package/lib/src/config-provider/hooks/use-global-config.d.ts +4 -5
- package/lib/src/config-provider/index.d.ts +13 -14
- package/lib/src/utils/config-provider-preset.d.ts +5 -6
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/lib/src/work-order-modal/work-order-modal.vue.d.ts +8 -8
- package/package.json +3 -3
- package/theme/antdv-override.css +2 -6
- package/theme/antdv-override.less +2 -6
- package/theme/ap-label/ap-label.css +1 -0
- package/theme/ap-label/ap-label.less +1 -0
- package/theme/ap-tag/ap-tag.css +3 -1
- package/theme/ap-tag/ap-tag.less +3 -1
- package/theme/index.css +6 -7
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ApActionItemPopconfirmProps, ApActionItemSlots } from '../interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, HTMLAttributes, CSSProperties, ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { ActionColor } from '..';
|
|
4
|
-
import { LegacyButtonType, ButtonHTMLType } from '@aplus-frontend/antdv/es/button/buttonTypes';
|
|
5
|
-
import { ButtonType, ButtonShape
|
|
4
|
+
import { LegacyButtonType, ButtonHTMLType, ButtonIconPosition, ButtonVariantType } from '@aplus-frontend/antdv/es/button/buttonTypes';
|
|
5
|
+
import { ButtonType, ButtonShape } from '@aplus-frontend/antdv/es/button';
|
|
6
|
+
import { ButtonSize } from '@aplus-frontend/antdv/es/config-provider';
|
|
6
7
|
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
7
8
|
import { MouseEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
|
|
8
9
|
import { TriggerType } from '@aplus-frontend/antdv/es/tooltip/abstractTooltipProps';
|
|
@@ -104,6 +105,13 @@ declare const __VLS_component: DefineComponent<ApActionItemPopconfirmProps, {},
|
|
|
104
105
|
onMousedown: {
|
|
105
106
|
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
106
107
|
};
|
|
108
|
+
autoInsertSpace: BooleanConstructor;
|
|
109
|
+
iconPosition: {
|
|
110
|
+
type: PropType<ButtonIconPosition>;
|
|
111
|
+
default: string;
|
|
112
|
+
};
|
|
113
|
+
color: PropType<"default" | "blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue" | "primary" | "danger">;
|
|
114
|
+
variant: PropType<ButtonVariantType>;
|
|
107
115
|
}>> & HTMLAttributes>;
|
|
108
116
|
default: Partial< ExtractPropTypes<{
|
|
109
117
|
prefixCls: StringConstructor;
|
|
@@ -152,6 +160,13 @@ declare const __VLS_component: DefineComponent<ApActionItemPopconfirmProps, {},
|
|
|
152
160
|
onMousedown: {
|
|
153
161
|
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
154
162
|
};
|
|
163
|
+
autoInsertSpace: BooleanConstructor;
|
|
164
|
+
iconPosition: {
|
|
165
|
+
type: PropType<ButtonIconPosition>;
|
|
166
|
+
default: string;
|
|
167
|
+
};
|
|
168
|
+
color: PropType<"default" | "blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue" | "primary" | "danger">;
|
|
169
|
+
variant: PropType<ButtonVariantType>;
|
|
155
170
|
}>> & HTMLAttributes;
|
|
156
171
|
};
|
|
157
172
|
cancelButtonProps: {
|
|
@@ -202,6 +217,13 @@ declare const __VLS_component: DefineComponent<ApActionItemPopconfirmProps, {},
|
|
|
202
217
|
onMousedown: {
|
|
203
218
|
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
204
219
|
};
|
|
220
|
+
autoInsertSpace: BooleanConstructor;
|
|
221
|
+
iconPosition: {
|
|
222
|
+
type: PropType<ButtonIconPosition>;
|
|
223
|
+
default: string;
|
|
224
|
+
};
|
|
225
|
+
color: PropType<"default" | "blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue" | "primary" | "danger">;
|
|
226
|
+
variant: PropType<ButtonVariantType>;
|
|
205
227
|
}>> & HTMLAttributes>;
|
|
206
228
|
default: Partial< ExtractPropTypes<{
|
|
207
229
|
prefixCls: StringConstructor;
|
|
@@ -250,6 +272,13 @@ declare const __VLS_component: DefineComponent<ApActionItemPopconfirmProps, {},
|
|
|
250
272
|
onMousedown: {
|
|
251
273
|
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
252
274
|
};
|
|
275
|
+
autoInsertSpace: BooleanConstructor;
|
|
276
|
+
iconPosition: {
|
|
277
|
+
type: PropType<ButtonIconPosition>;
|
|
278
|
+
default: string;
|
|
279
|
+
};
|
|
280
|
+
color: PropType<"default" | "blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue" | "primary" | "danger">;
|
|
281
|
+
variant: PropType<ButtonVariantType>;
|
|
253
282
|
}>> & HTMLAttributes;
|
|
254
283
|
};
|
|
255
284
|
showCancel: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as i, useSlots as p, createBlock as c, openBlock as d, normalizeProps as t, guardReactiveProps as n, createSlots as u, renderList as m, withCtx as f, renderSlot as y } from "vue";
|
|
2
2
|
import "./ap-button.vue2.mjs";
|
|
3
3
|
import B from "./ap-button.vue.mjs";
|
|
4
|
-
const C = /* @__PURE__ */
|
|
4
|
+
const C = /* @__PURE__ */ i({
|
|
5
5
|
__name: "ap-action-button",
|
|
6
6
|
props: {
|
|
7
7
|
prefixCls: {},
|
|
@@ -18,22 +18,26 @@ const C = /* @__PURE__ */ p({
|
|
|
18
18
|
target: {},
|
|
19
19
|
title: {},
|
|
20
20
|
onMousedown: {},
|
|
21
|
+
autoInsertSpace: { type: Boolean },
|
|
22
|
+
iconPosition: {},
|
|
23
|
+
color: {},
|
|
24
|
+
variant: {},
|
|
21
25
|
type: { default: "borderLink" },
|
|
22
26
|
borderLinkColor: {},
|
|
23
27
|
minWidth: { type: [Boolean, Number, String], default: !0 },
|
|
24
28
|
lazy: { type: [Boolean, Number], default: !0 },
|
|
25
29
|
onClick: {}
|
|
26
30
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const a =
|
|
29
|
-
return (e, b) => (
|
|
31
|
+
setup(r) {
|
|
32
|
+
const a = p(), l = r;
|
|
33
|
+
return (e, b) => (d(), c(B, t(n({
|
|
30
34
|
...e.$attrs,
|
|
31
35
|
...l
|
|
32
|
-
})),
|
|
36
|
+
})), u({ _: 2 }, [
|
|
33
37
|
m(a, (_, o) => ({
|
|
34
38
|
name: o,
|
|
35
39
|
fn: f((s) => [
|
|
36
|
-
y(e.$slots, o, t(
|
|
40
|
+
y(e.$slots, o, t(n(s || {})))
|
|
37
41
|
])
|
|
38
42
|
}))
|
|
39
43
|
]), 1040));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as W, useSlots as z, ref as L, computed as t, createBlock as w, openBlock as M, unref as
|
|
1
|
+
import { defineComponent as W, useSlots as z, ref as L, computed as t, createBlock as w, openBlock as M, unref as a, mergeProps as P, createSlots as T, renderList as _, withCtx as S, renderSlot as $, normalizeProps as x, guardReactiveProps as N } from "vue";
|
|
2
2
|
import { Button as A } from "@aplus-frontend/antdv";
|
|
3
3
|
import { wait as D } from "@aplus-frontend/utils";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
5
5
|
import { omit as F } from "lodash-unified";
|
|
6
6
|
import { transferOpacityColor as O, isAsynchronous as j } from "./utils/index.mjs";
|
|
7
7
|
import { useNamespace as G } from "../config-provider/hooks/use-namespace.mjs";
|
|
8
|
-
import { useGlobalConfig as
|
|
9
|
-
const
|
|
8
|
+
import { useGlobalConfig as I } from "../config-provider/hooks/use-global-config.mjs";
|
|
9
|
+
const R = 72, q = 300, Y = /* @__PURE__ */ W({
|
|
10
10
|
__name: "ap-button",
|
|
11
11
|
props: {
|
|
12
12
|
prefixCls: {},
|
|
@@ -23,6 +23,10 @@ const q = 72, E = 300, Y = /* @__PURE__ */ W({
|
|
|
23
23
|
target: {},
|
|
24
24
|
title: {},
|
|
25
25
|
onMousedown: {},
|
|
26
|
+
autoInsertSpace: { type: Boolean },
|
|
27
|
+
iconPosition: {},
|
|
28
|
+
color: {},
|
|
29
|
+
variant: {},
|
|
26
30
|
type: { default: "default" },
|
|
27
31
|
borderLinkColor: {},
|
|
28
32
|
minWidth: { type: [Boolean, Number, String], default: !1 },
|
|
@@ -30,18 +34,18 @@ const q = 72, E = 300, Y = /* @__PURE__ */ W({
|
|
|
30
34
|
onClick: {}
|
|
31
35
|
},
|
|
32
36
|
setup(m) {
|
|
33
|
-
const y = z(), e = m,
|
|
37
|
+
const y = z(), e = m, l = {
|
|
34
38
|
aplus: "#0070FF",
|
|
35
39
|
admin: "#34b77c"
|
|
36
|
-
}, { b: i } = G("ap-action-button"), b =
|
|
37
|
-
() => e.borderLinkColor ||
|
|
40
|
+
}, { b: i } = G("ap-action-button"), b = I("uiMode"), n = L(!1), v = t(
|
|
41
|
+
() => e.borderLinkColor || l[b.value] || l.aplus
|
|
38
42
|
), s = t(
|
|
39
43
|
() => e.type === "borderLink" && !e.disabled ? v.value : void 0
|
|
40
44
|
), u = t(
|
|
41
45
|
() => O(s.value)
|
|
42
|
-
), h = t(() => e.minWidth === !0 ? `${
|
|
46
|
+
), h = t(() => e.minWidth === !0 ? `${R}px` : typeof e.minWidth == "number" ? `${e.minWidth}px` : typeof e.minWidth == "string" ? e.minWidth : void 0), g = t(
|
|
43
47
|
() => (e.type === "borderLink" ? "default" : e.type) || "default"
|
|
44
|
-
),
|
|
48
|
+
), c = t(() => e.loading ?? n.value ?? !1), d = t(() => e.lazy === !0 ? q : typeof e.lazy == "number" && e.lazy >= 0 ? e.lazy : 0);
|
|
45
49
|
function k() {
|
|
46
50
|
const o = F(e, [
|
|
47
51
|
"type",
|
|
@@ -57,21 +61,21 @@ const q = 72, E = 300, Y = /* @__PURE__ */ W({
|
|
|
57
61
|
} : {};
|
|
58
62
|
}
|
|
59
63
|
async function C() {
|
|
60
|
-
if (
|
|
61
|
-
const o = j(e.onClick),
|
|
64
|
+
if (c.value) return;
|
|
65
|
+
const o = j(e.onClick), p = Date.now();
|
|
62
66
|
try {
|
|
63
67
|
o && (n.value = !0, await o);
|
|
64
68
|
} finally {
|
|
65
69
|
if (o) {
|
|
66
|
-
const r = Date.now() -
|
|
67
|
-
r <
|
|
70
|
+
const r = Date.now() - p;
|
|
71
|
+
r < d.value && await D(d.value - r), n.value = !1;
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
74
|
}
|
|
71
|
-
return (o,
|
|
75
|
+
return (o, p) => (M(), w(a(A), P({
|
|
72
76
|
class: {
|
|
73
|
-
[
|
|
74
|
-
[`${
|
|
77
|
+
[a(i)()]: !0,
|
|
78
|
+
[`${a(i)()}-border-link`]: u.value
|
|
75
79
|
}
|
|
76
80
|
}, {
|
|
77
81
|
...o.$attrs,
|
|
@@ -82,12 +86,12 @@ const q = 72, E = 300, Y = /* @__PURE__ */ W({
|
|
|
82
86
|
minWidth: h.value,
|
|
83
87
|
"--button-border-color": u.value
|
|
84
88
|
},
|
|
85
|
-
loading:
|
|
86
|
-
}),
|
|
87
|
-
|
|
89
|
+
loading: c.value
|
|
90
|
+
}), T({ _: 2 }, [
|
|
91
|
+
_(y, (r, f) => ({
|
|
88
92
|
name: f,
|
|
89
|
-
fn:
|
|
90
|
-
|
|
93
|
+
fn: S((B) => [
|
|
94
|
+
$(o.$slots, f, x(N(B || {})))
|
|
91
95
|
])
|
|
92
96
|
}))
|
|
93
97
|
]), 1040, ["class", "style", "loading"]));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as f, useSlots as d, createBlock as u, openBlock as k, mergeProps as y, unref as P, createSlots as B, renderList as C, withCtx as _, renderSlot as g, normalizeProps as b, guardReactiveProps as h } from "vue";
|
|
2
|
-
import { confirmHandle as
|
|
2
|
+
import { confirmHandle as S } from "./utils/index.mjs";
|
|
3
3
|
import { omit as l } from "lodash-unified";
|
|
4
4
|
import "./ap-button.vue2.mjs";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import O from "./ap-button.vue.mjs";
|
|
6
|
+
const L = /* @__PURE__ */ f({
|
|
7
7
|
__name: "ap-confirm-button",
|
|
8
8
|
props: {
|
|
9
9
|
prefixCls: {},
|
|
@@ -20,6 +20,10 @@ const N = /* @__PURE__ */ f({
|
|
|
20
20
|
target: {},
|
|
21
21
|
title: {},
|
|
22
22
|
onMousedown: {},
|
|
23
|
+
autoInsertSpace: { type: Boolean },
|
|
24
|
+
iconPosition: {},
|
|
25
|
+
color: {},
|
|
26
|
+
variant: {},
|
|
23
27
|
type: {},
|
|
24
28
|
borderLinkColor: {},
|
|
25
29
|
minWidth: { type: [Boolean, Number, String] },
|
|
@@ -30,19 +34,19 @@ const N = /* @__PURE__ */ f({
|
|
|
30
34
|
},
|
|
31
35
|
setup(p) {
|
|
32
36
|
const o = p, a = d(), m = () => {
|
|
33
|
-
var t,
|
|
34
|
-
const n = ((t = o.confirmProps) == null ? void 0 : t.onOk) || o.onClick, r = ((
|
|
37
|
+
var t, c, s;
|
|
38
|
+
const n = ((t = o.confirmProps) == null ? void 0 : t.onOk) || o.onClick, r = ((c = o.confirmProps) == null ? void 0 : c.title) || o.title, i = ((s = o.confirmProps) == null ? void 0 : s.content) || o.content, e = {
|
|
35
39
|
centered: !0,
|
|
36
40
|
// 默认居中
|
|
37
41
|
onOk: n,
|
|
38
42
|
title: r,
|
|
39
|
-
content:
|
|
43
|
+
content: i,
|
|
40
44
|
...l(o.confirmProps, ["onOk", "title", "content"])
|
|
41
45
|
};
|
|
42
|
-
|
|
46
|
+
S(e);
|
|
43
47
|
};
|
|
44
|
-
return (n, r) => (k(), u(
|
|
45
|
-
C(a, (
|
|
48
|
+
return (n, r) => (k(), u(O, y(P(l)(o, ["confirmProps", "onClick"]), { onClick: m }), B({ _: 2 }, [
|
|
49
|
+
C(a, (i, e) => ({
|
|
46
50
|
name: e,
|
|
47
51
|
fn: _((t) => [
|
|
48
52
|
g(n.$slots, e, b(h(t || {})))
|
|
@@ -52,5 +56,5 @@ const N = /* @__PURE__ */ f({
|
|
|
52
56
|
}
|
|
53
57
|
});
|
|
54
58
|
export {
|
|
55
|
-
|
|
59
|
+
L as default
|
|
56
60
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as S, ref as x, useSlots as A, computed as t, unref as s, createBlock as j, openBlock as r, mergeProps as I, withCtx as M, createElementVNode as u, normalizeClass as T, createElementBlock as f, createCommentVNode as g, createVNode as U, renderSlot as V, toDisplayString as D } from "vue";
|
|
2
2
|
import { Button as E } from "@aplus-frontend/antdv";
|
|
3
|
-
import { LoadingOutlined as
|
|
3
|
+
import { LoadingOutlined as P } from "@ant-design/icons-vue";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
5
|
-
import { useOssInit as
|
|
5
|
+
import { useOssInit as G } from "./hooks/index.mjs";
|
|
6
6
|
import { getFileInfo as y } from "./utils/getFileInfo.mjs";
|
|
7
7
|
import { useStyle as R } from "./hooks/useStyle.mjs";
|
|
8
8
|
import { useLocale as W } from "../config-provider/hooks/use-locale.mjs";
|
|
@@ -13,7 +13,7 @@ const $ = {
|
|
|
13
13
|
}, q = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "icon"
|
|
16
|
-
}, H = { class: "text" }, se = /* @__PURE__ */
|
|
16
|
+
}, H = { class: "text" }, se = /* @__PURE__ */ S({
|
|
17
17
|
name: "ApDownload",
|
|
18
18
|
__name: "ap-download",
|
|
19
19
|
props: {
|
|
@@ -33,32 +33,35 @@ const $ = {
|
|
|
33
33
|
title: {},
|
|
34
34
|
onClick: {},
|
|
35
35
|
onMousedown: {},
|
|
36
|
-
|
|
36
|
+
autoInsertSpace: { type: Boolean },
|
|
37
|
+
iconPosition: {},
|
|
37
38
|
color: {},
|
|
39
|
+
variant: {},
|
|
40
|
+
text: {},
|
|
38
41
|
fileName: {},
|
|
39
42
|
needName: { type: [Boolean, Object] },
|
|
40
43
|
getOssAccess: {}
|
|
41
44
|
},
|
|
42
45
|
emits: ["downloadCallback"],
|
|
43
46
|
setup(C, { emit: b }) {
|
|
44
|
-
const h = b,
|
|
47
|
+
const h = b, a = x(!1), { lang: w } = W(), N = A(), _ = t(() => w.value === "zh-cn" ? "zh_CN" : "en_US"), v = c("uiMode"), e = C, k = c("apUpload"), d = c(
|
|
45
48
|
"downloadCenterTriggerConfig"
|
|
46
|
-
), p = t(() => e.disabled), B = t(() => e.color ? e.color :
|
|
49
|
+
), p = t(() => e.disabled), B = t(() => e.color ? e.color : v.value === "aplus" ? "#0070FF" : "#1890FF"), z = t(() => e.size), { getInnerWrapperClass: O } = R(B, z, p), F = t(() => {
|
|
47
50
|
var o;
|
|
48
|
-
return e.getOssAccess || ((o =
|
|
51
|
+
return e.getOssAccess || ((o = k.value) == null ? void 0 : o.getOssAccess);
|
|
49
52
|
}), L = async () => {
|
|
50
|
-
var o,
|
|
53
|
+
var o, n;
|
|
51
54
|
if (!e.disabled) {
|
|
52
|
-
|
|
55
|
+
a.value = !0;
|
|
53
56
|
try {
|
|
54
57
|
if ((o = d.value) != null && o.trigger) {
|
|
55
58
|
let i = y(e.needName, e.fileName).map((m) => ({
|
|
56
59
|
objectName: m.path,
|
|
57
60
|
fileName: m.fileName
|
|
58
61
|
}));
|
|
59
|
-
await ((
|
|
62
|
+
await ((n = d.value) == null ? void 0 : n.trigger(i));
|
|
60
63
|
} else {
|
|
61
|
-
const i = await (await
|
|
64
|
+
const i = await (await G(
|
|
62
65
|
F.value,
|
|
63
66
|
s(_)
|
|
64
67
|
)).downloadFile(
|
|
@@ -66,14 +69,14 @@ const $ = {
|
|
|
66
69
|
);
|
|
67
70
|
h("downloadCallback", i);
|
|
68
71
|
}
|
|
69
|
-
} catch (
|
|
70
|
-
console.error(
|
|
72
|
+
} catch (l) {
|
|
73
|
+
console.error(l);
|
|
71
74
|
} finally {
|
|
72
|
-
|
|
75
|
+
a.value = !1;
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
78
|
};
|
|
76
|
-
return (o,
|
|
79
|
+
return (o, n) => (r(), j(s(E), I(e, {
|
|
77
80
|
type: e.type,
|
|
78
81
|
size: e.size,
|
|
79
82
|
disabled: p.value,
|
|
@@ -83,8 +86,8 @@ const $ = {
|
|
|
83
86
|
u("div", {
|
|
84
87
|
class: T(s(O))
|
|
85
88
|
}, [
|
|
86
|
-
|
|
87
|
-
U(s(
|
|
89
|
+
a.value ? (r(), f("span", $, [
|
|
90
|
+
U(s(P), { spin: !0 })
|
|
88
91
|
])) : g("", !0),
|
|
89
92
|
s(N).icon ? (r(), f("span", q, [
|
|
90
93
|
V(o.$slots, "icon")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApFieldNumberProps } from '../interface';
|
|
2
2
|
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent } from 'vue';
|
|
3
|
-
import {
|
|
3
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
4
4
|
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
5
5
|
import { ValueType } from '@aplus-frontend/antdv/es/input-number/src/utils/MiniDecimal';
|
|
6
6
|
import { KeyboardEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
|
|
@@ -19,8 +19,8 @@ declare function __VLS_template(): {
|
|
|
19
19
|
refs: {
|
|
20
20
|
inputRef: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
|
|
21
21
|
size: {
|
|
22
|
-
type: PropType<
|
|
23
|
-
default:
|
|
22
|
+
type: PropType<SizeType>;
|
|
23
|
+
default: SizeType;
|
|
24
24
|
};
|
|
25
25
|
bordered: {
|
|
26
26
|
type: BooleanConstructor;
|
|
@@ -139,7 +139,7 @@ declare function __VLS_template(): {
|
|
|
139
139
|
default: (e: FocusEvent) => void;
|
|
140
140
|
};
|
|
141
141
|
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
142
|
-
size:
|
|
142
|
+
size: SizeType;
|
|
143
143
|
value: ValueType;
|
|
144
144
|
onFocus: (e: FocusEvent) => void;
|
|
145
145
|
onBlur: (e: FocusEvent) => void;
|
|
@@ -149,13 +149,13 @@ declare function __VLS_template(): {
|
|
|
149
149
|
max: ValueType;
|
|
150
150
|
min: ValueType;
|
|
151
151
|
prefixCls: string;
|
|
152
|
+
bordered: boolean;
|
|
153
|
+
defaultValue: ValueType;
|
|
154
|
+
status: "" | "error" | "warning";
|
|
155
|
+
step: ValueType;
|
|
152
156
|
autofocus: boolean;
|
|
153
157
|
readonly: boolean;
|
|
154
|
-
status: "" | "error" | "warning";
|
|
155
|
-
defaultValue: ValueType;
|
|
156
158
|
'onUpdate:value': (value: ValueType) => void;
|
|
157
|
-
step: ValueType;
|
|
158
|
-
bordered: boolean;
|
|
159
159
|
onPressEnter: KeyboardEventHandler;
|
|
160
160
|
formatter: (value: ValueType, info: {
|
|
161
161
|
userTyping: boolean;
|
|
@@ -186,8 +186,8 @@ declare function __VLS_template(): {
|
|
|
186
186
|
Defaults: {};
|
|
187
187
|
}, Readonly< ExtractPropTypes<{
|
|
188
188
|
size: {
|
|
189
|
-
type: PropType<
|
|
190
|
-
default:
|
|
189
|
+
type: PropType<SizeType>;
|
|
190
|
+
default: SizeType;
|
|
191
191
|
};
|
|
192
192
|
bordered: {
|
|
193
193
|
type: BooleanConstructor;
|
|
@@ -306,7 +306,7 @@ declare function __VLS_template(): {
|
|
|
306
306
|
default: (e: FocusEvent) => void;
|
|
307
307
|
};
|
|
308
308
|
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
|
|
309
|
-
size:
|
|
309
|
+
size: SizeType;
|
|
310
310
|
value: ValueType;
|
|
311
311
|
onFocus: (e: FocusEvent) => void;
|
|
312
312
|
onBlur: (e: FocusEvent) => void;
|
|
@@ -316,13 +316,13 @@ declare function __VLS_template(): {
|
|
|
316
316
|
max: ValueType;
|
|
317
317
|
min: ValueType;
|
|
318
318
|
prefixCls: string;
|
|
319
|
+
bordered: boolean;
|
|
320
|
+
defaultValue: ValueType;
|
|
321
|
+
status: "" | "error" | "warning";
|
|
322
|
+
step: ValueType;
|
|
319
323
|
autofocus: boolean;
|
|
320
324
|
readonly: boolean;
|
|
321
|
-
status: "" | "error" | "warning";
|
|
322
|
-
defaultValue: ValueType;
|
|
323
325
|
'onUpdate:value': (value: ValueType) => void;
|
|
324
|
-
step: ValueType;
|
|
325
|
-
bordered: boolean;
|
|
326
326
|
onPressEnter: KeyboardEventHandler;
|
|
327
327
|
formatter: (value: ValueType, info: {
|
|
328
328
|
userTyping: boolean;
|
|
@@ -361,8 +361,8 @@ declare const __VLS_component: DefineComponent<ApFieldNumberProps, {
|
|
|
361
361
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
362
362
|
inputRef: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
|
|
363
363
|
size: {
|
|
364
|
-
type: PropType<
|
|
365
|
-
default:
|
|
364
|
+
type: PropType<SizeType>;
|
|
365
|
+
default: SizeType;
|
|
366
366
|
};
|
|
367
367
|
bordered: {
|
|
368
368
|
type: BooleanConstructor;
|
|
@@ -481,7 +481,7 @@ declare const __VLS_component: DefineComponent<ApFieldNumberProps, {
|
|
|
481
481
|
default: (e: FocusEvent) => void;
|
|
482
482
|
};
|
|
483
483
|
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
484
|
-
size:
|
|
484
|
+
size: SizeType;
|
|
485
485
|
value: ValueType;
|
|
486
486
|
onFocus: (e: FocusEvent) => void;
|
|
487
487
|
onBlur: (e: FocusEvent) => void;
|
|
@@ -491,13 +491,13 @@ declare const __VLS_component: DefineComponent<ApFieldNumberProps, {
|
|
|
491
491
|
max: ValueType;
|
|
492
492
|
min: ValueType;
|
|
493
493
|
prefixCls: string;
|
|
494
|
+
bordered: boolean;
|
|
495
|
+
defaultValue: ValueType;
|
|
496
|
+
status: "" | "error" | "warning";
|
|
497
|
+
step: ValueType;
|
|
494
498
|
autofocus: boolean;
|
|
495
499
|
readonly: boolean;
|
|
496
|
-
status: "" | "error" | "warning";
|
|
497
|
-
defaultValue: ValueType;
|
|
498
500
|
'onUpdate:value': (value: ValueType) => void;
|
|
499
|
-
step: ValueType;
|
|
500
|
-
bordered: boolean;
|
|
501
501
|
onPressEnter: KeyboardEventHandler;
|
|
502
502
|
formatter: (value: ValueType, info: {
|
|
503
503
|
userTyping: boolean;
|
|
@@ -528,8 +528,8 @@ declare const __VLS_component: DefineComponent<ApFieldNumberProps, {
|
|
|
528
528
|
Defaults: {};
|
|
529
529
|
}, Readonly< ExtractPropTypes<{
|
|
530
530
|
size: {
|
|
531
|
-
type: PropType<
|
|
532
|
-
default:
|
|
531
|
+
type: PropType<SizeType>;
|
|
532
|
+
default: SizeType;
|
|
533
533
|
};
|
|
534
534
|
bordered: {
|
|
535
535
|
type: BooleanConstructor;
|
|
@@ -648,7 +648,7 @@ declare const __VLS_component: DefineComponent<ApFieldNumberProps, {
|
|
|
648
648
|
default: (e: FocusEvent) => void;
|
|
649
649
|
};
|
|
650
650
|
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
|
|
651
|
-
size:
|
|
651
|
+
size: SizeType;
|
|
652
652
|
value: ValueType;
|
|
653
653
|
onFocus: (e: FocusEvent) => void;
|
|
654
654
|
onBlur: (e: FocusEvent) => void;
|
|
@@ -658,13 +658,13 @@ declare const __VLS_component: DefineComponent<ApFieldNumberProps, {
|
|
|
658
658
|
max: ValueType;
|
|
659
659
|
min: ValueType;
|
|
660
660
|
prefixCls: string;
|
|
661
|
+
bordered: boolean;
|
|
662
|
+
defaultValue: ValueType;
|
|
663
|
+
status: "" | "error" | "warning";
|
|
664
|
+
step: ValueType;
|
|
661
665
|
autofocus: boolean;
|
|
662
666
|
readonly: boolean;
|
|
663
|
-
status: "" | "error" | "warning";
|
|
664
|
-
defaultValue: ValueType;
|
|
665
667
|
'onUpdate:value': (value: ValueType) => void;
|
|
666
|
-
step: ValueType;
|
|
667
|
-
bordered: boolean;
|
|
668
668
|
onPressEnter: KeyboardEventHandler;
|
|
669
669
|
formatter: (value: ValueType, info: {
|
|
670
670
|
userTyping: boolean;
|
|
@@ -46,8 +46,8 @@ declare function __VLS_template(): {
|
|
|
46
46
|
onKeydown: PropType<KeyboardEventHandler>;
|
|
47
47
|
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
48
48
|
disabled: boolean;
|
|
49
|
-
autofocus: boolean;
|
|
50
49
|
allowClear: boolean;
|
|
50
|
+
autofocus: boolean;
|
|
51
51
|
allowHalf: boolean;
|
|
52
52
|
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
53
53
|
P: {};
|
|
@@ -89,8 +89,8 @@ declare function __VLS_template(): {
|
|
|
89
89
|
onKeydown: PropType<KeyboardEventHandler>;
|
|
90
90
|
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
|
|
91
91
|
disabled: boolean;
|
|
92
|
-
autofocus: boolean;
|
|
93
92
|
allowClear: boolean;
|
|
93
|
+
autofocus: boolean;
|
|
94
94
|
allowHalf: boolean;
|
|
95
95
|
}> | null;
|
|
96
96
|
};
|
|
@@ -146,8 +146,8 @@ declare const __VLS_component: DefineComponent<ApFieldRateProps, {
|
|
|
146
146
|
onKeydown: PropType<KeyboardEventHandler>;
|
|
147
147
|
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
148
148
|
disabled: boolean;
|
|
149
|
-
autofocus: boolean;
|
|
150
149
|
allowClear: boolean;
|
|
150
|
+
autofocus: boolean;
|
|
151
151
|
allowHalf: boolean;
|
|
152
152
|
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
153
153
|
P: {};
|
|
@@ -189,8 +189,8 @@ declare const __VLS_component: DefineComponent<ApFieldRateProps, {
|
|
|
189
189
|
onKeydown: PropType<KeyboardEventHandler>;
|
|
190
190
|
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
|
|
191
191
|
disabled: boolean;
|
|
192
|
-
autofocus: boolean;
|
|
193
192
|
allowClear: boolean;
|
|
193
|
+
autofocus: boolean;
|
|
194
194
|
allowHalf: boolean;
|
|
195
195
|
}> | null;
|
|
196
196
|
}, any>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as C, ref as S, useSlots as h, onMounted as U, computed as V, unref as l, createVNode as u, Fragment as a, createBlock as d, createElementBlock as _, openBlock as r, resolveDynamicComponent as N, mergeProps as q, withCtx as z, renderSlot as F, normalizeProps as P, guardReactiveProps as T } from "vue";
|
|
2
2
|
import { Spin as O, Segmented as R } from "@aplus-frontend/antdv";
|
|
3
3
|
import { isFunction as c, isUndefined as w, isString as A, isNumber as D, omit as E } from "lodash-unified";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
5
|
import M from "../hooks/use-options.mjs";
|
|
6
6
|
import { useControllableValue as $ } from "../../hooks/useControllableValue.mjs";
|
|
7
|
-
const L = /* @__PURE__ */
|
|
7
|
+
const L = /* @__PURE__ */ C({
|
|
8
8
|
name: "ApFieldSegmented",
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
@@ -28,6 +28,11 @@ const L = /* @__PURE__ */ S({
|
|
|
28
28
|
motionName: {},
|
|
29
29
|
onChange: {},
|
|
30
30
|
"onUpdate:value": {},
|
|
31
|
+
vertical: {
|
|
32
|
+
type: Boolean
|
|
33
|
+
},
|
|
34
|
+
shape: {},
|
|
35
|
+
name: {},
|
|
31
36
|
emptyText: {
|
|
32
37
|
default: "--"
|
|
33
38
|
},
|
|
@@ -44,31 +49,31 @@ const L = /* @__PURE__ */ S({
|
|
|
44
49
|
} = M(o), k = y, {
|
|
45
50
|
value: p,
|
|
46
51
|
updateValue: b
|
|
47
|
-
} = $(o, k), i =
|
|
48
|
-
|
|
52
|
+
} = $(o, k), i = S(!1), x = h();
|
|
53
|
+
U(() => {
|
|
49
54
|
c(o.request) && (i.value = !0, o.request().then((e) => g(e)).finally(() => {
|
|
50
55
|
i.value = !1;
|
|
51
56
|
}));
|
|
52
57
|
});
|
|
53
|
-
const
|
|
58
|
+
const B = V(() => {
|
|
54
59
|
var f;
|
|
55
60
|
const e = l(p);
|
|
56
61
|
if (w(e))
|
|
57
|
-
return
|
|
58
|
-
const t = (f = l(m)) == null ? void 0 : f.find((
|
|
62
|
+
return u(a, null, [o.emptyText]);
|
|
63
|
+
const t = (f = l(m)) == null ? void 0 : f.find((s) => s === e || (s == null ? void 0 : s.value) === e);
|
|
59
64
|
if (A(t) || D(t))
|
|
60
|
-
return
|
|
65
|
+
return u(a, null, [t]);
|
|
61
66
|
const n = (t == null ? void 0 : t.label) || x.label;
|
|
62
|
-
return c(n) ?
|
|
67
|
+
return c(n) ? u(a, null, [n == null ? void 0 : n({
|
|
63
68
|
...t
|
|
64
|
-
})]) :
|
|
69
|
+
})]) : u(a, null, [n || o.emptyText]);
|
|
65
70
|
});
|
|
66
71
|
return (e, t) => i.value ? (r(), d(l(O), {
|
|
67
72
|
key: 0,
|
|
68
73
|
size: "small"
|
|
69
|
-
})) : (r(),
|
|
74
|
+
})) : (r(), _(a, {
|
|
70
75
|
key: 1
|
|
71
|
-
}, [e.mode === "read" ? (r(), d(N(
|
|
76
|
+
}, [e.mode === "read" ? (r(), d(N(B.value), {
|
|
72
77
|
key: 0
|
|
73
78
|
})) : (r(), d(l(R), q({
|
|
74
79
|
key: 1
|