@aplus-frontend/ui 0.1.31 → 0.1.33
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/index.mjs +77 -72
- package/es/src/ap-button/ap-action-button.vue.d.ts +43 -0
- package/es/src/ap-button/ap-action-button.vue.mjs +43 -0
- package/es/src/ap-button/ap-action-button.vue2.mjs +4 -0
- package/es/src/ap-button/ap-button.vue.mjs +52 -50
- package/es/src/ap-button/index.d.ts +2 -1
- package/es/src/ap-button/index.mjs +1 -0
- package/es/src/ap-button/interface.d.ts +1 -0
- package/es/src/ap-descriptions/ap-descriptions.vue.mjs +43 -45
- package/es/src/ap-descriptions/formatter/index.d.ts +2 -2
- package/es/src/ap-descriptions/helper.d.ts +19 -1
- package/es/src/ap-descriptions/helper.mjs +22 -12
- package/es/src/ap-descriptions/style/ap-descriptions.css +1 -5
- package/es/src/ap-download/ap-download.vue.mjs +51 -40
- package/es/src/ap-download/utils/getFileInfo.d.ts +4 -1
- package/es/src/ap-download/utils/getFileInfo.mjs +51 -26
- package/es/src/ap-form/ap-form-item.vue.d.ts +1 -1
- package/es/src/ap-form/ap-form-item.vue.mjs +68 -62
- package/es/src/ap-form/ap-form-list.vue.mjs +23 -21
- package/es/src/ap-form/ap-form.vue.d.ts +3 -1
- package/es/src/ap-form/ap-form.vue2.mjs +130 -80
- package/es/src/ap-form/interface.d.ts +51 -1
- package/es/src/ap-form/items/checkbox/index.vue.mjs +6 -5
- package/es/src/ap-form/items/date/index.vue.mjs +10 -9
- package/es/src/ap-form/items/date-range/index.vue.mjs +8 -7
- package/es/src/ap-form/items/number/index.vue.mjs +12 -11
- package/es/src/ap-form/items/radio/index.vue.mjs +5 -4
- package/es/src/ap-form/items/select/index.vue.mjs +1 -0
- package/es/src/ap-form/items/switch/index.vue.mjs +10 -9
- package/es/src/ap-form/items/text/index.vue2.mjs +1 -0
- package/es/src/ap-form/items/text/password.vue.mjs +1 -0
- package/es/src/ap-form/items/text-area/index.vue.mjs +7 -6
- package/es/src/ap-form/modal-form/index.vue.d.ts +7 -3
- package/es/src/ap-form/search-form/index.vue.d.ts +7 -3
- package/es/src/ap-form/utils/get.d.ts +1 -0
- package/es/src/ap-form/utils/get.mjs +12 -0
- package/es/src/ap-form/utils/set.d.ts +6 -0
- package/es/src/ap-form/utils/set.mjs +41 -0
- package/es/src/ap-list/index.vue.d.ts +3 -0
- package/es/src/ap-list/index.vue.mjs +51 -49
- package/es/src/ap-table/ap-table.vue.d.ts +4 -1
- package/es/src/ap-table/ap-table.vue.mjs +65 -59
- package/es/src/ap-table/constants.d.ts +121 -1
- package/es/src/ap-table/interface.d.ts +6 -1
- package/es/src/ap-table/utils.d.ts +121 -1
- package/es/src/business/ap-attachment/ApAttachment.mjs +76 -68
- package/es/src/business/ap-card/ApCard.vue.d.ts +27 -0
- package/es/src/business/ap-card/ApCard.vue.mjs +4 -0
- package/es/src/business/ap-card/ApCard.vue2.mjs +65 -0
- package/es/src/business/ap-card/index.css +10 -0
- package/es/src/business/ap-card/interface.d.ts +9 -0
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +30 -100
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +104 -64
- package/es/src/business/ap-expand-alert/interface.d.ts +24 -6
- package/es/src/business/ap-expand-alert/style.css +9 -0
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +59 -70
- package/es/src/business/ap-export-group/handleExportDownload.d.ts +1 -0
- package/es/src/business/ap-export-group/handleExportDownload.mjs +14 -0
- package/es/src/business/{title → ap-title}/style.css +4 -4
- package/es/src/business/hooks/usePageListApTable.d.ts +2 -0
- package/es/src/business/index.d.ts +105 -188
- package/es/src/business/index.mjs +28 -23
- package/es/src/check-card/group.vue.d.ts +7 -1
- package/es/src/check-card/group.vue.mjs +26 -22
- package/es/src/check-card/index.vue.d.ts +5 -2
- package/es/src/check-card/index.vue2.mjs +69 -60
- package/es/src/check-card/interface.d.ts +12 -0
- package/es/src/check-card/style/index.css +8 -5
- package/es/src/config-provider/config-provider-props.d.ts +5 -1
- package/es/src/config-provider/config-provider-props.mjs +6 -2
- package/es/src/config-provider/config-provider.d.ts +10 -1
- package/es/src/config-provider/config-provider.mjs +20 -19
- package/es/src/config-provider/constants.d.ts +9 -0
- package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/es/src/config-provider/index.d.ts +20 -1
- package/es/src/editable-table/interface.d.ts +3 -2
- package/es/src/index.mjs +215 -210
- package/es/src/locale/lang/en.mjs +4 -0
- package/es/src/locale/lang/zh-cn.mjs +4 -0
- package/es/src/theme/ap-card/ap-card.css +10 -0
- package/es/src/theme/ap-descriptions/ap-descriptions.css +1 -5
- package/es/src/theme/ap-expand-alert/ap-expand-alert.css +9 -0
- package/es/src/theme/ap-title/ap-title.css +4 -4
- package/es/src/theme/check-card/index.css +8 -5
- package/es/src/theme/css-var/index.mjs +33 -15
- package/lib/index.js +1 -1
- package/lib/src/ap-button/ap-action-button.vue.d.ts +43 -0
- package/lib/src/ap-button/ap-action-button.vue.js +1 -0
- package/lib/src/ap-button/ap-action-button.vue2.js +1 -0
- package/lib/src/ap-button/ap-button.vue.js +1 -1
- package/lib/src/ap-button/index.d.ts +2 -1
- package/lib/src/ap-button/index.js +1 -1
- package/lib/src/ap-button/interface.d.ts +1 -0
- package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/ap-descriptions/formatter/index.d.ts +2 -2
- package/lib/src/ap-descriptions/helper.d.ts +19 -1
- package/lib/src/ap-descriptions/helper.js +1 -1
- package/lib/src/ap-descriptions/style/ap-descriptions.css +1 -5
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/utils/getFileInfo.d.ts +4 -1
- package/lib/src/ap-download/utils/getFileInfo.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.d.ts +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/ap-form-list.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +3 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/interface.d.ts +51 -1
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +7 -3
- package/lib/src/ap-form/search-form/index.vue.d.ts +7 -3
- package/lib/src/ap-form/utils/get.d.ts +1 -0
- package/lib/src/ap-form/utils/get.js +1 -0
- package/lib/src/ap-form/utils/set.d.ts +6 -0
- package/lib/src/ap-form/utils/set.js +1 -0
- package/lib/src/ap-list/index.vue.d.ts +3 -0
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +4 -1
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +121 -1
- package/lib/src/ap-table/interface.d.ts +6 -1
- package/lib/src/ap-table/utils.d.ts +121 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-card/ApCard.vue.d.ts +27 -0
- package/lib/src/business/ap-card/ApCard.vue.js +1 -0
- package/lib/src/business/ap-card/ApCard.vue2.js +1 -0
- package/lib/src/business/ap-card/index.css +10 -0
- package/lib/src/business/ap-card/interface.d.ts +9 -0
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +30 -100
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-expand-alert/interface.d.ts +24 -6
- package/lib/src/business/ap-expand-alert/style.css +9 -0
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/handleExportDownload.d.ts +1 -0
- package/lib/src/business/ap-export-group/handleExportDownload.js +1 -0
- package/lib/src/business/{title → ap-title}/style.css +4 -4
- package/lib/src/business/hooks/usePageListApTable.d.ts +2 -0
- package/lib/src/business/index.d.ts +105 -188
- package/lib/src/business/index.js +1 -1
- package/lib/src/check-card/group.vue.d.ts +7 -1
- package/lib/src/check-card/group.vue.js +1 -1
- package/lib/src/check-card/index.vue.d.ts +5 -2
- package/lib/src/check-card/index.vue2.js +1 -1
- package/lib/src/check-card/interface.d.ts +12 -0
- package/lib/src/check-card/style/index.css +8 -5
- package/lib/src/config-provider/config-provider-props.d.ts +5 -1
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +10 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/constants.d.ts +9 -0
- package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/lib/src/config-provider/index.d.ts +20 -1
- package/lib/src/editable-table/interface.d.ts +3 -2
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/theme/ap-card/ap-card.css +10 -0
- package/lib/src/theme/ap-descriptions/ap-descriptions.css +1 -5
- package/lib/src/theme/ap-expand-alert/ap-expand-alert.css +9 -0
- package/lib/src/theme/ap-title/ap-title.css +4 -4
- package/lib/src/theme/check-card/index.css +8 -5
- package/lib/src/theme/css-var/index.js +1 -1
- package/package.json +1 -1
- /package/es/src/business/{title → ap-title}/ApTitle.vue.d.ts +0 -0
- /package/es/src/business/{title → ap-title}/ApTitle.vue.mjs +0 -0
- /package/es/src/business/{title → ap-title}/ApTitle.vue2.mjs +0 -0
- /package/es/src/business/{title → ap-title}/interface.d.ts +0 -0
- /package/lib/src/business/{title → ap-title}/ApTitle.vue.d.ts +0 -0
- /package/lib/src/business/{title → ap-title}/ApTitle.vue.js +0 -0
- /package/lib/src/business/{title → ap-title}/ApTitle.vue2.js +0 -0
- /package/lib/src/business/{title → ap-title}/interface.d.ts +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Skeleton as
|
|
1
|
+
import { defineComponent as I, computed as d, unref as o, createVNode as m, watch as W, watchEffect as $, openBlock as c, createElementBlock as z, normalizeStyle as j, normalizeClass as S, withModifiers as D, createBlock as f, renderSlot as M, resolveDynamicComponent as B, createCommentVNode as g, createElementVNode as O } from "vue";
|
|
2
|
+
import { Skeleton as U } from "ant-design-vue";
|
|
3
3
|
import "../config-provider/index.mjs";
|
|
4
4
|
import "../hooks/index.mjs";
|
|
5
|
-
import { isFunction as
|
|
6
|
-
import { useInjectCheckCard as
|
|
5
|
+
import { isFunction as N } from "lodash-unified";
|
|
6
|
+
import { useInjectCheckCard as q } from "./context.mjs";
|
|
7
7
|
import "./style/index.css";
|
|
8
|
-
import
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
import { useControllableValue as
|
|
11
|
-
const
|
|
8
|
+
import A from "./checked.svg.mjs";
|
|
9
|
+
import { useNamespace as G } from "../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
import { useControllableValue as H } from "../hooks/useControllableValue.mjs";
|
|
11
|
+
const J = ["src"], oe = /* @__PURE__ */ I({
|
|
12
12
|
name: "CheckCard",
|
|
13
13
|
__name: "index",
|
|
14
14
|
props: {
|
|
@@ -29,6 +29,12 @@ const H = ["src"], te = /* @__PURE__ */ F({
|
|
|
29
29
|
type: [Boolean, Function],
|
|
30
30
|
default: !1
|
|
31
31
|
},
|
|
32
|
+
indicatorSize: {
|
|
33
|
+
default: void 0
|
|
34
|
+
},
|
|
35
|
+
style: {
|
|
36
|
+
default: void 0
|
|
37
|
+
},
|
|
32
38
|
checked: {
|
|
33
39
|
type: Boolean,
|
|
34
40
|
default: void 0
|
|
@@ -40,94 +46,97 @@ const H = ["src"], te = /* @__PURE__ */ F({
|
|
|
40
46
|
value: {
|
|
41
47
|
type: [String, Number, Boolean]
|
|
42
48
|
},
|
|
43
|
-
style: {
|
|
44
|
-
default: () => ({})
|
|
45
|
-
},
|
|
46
49
|
title: {},
|
|
47
50
|
content: {}
|
|
48
51
|
},
|
|
49
52
|
emits: ["update:checked"],
|
|
50
|
-
setup(
|
|
51
|
-
emit:
|
|
53
|
+
setup(P, {
|
|
54
|
+
emit: V
|
|
52
55
|
}) {
|
|
53
|
-
const
|
|
54
|
-
b:
|
|
55
|
-
m:
|
|
56
|
+
const a = P, {
|
|
57
|
+
b: v,
|
|
58
|
+
m: s,
|
|
56
59
|
e: p,
|
|
57
60
|
em: k
|
|
58
|
-
} =
|
|
61
|
+
} = G("check-card"), _ = V, l = q(), {
|
|
59
62
|
value: r,
|
|
60
63
|
updateValue: h
|
|
61
|
-
} =
|
|
64
|
+
} = H(a, _, {
|
|
62
65
|
valuePropName: "checked",
|
|
63
66
|
defaultValuePropName: "defaultChecked"
|
|
64
|
-
}),
|
|
67
|
+
}), n = d(() => {
|
|
65
68
|
const e = {
|
|
66
|
-
...
|
|
67
|
-
}, t = l
|
|
68
|
-
return t && (e.disabled = e.disabled || t.disabled, e.bordered = e.bordered || t.bordered, e.loading = e.loading || t.loading, e.size = e.size || t.size, e.stopPropagation = e.stopPropagation || t.stopPropagation), e;
|
|
69
|
-
}), w =
|
|
70
|
-
const e =
|
|
71
|
-
return [
|
|
72
|
-
}),
|
|
73
|
-
const e = o
|
|
69
|
+
...a
|
|
70
|
+
}, t = o(l);
|
|
71
|
+
return t && (e.disabled = e.disabled || t.disabled, e.bordered = e.bordered || t.bordered, e.loading = e.loading || t.loading, e.size = e.size || t.size, e.indicatorSize = e.indicatorSize || t.indicatorSize, e.stopPropagation = e.stopPropagation || t.stopPropagation, e.style = e.style ? e.style : t.style), e;
|
|
72
|
+
}), w = d(() => {
|
|
73
|
+
const e = o(n);
|
|
74
|
+
return [v(), ...e.disabled ? [] : [v(), o(r) ? s("checked") : null], s(e.size), e.bordered ? s("bordered") : null, e.disabled ? s("disabled") : null];
|
|
75
|
+
}), T = d(() => {
|
|
76
|
+
const e = o(n);
|
|
77
|
+
return {
|
|
78
|
+
...e.style || {},
|
|
79
|
+
"--check-card-indicator-size": `${e.indicatorSize || 16}px`
|
|
80
|
+
};
|
|
81
|
+
}), y = d(() => {
|
|
82
|
+
const e = a.title;
|
|
74
83
|
if (!e)
|
|
75
84
|
return;
|
|
76
|
-
const t =
|
|
85
|
+
const t = N(e) ? e(o(r)) : m("span", null, [e]);
|
|
77
86
|
return m("div", {
|
|
78
|
-
class: [p("title"),
|
|
87
|
+
class: [p("title"), n.value.disabled ? k("title", "disabled") : null]
|
|
79
88
|
}, [t]);
|
|
80
|
-
}),
|
|
81
|
-
if (!
|
|
89
|
+
}), b = d(() => {
|
|
90
|
+
if (!a.content)
|
|
82
91
|
return;
|
|
83
|
-
const e =
|
|
92
|
+
const e = N(a.content) ? a.content(o(r)) : a.content;
|
|
84
93
|
return m("div", {
|
|
85
|
-
class: [p("content"),
|
|
94
|
+
class: [p("content"), n.value.disabled ? k("content", "disabled") : null]
|
|
86
95
|
}, [e]);
|
|
87
96
|
});
|
|
88
|
-
function
|
|
89
|
-
const t =
|
|
97
|
+
function E(e) {
|
|
98
|
+
const t = o(n).stopPropagation;
|
|
90
99
|
return t ? t === !0 ? e.target !== e.currentTarget : t(e) : !1;
|
|
91
100
|
}
|
|
92
|
-
function
|
|
93
|
-
var t,
|
|
94
|
-
|
|
101
|
+
function F(e) {
|
|
102
|
+
var t, i;
|
|
103
|
+
E(e) || n.value.loading || n.value.disabled || (l.value ? (i = (t = l.value) == null ? void 0 : t.toggleOption) == null || i.call(t, a.value) : h(!o(r)));
|
|
95
104
|
}
|
|
96
|
-
return
|
|
105
|
+
return W(() => l.value, (e) => {
|
|
97
106
|
if (!e)
|
|
98
107
|
return;
|
|
99
|
-
const t = e.multiple ? (e.value || []).includes(
|
|
108
|
+
const t = e.multiple ? (e.value || []).includes(a.value) : e.value === a.value;
|
|
100
109
|
h(t);
|
|
101
110
|
}, {
|
|
102
111
|
immediate: !0
|
|
103
|
-
}),
|
|
104
|
-
var t,
|
|
105
|
-
(
|
|
106
|
-
var
|
|
107
|
-
return (C = (
|
|
112
|
+
}), $((e) => {
|
|
113
|
+
var t, i;
|
|
114
|
+
(i = (t = l.value) == null ? void 0 : t.registerValue) == null || i.call(t, a.value), e(() => {
|
|
115
|
+
var u, C;
|
|
116
|
+
return (C = (u = l.value) == null ? void 0 : u.cancelValue) == null ? void 0 : C.call(u, a.value);
|
|
108
117
|
});
|
|
109
|
-
}), (e, t) => (
|
|
110
|
-
style:
|
|
111
|
-
class:
|
|
112
|
-
onClick:
|
|
113
|
-
}, [
|
|
118
|
+
}), (e, t) => (c(), z("div", {
|
|
119
|
+
style: j(T.value),
|
|
120
|
+
class: S(w.value),
|
|
121
|
+
onClick: D(F, ["stop"])
|
|
122
|
+
}, [n.value.loading ? (c(), f(o(U), {
|
|
114
123
|
key: 0,
|
|
115
124
|
active: ""
|
|
116
|
-
})) :
|
|
125
|
+
})) : M(e.$slots, "default", {
|
|
117
126
|
key: 1,
|
|
118
|
-
checked:
|
|
119
|
-
}, () => [
|
|
127
|
+
checked: o(r)
|
|
128
|
+
}, () => [y.value ? (c(), f(B(y.value), {
|
|
120
129
|
key: 0
|
|
121
|
-
})) :
|
|
130
|
+
})) : g("", !0), b.value ? (c(), f(B(b.value), {
|
|
122
131
|
key: 1
|
|
123
|
-
})) :
|
|
132
|
+
})) : g("", !0)]), o(r) ? (c(), z("div", {
|
|
124
133
|
key: 2,
|
|
125
|
-
class:
|
|
126
|
-
}, [
|
|
127
|
-
src:
|
|
128
|
-
}, null, 8,
|
|
134
|
+
class: S(o(p)("checked-icon"))
|
|
135
|
+
}, [O("img", {
|
|
136
|
+
src: o(A)
|
|
137
|
+
}, null, 8, J)], 2)) : g("", !0)], 6));
|
|
129
138
|
}
|
|
130
139
|
});
|
|
131
140
|
export {
|
|
132
|
-
|
|
141
|
+
oe as default
|
|
133
142
|
};
|
|
@@ -24,6 +24,14 @@ type CheckCardCommonType = {
|
|
|
24
24
|
* 是否阻止点击事件冒泡(对于自定义内容包含输入控件时需要设置)
|
|
25
25
|
*/
|
|
26
26
|
stopPropagation?: boolean | ((event: MouseEvent) => boolean);
|
|
27
|
+
/**
|
|
28
|
+
* 选中指示器的尺寸
|
|
29
|
+
*/
|
|
30
|
+
indicatorSize?: number;
|
|
31
|
+
/**
|
|
32
|
+
* 可选卡片容器样式
|
|
33
|
+
*/
|
|
34
|
+
style?: CSSProperties;
|
|
27
35
|
};
|
|
28
36
|
export type CheckCardProps = CheckCardCommonType & {
|
|
29
37
|
/**
|
|
@@ -51,6 +59,10 @@ export type CheckCardProps = CheckCardCommonType & {
|
|
|
51
59
|
* 内容
|
|
52
60
|
*/
|
|
53
61
|
content?: string | ((checked: boolean) => VNode);
|
|
62
|
+
/**
|
|
63
|
+
* 指定选中指示器的尺寸
|
|
64
|
+
*/
|
|
65
|
+
indicatorSize?: number;
|
|
54
66
|
};
|
|
55
67
|
export type CheckCardGroupValueType = CheckCardValueType | CheckCardValueType[] | undefined;
|
|
56
68
|
export type CheckCardGroupProps = CheckCardCommonType & {
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
opacity: 0;
|
|
22
22
|
inset-block-start: -2px;
|
|
23
23
|
inset-inline-end: -2px;
|
|
24
|
-
border-inline-start: 16px solid transparent;
|
|
25
|
-
border-block-end: 16px solid transparent;
|
|
24
|
+
border-inline-start: var(--check-card-indicator-size, 16px) solid transparent;
|
|
25
|
+
border-block-end: var(--check-card-indicator-size, 16px) solid transparent;
|
|
26
26
|
border-radius: 4px;
|
|
27
27
|
}
|
|
28
28
|
.aplus-check-card--checked {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
}
|
|
34
34
|
.aplus-check-card--checked::after {
|
|
35
35
|
opacity: 1;
|
|
36
|
-
border: 16px solid var(--check-card-checked-bg, #0070ff);
|
|
37
|
-
border-inline-start: 16px solid transparent;
|
|
38
|
-
border-block-end: 16px solid transparent;
|
|
36
|
+
border: var(--check-card-indicator-size, 16px) solid var(--check-card-checked-bg, #0070ff);
|
|
37
|
+
border-inline-start: var(--check-card-indicator-size, 16px) solid transparent;
|
|
38
|
+
border-block-end: var(--check-card-indicator-size, 16px) solid transparent;
|
|
39
39
|
inset-block-start: -2px;
|
|
40
40
|
inset-inline-end: -2px;
|
|
41
41
|
transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
@@ -75,3 +75,6 @@
|
|
|
75
75
|
-moz-user-select: none;
|
|
76
76
|
user-select: none;
|
|
77
77
|
}
|
|
78
|
+
.aplus-check-card__checked-icon > img {
|
|
79
|
+
width: calc(var(--check-card-indicator-size, 16px) - 2px);
|
|
80
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import { LocaleType } from '../locale/interface';
|
|
3
|
-
import { ApiType, ScrollbarGlobalConfig, TableDefaultConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig } from './constants';
|
|
3
|
+
import { ApiType, ScrollbarGlobalConfig, TableDefaultConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig } from './constants';
|
|
4
4
|
import { default as __DTS_DEFAULT_0__ } from 'ant-design-vue/es/config-provider/renderEmpty';
|
|
5
5
|
import { TransformCellTextProps } from 'ant-design-vue/es/table/interface';
|
|
6
6
|
import { CSPConfig } from 'ant-design-vue/es/config-provider';
|
|
@@ -161,5 +161,9 @@ export declare const configProviderProps: () => {
|
|
|
161
161
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
162
162
|
default: () => {};
|
|
163
163
|
};
|
|
164
|
+
downloadCenterTriggerConfig: {
|
|
165
|
+
type: PropType<downloadCenterTriggerConfig>;
|
|
166
|
+
default: () => {};
|
|
167
|
+
};
|
|
164
168
|
};
|
|
165
169
|
export type ConfigProviderProps = Partial<ExtractPropTypes<ReturnType<typeof configProviderProps>>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { configProviderProps as e } from "ant-design-vue/es/config-provider/context";
|
|
2
|
-
const
|
|
2
|
+
const a = () => ({
|
|
3
3
|
/**
|
|
4
4
|
* @description aplus-ui的locale
|
|
5
5
|
*/
|
|
@@ -37,8 +37,12 @@ const p = () => ({
|
|
|
37
37
|
type: Object,
|
|
38
38
|
default: () => ({})
|
|
39
39
|
},
|
|
40
|
+
downloadCenterTriggerConfig: {
|
|
41
|
+
type: Object,
|
|
42
|
+
default: () => ({})
|
|
43
|
+
},
|
|
40
44
|
...e()
|
|
41
45
|
});
|
|
42
46
|
export {
|
|
43
|
-
|
|
47
|
+
a as configProviderProps
|
|
44
48
|
};
|
|
@@ -9,7 +9,7 @@ import { ValidateMessages } from 'ant-design-vue/es/form/interface';
|
|
|
9
9
|
import { RequiredMark } from 'ant-design-vue/es/form/Form';
|
|
10
10
|
import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
|
|
11
11
|
import { LocaleType } from '..';
|
|
12
|
-
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig } from './constants';
|
|
12
|
+
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig } from './constants';
|
|
13
13
|
export declare const globalConfigCached: Ref<ConfigProviderProps>;
|
|
14
14
|
export declare const ConfigProvider: DefineComponent<{
|
|
15
15
|
iconPrefixCls: StringConstructor;
|
|
@@ -160,6 +160,10 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
160
160
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
161
161
|
default: () => {};
|
|
162
162
|
};
|
|
163
|
+
downloadCenterTriggerConfig: {
|
|
164
|
+
type: PropType<downloadCenterTriggerConfig>;
|
|
165
|
+
default: () => {};
|
|
166
|
+
};
|
|
163
167
|
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
164
168
|
iconPrefixCls: StringConstructor;
|
|
165
169
|
getTargetContainer: {
|
|
@@ -309,6 +313,10 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
309
313
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
310
314
|
default: () => {};
|
|
311
315
|
};
|
|
316
|
+
downloadCenterTriggerConfig: {
|
|
317
|
+
type: PropType<downloadCenterTriggerConfig>;
|
|
318
|
+
default: () => {};
|
|
319
|
+
};
|
|
312
320
|
}>>, {
|
|
313
321
|
input: {
|
|
314
322
|
autocomplete?: string;
|
|
@@ -348,5 +356,6 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
348
356
|
apUpload: ApUploadConfig;
|
|
349
357
|
apDescriptions: ApDescriptionsConfig;
|
|
350
358
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
359
|
+
downloadCenterTriggerConfig: downloadCenterTriggerConfig;
|
|
351
360
|
}, {}>;
|
|
352
361
|
export type ConfigProviderInstance = InstanceType<typeof ConfigProvider>;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { ConfigProvider as
|
|
3
|
-
import { provideGlobalConfig as
|
|
4
|
-
import { configProviderProps as
|
|
1
|
+
import { isVNode as l, ref as d, defineComponent as f, computed as u, watch as i, createVNode as m, renderSlot as c } from "vue";
|
|
2
|
+
import { ConfigProvider as g } from "ant-design-vue";
|
|
3
|
+
import { provideGlobalConfig as p } from "./hooks/use-global-config.mjs";
|
|
4
|
+
import { configProviderProps as s } from "./config-provider-props.mjs";
|
|
5
5
|
import { tableDefaultConfig as C } from "./constants.mjs";
|
|
6
6
|
import { mergeAntdProvideConfig as v } from "../utils/config-provider-preset.mjs";
|
|
7
|
-
import { setCSSVariables as b, aplusCssVar as P, adminCssVar as
|
|
8
|
-
function
|
|
9
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
7
|
+
import { setCSSVariables as b, aplusCssVar as P, adminCssVar as w } from "../theme/css-var/index.mjs";
|
|
8
|
+
function y(e) {
|
|
9
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !l(e);
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const a = d({}), A = /* @__PURE__ */ f({
|
|
12
12
|
name: "AplusConfigProvider",
|
|
13
|
-
props:
|
|
13
|
+
props: s(),
|
|
14
14
|
setup(e, {
|
|
15
15
|
slots: r
|
|
16
16
|
}) {
|
|
17
|
-
const
|
|
17
|
+
const n = u(() => ({
|
|
18
18
|
namespace: e.namespace,
|
|
19
19
|
aplusLocale: e.aplusLocale,
|
|
20
20
|
api: e.api,
|
|
@@ -26,20 +26,21 @@ const i = d({}), L = /* @__PURE__ */ f({
|
|
|
26
26
|
uiMode: e.uiMode,
|
|
27
27
|
apUpload: e.apUpload,
|
|
28
28
|
apDescriptions: e.apDescriptions,
|
|
29
|
-
valueTypeMap: e.valueTypeMap
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
valueTypeMap: e.valueTypeMap,
|
|
30
|
+
downloadCenterTriggerConfig: e.downloadCenterTriggerConfig
|
|
31
|
+
})), t = p(n);
|
|
32
|
+
return i(() => e, (o) => {
|
|
33
|
+
a.value = v(o);
|
|
33
34
|
}, {
|
|
34
35
|
deep: !0,
|
|
35
36
|
immediate: !0
|
|
36
|
-
}), typeof window < "u" &&
|
|
37
|
-
b(o === "aplus" ? P :
|
|
37
|
+
}), typeof window < "u" && i(() => e.uiMode, (o) => {
|
|
38
|
+
b(o === "aplus" ? P : w);
|
|
38
39
|
}, {
|
|
39
40
|
immediate: !0
|
|
40
41
|
}), () => {
|
|
41
42
|
let o;
|
|
42
|
-
return m(
|
|
43
|
+
return m(g, a.value, y(o = c(r, "default", {
|
|
43
44
|
config: t == null ? void 0 : t.value
|
|
44
45
|
})) ? o : {
|
|
45
46
|
default: () => [o]
|
|
@@ -48,6 +49,6 @@ const i = d({}), L = /* @__PURE__ */ f({
|
|
|
48
49
|
}
|
|
49
50
|
});
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
A as ConfigProvider,
|
|
53
|
+
a as globalConfigCached
|
|
53
54
|
};
|
|
@@ -45,4 +45,13 @@ export type ValueTypeRenderConfig = {
|
|
|
45
45
|
export type ApDescriptionsConfig = {
|
|
46
46
|
downloadFile?: (url: string, name: string) => void;
|
|
47
47
|
};
|
|
48
|
+
export type downloadCenterTriggerConfigParams = {
|
|
49
|
+
fileName?: string;
|
|
50
|
+
fileSource?: string;
|
|
51
|
+
objectName?: string;
|
|
52
|
+
[propName: string]: unknown;
|
|
53
|
+
};
|
|
54
|
+
export type downloadCenterTriggerConfig = {
|
|
55
|
+
trigger: (fileList: downloadCenterTriggerConfigParams[]) => Promise<any>;
|
|
56
|
+
};
|
|
48
57
|
export {};
|
|
@@ -10,7 +10,7 @@ import { ValidateMessages } from 'ant-design-vue/es/form/interface';
|
|
|
10
10
|
import { RequiredMark } from 'ant-design-vue/es/form/Form';
|
|
11
11
|
import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
|
|
12
12
|
import { LocaleType } from '../..';
|
|
13
|
-
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig } from '..';
|
|
13
|
+
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig } from '..';
|
|
14
14
|
export declare const keysOf: <T extends Record<string, any>>(arr: T) => Array<keyof T>;
|
|
15
15
|
export declare function useGlobalConfig<K extends keyof ConfigProviderContext, D extends ConfigProviderContext[K]>(key: K, defaultValue?: D): Ref<Exclude<ConfigProviderContext[K], undefined> | D>;
|
|
16
16
|
export declare function useGlobalConfig(): Ref<ConfigProviderContext>;
|
|
@@ -163,4 +163,8 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
|
|
|
163
163
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
164
164
|
default: () => {};
|
|
165
165
|
};
|
|
166
|
+
downloadCenterTriggerConfig: {
|
|
167
|
+
type: PropType<downloadCenterTriggerConfig>;
|
|
168
|
+
default: () => {};
|
|
169
|
+
};
|
|
166
170
|
}>>>> | undefined;
|
|
@@ -8,7 +8,7 @@ import { ValidateMessages } from 'ant-design-vue/es/form/interface';
|
|
|
8
8
|
import { RequiredMark } from 'ant-design-vue/es/form/Form';
|
|
9
9
|
import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
|
|
10
10
|
import { LocaleType } from '..';
|
|
11
|
-
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig } from './constants';
|
|
11
|
+
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig } from './constants';
|
|
12
12
|
export * from './config-provider-props';
|
|
13
13
|
export * from './constants';
|
|
14
14
|
export * from './hooks/use-global-config';
|
|
@@ -165,6 +165,10 @@ export declare const APConfigProvider: {
|
|
|
165
165
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
166
166
|
default: () => {};
|
|
167
167
|
};
|
|
168
|
+
downloadCenterTriggerConfig: {
|
|
169
|
+
type: PropType<downloadCenterTriggerConfig>;
|
|
170
|
+
default: () => {};
|
|
171
|
+
};
|
|
168
172
|
}>>, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
169
173
|
iconPrefixCls: StringConstructor;
|
|
170
174
|
getTargetContainer: {
|
|
@@ -314,6 +318,10 @@ export declare const APConfigProvider: {
|
|
|
314
318
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
315
319
|
default: () => {};
|
|
316
320
|
};
|
|
321
|
+
downloadCenterTriggerConfig: {
|
|
322
|
+
type: PropType<downloadCenterTriggerConfig>;
|
|
323
|
+
default: () => {};
|
|
324
|
+
};
|
|
317
325
|
}>>, {
|
|
318
326
|
input: {
|
|
319
327
|
autocomplete?: string;
|
|
@@ -353,6 +361,7 @@ export declare const APConfigProvider: {
|
|
|
353
361
|
apUpload: ApUploadConfig;
|
|
354
362
|
apDescriptions: ApDescriptionsConfig;
|
|
355
363
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
364
|
+
downloadCenterTriggerConfig: downloadCenterTriggerConfig;
|
|
356
365
|
}, true, {}, {}, {
|
|
357
366
|
P: {};
|
|
358
367
|
B: {};
|
|
@@ -509,6 +518,10 @@ export declare const APConfigProvider: {
|
|
|
509
518
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
510
519
|
default: () => {};
|
|
511
520
|
};
|
|
521
|
+
downloadCenterTriggerConfig: {
|
|
522
|
+
type: PropType<downloadCenterTriggerConfig>;
|
|
523
|
+
default: () => {};
|
|
524
|
+
};
|
|
512
525
|
}>>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
513
526
|
input: {
|
|
514
527
|
autocomplete?: string;
|
|
@@ -548,6 +561,7 @@ export declare const APConfigProvider: {
|
|
|
548
561
|
apUpload: ApUploadConfig;
|
|
549
562
|
apDescriptions: ApDescriptionsConfig;
|
|
550
563
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
564
|
+
downloadCenterTriggerConfig: downloadCenterTriggerConfig;
|
|
551
565
|
}>;
|
|
552
566
|
__isFragment?: never;
|
|
553
567
|
__isTeleport?: never;
|
|
@@ -701,6 +715,10 @@ export declare const APConfigProvider: {
|
|
|
701
715
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
702
716
|
default: () => {};
|
|
703
717
|
};
|
|
718
|
+
downloadCenterTriggerConfig: {
|
|
719
|
+
type: PropType<downloadCenterTriggerConfig>;
|
|
720
|
+
default: () => {};
|
|
721
|
+
};
|
|
704
722
|
}>>, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
705
723
|
input: {
|
|
706
724
|
autocomplete?: string;
|
|
@@ -740,6 +758,7 @@ export declare const APConfigProvider: {
|
|
|
740
758
|
apUpload: ApUploadConfig;
|
|
741
759
|
apDescriptions: ApDescriptionsConfig;
|
|
742
760
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
761
|
+
downloadCenterTriggerConfig: downloadCenterTriggerConfig;
|
|
743
762
|
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
|
|
744
763
|
$props: {
|
|
745
764
|
onClick?: () => void;
|
|
@@ -150,12 +150,13 @@ export type EditableTableExpose<ModelType = any, RecordType = any> = {
|
|
|
150
150
|
*/
|
|
151
151
|
getRowData: (index: number) => RecordType | undefined;
|
|
152
152
|
/**
|
|
153
|
-
*
|
|
153
|
+
* 设置表格行数据
|
|
154
154
|
* @param index
|
|
155
155
|
* @param data
|
|
156
|
+
* @param merge 是否进行数据的浅层合并(默认为true)
|
|
156
157
|
* @returns
|
|
157
158
|
*/
|
|
158
|
-
setRowData: (index: number, data: Partial<RecordType
|
|
159
|
+
setRowData: (index: number, data: Partial<RecordType>, merge?: boolean) => void;
|
|
159
160
|
/**
|
|
160
161
|
* 滚动到表格的某行
|
|
161
162
|
* @param index
|