@aplus-frontend/ui 7.0.0 → 7.1.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/index.mjs +108 -106
- package/es/src/ag-grid/style/custom-header.mjs +1 -1
- package/es/src/ag-grid/style/index.mjs +0 -1
- package/es/src/ap-action/item-dropdown/index.vue.mjs +12 -12
- package/es/src/ap-descriptions/ap-descriptions.vue.mjs +39 -39
- package/es/src/ap-descriptions/style/index.mjs +16 -43
- package/es/src/ap-download/ap-download.vue.mjs +43 -43
- package/es/src/ap-download/hooks/useStyle.d.ts +1 -1
- package/es/src/ap-download/hooks/useStyle.mjs +17 -14
- package/es/src/ap-download/style/index.mjs +6 -13
- package/es/src/ap-form/modal-form/index.vue.mjs +59 -60
- package/es/src/ap-form/style/item.mjs +5 -4
- package/es/src/ap-form/style/modal-form.mjs +11 -12
- package/es/src/ap-form/style/search-form-sorter.mjs +31 -27
- package/es/src/ap-form/style/token.d.ts +8 -0
- package/es/src/ap-grid/style/index.mjs +3 -3
- package/es/src/ap-pro-card/style/statistic.mjs +3 -3
- package/es/src/ap-pro-card/style/token.mjs +1 -1
- package/es/src/ap-table/style/index.mjs +2 -2
- package/es/src/ap-table/style/setting.mjs +2 -2
- package/es/src/ap-tag/ap-tag-group.vue.mjs +61 -61
- package/es/src/ap-tag/ap-tag.vue.mjs +19 -20
- package/es/src/ap-tag/style/group.mjs +2 -8
- package/es/src/ap-tag/style/index.mjs +14 -23
- package/es/src/ap-upload/apUpload.vue.mjs +42 -41
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +60 -61
- package/es/src/ap-upload/components/Picture.vue2.mjs +90 -91
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +72 -72
- package/es/src/ap-upload/style/multiple-file.mjs +13 -40
- package/es/src/ap-upload/style/picture.mjs +12 -30
- package/es/src/ap-upload/style/single-file.mjs +5 -16
- package/es/src/business/ag-grid-modal/interface.d.ts +1 -1
- package/es/src/business/ag-grid-modal/wrapper/index.vue.d.ts +6 -2
- package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +29 -12
- package/es/src/business/ap-appendix/style/index.mjs +1 -1
- package/es/src/business/ap-attachment/ApAttachment.mjs +42 -39
- package/es/src/business/ap-copy/style/index.mjs +1 -1
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +45 -46
- package/es/src/business/ap-ladder/ApLadder.mjs +20 -22
- package/es/src/business/ap-ladder/style/index.mjs +11 -39
- package/es/src/business/ap-product-info/ApProductInfo.mjs +21 -22
- package/es/src/business/ap-product-info/style/index.mjs +8 -24
- package/es/src/business/ap-radio-group/style/index.mjs +1 -1
- package/es/src/business/ap-size-input/ApSizeInput.d.ts +20 -4
- package/es/src/business/ap-size-input/ApSizeInput.mjs +37 -40
- package/es/src/business/ap-size-input/constans.d.ts +10 -2
- package/es/src/business/ap-size-input/constans.mjs +9 -1
- package/es/src/business/ap-size-input/form-item.vue.d.ts +13 -0
- package/es/src/business/ap-size-input/form-item.vue.mjs +65 -0
- package/es/src/business/ap-size-input/form-item.vue2.mjs +4 -0
- package/es/src/business/ap-size-input/index.d.ts +33 -8
- package/es/src/business/ap-size-input/index.mjs +3 -2
- package/es/src/business/ap-size-input/interface.d.ts +7 -0
- package/es/src/business/ap-size-input/style/index.mjs +2 -1
- package/es/src/business/ap-table-modal/hooks/use-table-modal.mjs +18 -19
- package/es/src/business/ap-table-modal/modal-title.vue2.mjs +13 -13
- package/es/src/business/ap-title/style/index.mjs +1 -1
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +38 -37
- package/es/src/business/ap-value-select-card/index.vue2.mjs +36 -37
- package/es/src/business/ap-value-select-card/style/index.mjs +7 -29
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +61 -64
- package/es/src/business/ap-view/style/index.mjs +1 -1
- package/es/src/business/batch-input-group/style/index.mjs +1 -1
- package/es/src/check-card/style/index.mjs +46 -51
- package/es/src/config-provider/hooks/use-token.d.ts +2 -2
- package/es/src/design-token/constants.mjs +4 -2
- package/es/src/design-token/interface.d.ts +39 -19
- package/es/src/index.mjs +95 -93
- package/es/src/scroll-bar/style/index.mjs +12 -12
- package/es/src/splitter/style/index.mjs +6 -6
- package/es/src/style/index.mjs +1 -1
- package/es/src/text/style/index.mjs +1 -1
- package/es/src/utils/cssinjs/TokenUtil.d.ts +11 -0
- package/es/src/utils/cssinjs/TokenUtil.mjs +26 -0
- package/es/src/utils/cssinjs/index.d.ts +1 -1
- package/es/src/utils/cssinjs/index.mjs +51 -50
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/style/custom-header.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/ap-descriptions/style/index.js +1 -1
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/hooks/useStyle.d.ts +1 -1
- package/lib/src/ap-download/hooks/useStyle.js +1 -1
- package/lib/src/ap-download/style/index.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/style/item.js +1 -1
- package/lib/src/ap-form/style/modal-form.js +1 -1
- package/lib/src/ap-form/style/search-form-sorter.js +1 -1
- package/lib/src/ap-form/style/token.d.ts +8 -0
- package/lib/src/ap-grid/style/index.js +1 -1
- package/lib/src/ap-pro-card/style/statistic.js +1 -1
- package/lib/src/ap-pro-card/style/token.js +1 -1
- package/lib/src/ap-table/style/index.js +1 -1
- package/lib/src/ap-table/style/setting.js +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/ap-tag/style/group.js +1 -1
- package/lib/src/ap-tag/style/index.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/ap-upload/style/multiple-file.js +1 -1
- package/lib/src/ap-upload/style/picture.js +1 -1
- package/lib/src/ap-upload/style/single-file.js +1 -1
- package/lib/src/business/ag-grid-modal/interface.d.ts +1 -1
- package/lib/src/business/ag-grid-modal/wrapper/index.vue.d.ts +6 -2
- package/lib/src/business/ag-grid-modal/wrapper/index.vue2.js +1 -1
- package/lib/src/business/ap-appendix/style/index.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-copy/style/index.js +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-ladder/ApLadder.js +1 -1
- package/lib/src/business/ap-ladder/style/index.js +1 -1
- package/lib/src/business/ap-product-info/ApProductInfo.js +1 -1
- package/lib/src/business/ap-product-info/style/index.js +1 -1
- package/lib/src/business/ap-radio-group/style/index.js +1 -1
- package/lib/src/business/ap-size-input/ApSizeInput.d.ts +20 -4
- package/lib/src/business/ap-size-input/ApSizeInput.js +1 -1
- package/lib/src/business/ap-size-input/constans.d.ts +10 -2
- package/lib/src/business/ap-size-input/constans.js +1 -1
- package/lib/src/business/ap-size-input/form-item.vue.d.ts +13 -0
- package/lib/src/business/ap-size-input/form-item.vue.js +1 -0
- package/lib/src/business/ap-size-input/form-item.vue2.js +1 -0
- package/lib/src/business/ap-size-input/index.d.ts +33 -8
- package/lib/src/business/ap-size-input/index.js +1 -1
- package/lib/src/business/ap-size-input/interface.d.ts +7 -0
- package/lib/src/business/ap-size-input/style/index.js +1 -1
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.js +1 -1
- package/lib/src/business/ap-table-modal/modal-title.vue2.js +1 -1
- package/lib/src/business/ap-title/style/index.js +1 -1
- package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -1
- package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
- package/lib/src/business/ap-value-select-card/style/index.js +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
- package/lib/src/business/ap-view/style/index.js +1 -1
- package/lib/src/business/batch-input-group/style/index.js +1 -1
- package/lib/src/check-card/style/index.js +1 -1
- package/lib/src/config-provider/hooks/use-token.d.ts +2 -2
- package/lib/src/design-token/constants.js +1 -1
- package/lib/src/design-token/interface.d.ts +39 -19
- package/lib/src/index.js +1 -1
- package/lib/src/scroll-bar/style/index.js +1 -1
- package/lib/src/splitter/style/index.js +1 -1
- package/lib/src/style/index.js +1 -1
- package/lib/src/text/style/index.js +1 -1
- package/lib/src/utils/cssinjs/TokenUtil.d.ts +11 -0
- package/lib/src/utils/cssinjs/TokenUtil.js +1 -0
- package/lib/src/utils/cssinjs/index.d.ts +1 -1
- package/lib/src/utils/cssinjs/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -44,58 +44,31 @@ const e = (t) => {
|
|
|
44
44
|
},
|
|
45
45
|
".ant-descriptions-row": {
|
|
46
46
|
".ant-descriptions-item-label": {
|
|
47
|
+
justifyContent: "flex-end",
|
|
48
|
+
width: "var(--ap-descriptions-item-label-width, auto)",
|
|
49
|
+
color: t.textColor3,
|
|
50
|
+
".ap-descriptions-item-content__help": {
|
|
51
|
+
fontSize: t.fontSizeLG,
|
|
52
|
+
marginInlineStart: "4px",
|
|
53
|
+
color: t.textColor3
|
|
54
|
+
},
|
|
47
55
|
".ant-typography": {
|
|
48
56
|
color: "inherit"
|
|
49
57
|
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
width: "var(--ap-descriptions-item-label-width, auto)",
|
|
57
|
-
color: "#999",
|
|
58
|
-
".ap-descriptions-item-content__help": {
|
|
59
|
-
fontSize: t.fontSizeLG,
|
|
60
|
-
marginInlineStart: "4px",
|
|
61
|
-
color: "#999"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
".ant-descriptions-item-content": {
|
|
65
|
-
color: "#333",
|
|
66
|
-
".ap-descriptions-item-content__link": {
|
|
67
|
-
color: "#1890ff",
|
|
68
|
-
cursor: "pointer"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"&--aplus": {
|
|
74
|
-
".ant-descriptions-row": {
|
|
75
|
-
".ant-descriptions-item-label": {
|
|
76
|
-
justifyContent: "flex-end",
|
|
77
|
-
width: "var(--ap-descriptions-item-label-width, auto)",
|
|
78
|
-
color: "#8896B0",
|
|
79
|
-
".ap-descriptions-item-content__help": {
|
|
80
|
-
fontSize: t.fontSizeLG,
|
|
81
|
-
marginInlineStart: "4px",
|
|
82
|
-
color: "#8896B0"
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
".ant-descriptions-item-content": {
|
|
86
|
-
color: "#182948",
|
|
87
|
-
".ap-descriptions-item-content__link": {
|
|
88
|
-
color: "#0070FF",
|
|
89
|
-
cursor: "pointer"
|
|
90
|
-
}
|
|
58
|
+
},
|
|
59
|
+
".ant-descriptions-item-content": {
|
|
60
|
+
color: t.textColor1,
|
|
61
|
+
".ap-descriptions-item-content__link": {
|
|
62
|
+
color: t.colorLink,
|
|
63
|
+
cursor: "pointer"
|
|
91
64
|
}
|
|
92
65
|
}
|
|
93
66
|
}
|
|
94
67
|
}
|
|
95
68
|
};
|
|
96
|
-
},
|
|
69
|
+
}, r = n("ApDescriptions", (t) => [
|
|
97
70
|
e(t)
|
|
98
71
|
]);
|
|
99
72
|
export {
|
|
100
|
-
|
|
73
|
+
r as default
|
|
101
74
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { LoadingOutlined as
|
|
1
|
+
import { defineComponent as O, ref as z, useSlots as A, computed as s, unref as t, createBlock as L, openBlock as i, mergeProps as S, withCtx as x, createElementVNode as m, normalizeClass as j, createElementBlock as f, createCommentVNode as u, createVNode as I, renderSlot as F, toDisplayString as T } from "vue";
|
|
2
|
+
import { Button as U } from "@aplus-frontend/antdv";
|
|
3
|
+
import { LoadingOutlined as V } from "@ant-design/icons-vue";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
5
|
-
import { useOssInit as
|
|
6
|
-
import { getFileInfo as
|
|
7
|
-
import { useStyle as
|
|
8
|
-
import { omit as
|
|
9
|
-
import { useLocale as
|
|
10
|
-
import { useGlobalConfig as
|
|
11
|
-
const
|
|
5
|
+
import { useOssInit as D } from "./hooks/index.mjs";
|
|
6
|
+
import { getFileInfo as g } from "./utils/getFileInfo.mjs";
|
|
7
|
+
import { useStyle as E } from "./hooks/useStyle.mjs";
|
|
8
|
+
import { omit as P } from "lodash-unified";
|
|
9
|
+
import { useLocale as G } from "../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import { useGlobalConfig as y } from "../config-provider/hooks/use-global-config.mjs";
|
|
11
|
+
const M = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "spin"
|
|
14
|
-
},
|
|
14
|
+
}, R = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "icon"
|
|
17
|
-
},
|
|
17
|
+
}, W = { class: "text" }, oe = /* @__PURE__ */ O({
|
|
18
18
|
name: "ApDownload",
|
|
19
19
|
__name: "ap-download",
|
|
20
20
|
props: {
|
|
@@ -45,57 +45,57 @@ const W = {
|
|
|
45
45
|
},
|
|
46
46
|
emits: ["downloadCallback"],
|
|
47
47
|
setup(C, { emit: N }) {
|
|
48
|
-
const
|
|
48
|
+
const r = N, n = z(!1), { lang: b } = G(), w = A(), h = s(() => b.value === "zh-cn" ? "zh_CN" : "en_US"), e = C, l = y("apUpload"), c = y(
|
|
49
49
|
"downloadCenterTriggerConfig"
|
|
50
|
-
),
|
|
50
|
+
), d = s(() => e.disabled), v = s(() => e.size), { getInnerWrapperClass: _ } = E(v, d), k = s(() => e.getOssAccess || l.value?.getOssAccess), B = async () => {
|
|
51
51
|
if (!e.disabled) {
|
|
52
|
-
|
|
52
|
+
n.value = !0;
|
|
53
53
|
try {
|
|
54
|
-
if (
|
|
55
|
-
let a =
|
|
56
|
-
e.needName ??
|
|
54
|
+
if (c.value?.trigger) {
|
|
55
|
+
let a = g(
|
|
56
|
+
e.needName ?? l?.value?.needName,
|
|
57
57
|
e.fileName
|
|
58
|
-
).map((
|
|
59
|
-
objectName:
|
|
60
|
-
fileName:
|
|
58
|
+
).map((p) => ({
|
|
59
|
+
objectName: p.path,
|
|
60
|
+
fileName: p.fileName
|
|
61
61
|
}));
|
|
62
|
-
await
|
|
62
|
+
await c.value?.trigger(a), r("downloadCallback", a);
|
|
63
63
|
} else {
|
|
64
|
-
const a = await (await
|
|
65
|
-
|
|
66
|
-
t(
|
|
64
|
+
const a = await (await D(
|
|
65
|
+
k.value,
|
|
66
|
+
t(h)
|
|
67
67
|
)).downloadFile(
|
|
68
|
-
|
|
69
|
-
e.needName ??
|
|
68
|
+
g(
|
|
69
|
+
e.needName ?? l?.value?.needName,
|
|
70
70
|
e.fileName
|
|
71
71
|
)
|
|
72
72
|
);
|
|
73
|
-
|
|
73
|
+
r("downloadCallback", a);
|
|
74
74
|
}
|
|
75
75
|
} catch (o) {
|
|
76
76
|
console.error(o);
|
|
77
77
|
} finally {
|
|
78
|
-
|
|
78
|
+
n.value = !1;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
return (o, a) => (i(),
|
|
82
|
+
return (o, a) => (i(), L(t(U), S(t(P)(e, ["getOssAccess", "fileName", "needName"]), {
|
|
83
83
|
type: e.type,
|
|
84
84
|
size: e.size,
|
|
85
|
-
disabled:
|
|
86
|
-
onClick:
|
|
85
|
+
disabled: d.value,
|
|
86
|
+
onClick: B
|
|
87
87
|
}), {
|
|
88
|
-
default:
|
|
89
|
-
|
|
90
|
-
class:
|
|
88
|
+
default: x(() => [
|
|
89
|
+
m("div", {
|
|
90
|
+
class: j(t(_))
|
|
91
91
|
}, [
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
])) :
|
|
95
|
-
t(
|
|
96
|
-
|
|
97
|
-
])) :
|
|
98
|
-
|
|
92
|
+
n.value ? (i(), f("span", M, [
|
|
93
|
+
I(t(V), { spin: !0 })
|
|
94
|
+
])) : u("", !0),
|
|
95
|
+
t(w).icon ? (i(), f("span", R, [
|
|
96
|
+
F(o.$slots, "icon")
|
|
97
|
+
])) : u("", !0),
|
|
98
|
+
m("span", W, T(o.text), 1)
|
|
99
99
|
], 2)
|
|
100
100
|
]),
|
|
101
101
|
_: 3
|
|
@@ -103,5 +103,5 @@ const W = {
|
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
105
|
export {
|
|
106
|
-
|
|
106
|
+
oe as default
|
|
107
107
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComputedRef } from 'vue';
|
|
2
|
-
export declare function useStyle(
|
|
2
|
+
export declare function useStyle(size: ComputedRef<string>, disabled: ComputedRef<boolean>): {
|
|
3
3
|
wrapperStyle: ComputedRef<Record<string, any>>;
|
|
4
4
|
getWrapperClass: ComputedRef<string[]>;
|
|
5
5
|
getInnerWrapperClass: ComputedRef<string[]>;
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import { computed as o } from "vue";
|
|
2
|
-
import { getHexWithOpacity as
|
|
2
|
+
import { getHexWithOpacity as c } from "../utils/getFileInfo.mjs";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
|
-
import
|
|
4
|
+
import m from "../style/index.mjs";
|
|
5
|
+
import { useToken as d } from "../../config-provider/hooks/use-token.mjs";
|
|
5
6
|
import { useNamespace as w } from "../../config-provider/hooks/use-namespace.mjs";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"--download-main-color":
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
function g(a, l) {
|
|
8
|
+
const { b: r, bm: e } = w("ap-download"), n = m("ap-download"), { token: p } = d(), s = o(() => ({
|
|
9
|
+
"--download-main-color": p.value?.colorLink,
|
|
10
|
+
"--download-main-color-opacity": c(
|
|
11
|
+
p.value?.colorLink,
|
|
12
|
+
0.6
|
|
13
|
+
)
|
|
14
|
+
})), i = o(() => [r("wrapper"), e("wrapper", a.value), n.value].filter(
|
|
12
15
|
Boolean
|
|
13
|
-
)),
|
|
14
|
-
const
|
|
15
|
-
return l.value &&
|
|
16
|
+
)), u = o(() => {
|
|
17
|
+
const t = [r(), r("inner-wrapper"), e("inner-wrapper", a.value)];
|
|
18
|
+
return l.value && t.push(e("inner-wrapper", "disabled")), [...t, n.value];
|
|
16
19
|
});
|
|
17
20
|
return {
|
|
18
21
|
wrapperStyle: s,
|
|
19
|
-
getWrapperClass:
|
|
20
|
-
getInnerWrapperClass:
|
|
22
|
+
getWrapperClass: i,
|
|
23
|
+
getInnerWrapperClass: u
|
|
21
24
|
};
|
|
22
25
|
}
|
|
23
26
|
export {
|
|
24
|
-
|
|
27
|
+
g as useStyle
|
|
25
28
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { genComponentStyleHook as l } from "../../utils/cssinjs/index.mjs";
|
|
2
|
-
const
|
|
3
|
-
const { componentCls: e } = o,
|
|
2
|
+
const r = (o) => {
|
|
3
|
+
const { componentCls: e, textColor3: n } = o, i = `${e}-inner-wrapper`;
|
|
4
4
|
return {
|
|
5
5
|
[e]: {
|
|
6
6
|
"&-wrapper": {
|
|
@@ -8,7 +8,7 @@ const i = (o) => {
|
|
|
8
8
|
display: "inline-block"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
|
-
[
|
|
11
|
+
[i]: {
|
|
12
12
|
display: "flex",
|
|
13
13
|
color: "var(--download-main-color)",
|
|
14
14
|
cursor: "pointer",
|
|
@@ -40,23 +40,16 @@ const i = (o) => {
|
|
|
40
40
|
fontSize: o.fontSizeSM
|
|
41
41
|
},
|
|
42
42
|
"&--disabled": {
|
|
43
|
-
color:
|
|
43
|
+
color: n,
|
|
44
44
|
cursor: "not-allowed",
|
|
45
45
|
"&:hover": {
|
|
46
|
-
color:
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"&--disabled-admin": {
|
|
50
|
-
cursor: "not-allowed",
|
|
51
|
-
color: "#999",
|
|
52
|
-
"&:hover": {
|
|
53
|
-
color: "#999"
|
|
46
|
+
color: n
|
|
54
47
|
}
|
|
55
48
|
}
|
|
56
49
|
}
|
|
57
50
|
};
|
|
58
51
|
}, a = l("ApDownload", (o) => [
|
|
59
|
-
|
|
52
|
+
r(o)
|
|
60
53
|
]);
|
|
61
54
|
export {
|
|
62
55
|
a as default
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { Button as
|
|
1
|
+
import { isVNode as O, defineComponent as z, useSlots as E, ref as d, watch as $, cloneVNode as q, computed as A, createVNode as n, mergeProps as m, unref as o, createElementBlock as D, openBlock as p, Fragment as L, createBlock as T, createCommentVNode as K, withCtx as b, createElementVNode as W, normalizeClass as G, normalizeStyle as H, renderSlot as C, resolveDynamicComponent as B, createTextVNode as J, toDisplayString as Q } from "vue";
|
|
2
|
+
import { Button as v, Flex as X, Space as Y, Modal as Z } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../ap-form.vue.mjs";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
|
-
import { getSingleVNode as
|
|
5
|
+
import { getSingleVNode as ee } from "../../utils/slot.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { omit as
|
|
8
|
-
import
|
|
7
|
+
import { omit as te } from "lodash-unified";
|
|
8
|
+
import le from "../style/modal-form.mjs";
|
|
9
9
|
import { useControllableValue as ae } from "../../hooks/useControllableValue.mjs";
|
|
10
|
-
import { useLocale as
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import ie from "../ap-form.vue2.mjs";
|
|
10
|
+
import { useLocale as oe } from "../../config-provider/hooks/use-locale.mjs";
|
|
11
|
+
import { useNamespace as se } from "../../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
import ne from "../ap-form.vue2.mjs";
|
|
14
13
|
function k(r) {
|
|
15
|
-
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !
|
|
14
|
+
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !O(r);
|
|
16
15
|
}
|
|
17
|
-
const
|
|
16
|
+
const Ne = /* @__PURE__ */ z({
|
|
18
17
|
name: "ApFormModalForm",
|
|
19
18
|
__name: "index",
|
|
20
19
|
props: {
|
|
@@ -97,49 +96,49 @@ const Re = /* @__PURE__ */ E({
|
|
|
97
96
|
expose: P,
|
|
98
97
|
emit: S
|
|
99
98
|
}) {
|
|
100
|
-
const t = r, c =
|
|
99
|
+
const t = r, c = E(), w = S, a = d(), y = d(0), i = d(), s = d(!1), {
|
|
101
100
|
value: N,
|
|
102
101
|
updateValue: u
|
|
103
102
|
} = ae(t, w, {
|
|
104
103
|
valuePropName: "open",
|
|
105
104
|
defaultValue: !1,
|
|
106
105
|
beforeUpdateValue(e) {
|
|
107
|
-
return e && (
|
|
106
|
+
return e && (y.value += 1), !0;
|
|
108
107
|
}
|
|
109
108
|
}), {
|
|
110
109
|
t: f
|
|
111
|
-
} =
|
|
110
|
+
} = oe(), x = le("ap-form-modal-form"), {
|
|
112
111
|
b: R,
|
|
113
|
-
e:
|
|
114
|
-
} =
|
|
115
|
-
|
|
112
|
+
e: F
|
|
113
|
+
} = se("ap-form-modal-form");
|
|
114
|
+
$(() => a.value, (e) => {
|
|
116
115
|
e && i.value && (e.setFieldsValue?.(i.value), i.value = void 0);
|
|
117
116
|
});
|
|
118
|
-
const h =
|
|
117
|
+
const h = ee(c.trigger), g = h ? q(h, {
|
|
119
118
|
onClick: () => {
|
|
120
119
|
u(!0);
|
|
121
120
|
}
|
|
122
|
-
}) : null, _ =
|
|
121
|
+
}) : null, _ = A(() => {
|
|
123
122
|
const e = [];
|
|
124
123
|
if (t.submitter === !1)
|
|
125
124
|
return null;
|
|
126
125
|
if (t.showCancel) {
|
|
127
126
|
let l;
|
|
128
|
-
e.push(n(
|
|
127
|
+
e.push(n(v, {
|
|
129
128
|
onClick: V,
|
|
130
129
|
disabled: s.value
|
|
131
130
|
}, k(l = f("ap.common.cancelText")) ? l : {
|
|
132
131
|
default: () => [l]
|
|
133
132
|
}));
|
|
134
133
|
}
|
|
135
|
-
return t.submitter?.resetButtonProps !== !1 && e.push(n(
|
|
134
|
+
return t.submitter?.resetButtonProps !== !1 && e.push(n(v, m(t.submitter?.resetButtonProps || {}, {
|
|
136
135
|
key: "reset",
|
|
137
136
|
disabled: s.value,
|
|
138
137
|
onClick: I,
|
|
139
138
|
htmlType: "reset"
|
|
140
139
|
}), {
|
|
141
140
|
default: () => [t.submitter?.resetText || f("ap.common.resetText")]
|
|
142
|
-
})), t.submitter?.submitButtonProps !== !1 && e.push(n(
|
|
141
|
+
})), t.submitter?.submitButtonProps !== !1 && e.push(n(v, m({
|
|
143
142
|
type: "primary",
|
|
144
143
|
key: "submit",
|
|
145
144
|
htmlType: "submit"
|
|
@@ -147,28 +146,28 @@ const Re = /* @__PURE__ */ E({
|
|
|
147
146
|
loading: s.value
|
|
148
147
|
}), {
|
|
149
148
|
default: () => [t.submitter?.submitText || f("ap.common.okText")]
|
|
150
|
-
})), n(
|
|
149
|
+
})), n(X, {
|
|
151
150
|
justify: "flex-end",
|
|
152
|
-
key:
|
|
153
|
-
class: [
|
|
151
|
+
key: o(y),
|
|
152
|
+
class: [F("footer")]
|
|
154
153
|
}, {
|
|
155
|
-
default: () => [c.submitter ? c.submitter(e) : n(
|
|
154
|
+
default: () => [c.submitter ? c.submitter(e) : n(Y, null, k(e) ? e : {
|
|
156
155
|
default: () => [e]
|
|
157
156
|
})]
|
|
158
157
|
});
|
|
159
158
|
});
|
|
160
159
|
function I() {
|
|
161
|
-
t.submitter !== !1 && (
|
|
160
|
+
t.submitter !== !1 && (a.value?.resetFields(), t.submitter?.onReset?.());
|
|
162
161
|
}
|
|
163
|
-
async function
|
|
162
|
+
async function M(e) {
|
|
164
163
|
if (t.submitter !== !1)
|
|
165
164
|
try {
|
|
166
165
|
t.submitter?.onSubmit?.(), s.value = !0;
|
|
167
166
|
const l = t.onFinish?.(e);
|
|
168
167
|
if (t.submitTimeout && l instanceof Promise) {
|
|
169
|
-
const
|
|
168
|
+
const j = setTimeout(() => s.value = !1, t.submitTimeout);
|
|
170
169
|
l.finally(() => {
|
|
171
|
-
clearTimeout(
|
|
170
|
+
clearTimeout(j), s.value = !1;
|
|
172
171
|
});
|
|
173
172
|
}
|
|
174
173
|
await l && u(!1);
|
|
@@ -177,71 +176,71 @@ const Re = /* @__PURE__ */ E({
|
|
|
177
176
|
}
|
|
178
177
|
}
|
|
179
178
|
function V() {
|
|
180
|
-
|
|
179
|
+
o(s) || u(!1);
|
|
181
180
|
}
|
|
182
|
-
function
|
|
183
|
-
!e &&
|
|
181
|
+
function U(e) {
|
|
182
|
+
!e && o(s) || u(e);
|
|
184
183
|
}
|
|
185
184
|
return P({
|
|
186
185
|
resetFields: async () => {
|
|
187
|
-
|
|
186
|
+
a.value?.resetFields();
|
|
188
187
|
},
|
|
189
188
|
clearValidate: (e) => {
|
|
190
|
-
|
|
189
|
+
a.value?.clearValidate(e);
|
|
191
190
|
},
|
|
192
|
-
validateFields: (e, l) =>
|
|
193
|
-
getFieldsValue: (e) =>
|
|
194
|
-
validate: (e, l) =>
|
|
191
|
+
validateFields: (e, l) => a.value?.validateFields(e, l),
|
|
192
|
+
getFieldsValue: (e) => a.value?.getFieldsValue(e),
|
|
193
|
+
validate: (e, l) => a.value?.validate(e, l),
|
|
195
194
|
scrollToField: (e, l = {}) => {
|
|
196
|
-
|
|
195
|
+
a.value?.scrollToField(e, l);
|
|
197
196
|
},
|
|
198
197
|
setFieldValue: (e, l) => {
|
|
199
|
-
|
|
198
|
+
a.value?.setFieldValue?.(e, l);
|
|
200
199
|
},
|
|
201
200
|
setFieldsValue: (e) => {
|
|
202
|
-
if (!
|
|
201
|
+
if (!a.value) {
|
|
203
202
|
i.value = e;
|
|
204
203
|
return;
|
|
205
204
|
}
|
|
206
|
-
|
|
205
|
+
a.value?.setFieldsValue?.(e);
|
|
207
206
|
},
|
|
208
|
-
getInternalInstance: (e) =>
|
|
207
|
+
getInternalInstance: (e) => a.value?.getInternalInstance(e),
|
|
209
208
|
getFieldsValueTransformed(e) {
|
|
210
|
-
return
|
|
209
|
+
return a.value?.getFieldsValueTransformed(e);
|
|
211
210
|
},
|
|
212
211
|
validateFieldsReturnTransformed(e, l) {
|
|
213
|
-
return
|
|
212
|
+
return a.value?.validateFieldsReturnTransformed(e, l);
|
|
214
213
|
}
|
|
215
|
-
}), (e, l) => (
|
|
216
|
-
open:
|
|
214
|
+
}), (e, l) => (p(), D(L, null, [n(o(Z), m(e.modalProps, {
|
|
215
|
+
open: o(N),
|
|
217
216
|
footer: null,
|
|
218
217
|
width: e.width,
|
|
219
|
-
class: [
|
|
218
|
+
class: [o(R)(), o(x)],
|
|
220
219
|
"body-style": {
|
|
221
220
|
padding: "0px !important"
|
|
222
221
|
},
|
|
223
|
-
"onUpdate:open":
|
|
222
|
+
"onUpdate:open": U,
|
|
224
223
|
onCancel: V
|
|
225
224
|
}), {
|
|
226
|
-
title:
|
|
227
|
-
default:
|
|
225
|
+
title: b(() => [C(e.$slots, "title", {}, () => [J(Q(t.title), 1)])]),
|
|
226
|
+
default: b(() => [n(ne, m({
|
|
228
227
|
ref_key: "formRef",
|
|
229
|
-
ref:
|
|
230
|
-
},
|
|
231
|
-
onFinish:
|
|
228
|
+
ref: a
|
|
229
|
+
}, o(te)(t, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"]), {
|
|
230
|
+
onFinish: M
|
|
232
231
|
}), {
|
|
233
|
-
default:
|
|
234
|
-
style:
|
|
235
|
-
class:
|
|
236
|
-
}, [C(e.$slots, "default")], 6), (
|
|
232
|
+
default: b(() => [W("div", {
|
|
233
|
+
style: H(e.modalProps?.bodyStyle),
|
|
234
|
+
class: G(o(F)("content"))
|
|
235
|
+
}, [C(e.$slots, "default")], 6), (p(), T(B(_.value)))]),
|
|
237
236
|
_: 3
|
|
238
237
|
}, 16)]),
|
|
239
238
|
_: 3
|
|
240
|
-
}, 16, ["open", "width", "class"]),
|
|
239
|
+
}, 16, ["open", "width", "class"]), o(g) ? (p(), T(B(o(g)), {
|
|
241
240
|
key: 0
|
|
242
241
|
})) : K("", !0)], 64));
|
|
243
242
|
}
|
|
244
243
|
});
|
|
245
244
|
export {
|
|
246
|
-
|
|
245
|
+
Ne as default
|
|
247
246
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { genComponentStyleHook as a } from "../../utils/cssinjs/index.mjs";
|
|
2
|
-
const
|
|
2
|
+
const r = (n) => {
|
|
3
3
|
const { componentCls: e, namespace: t } = n;
|
|
4
4
|
return {
|
|
5
5
|
[e]: {
|
|
@@ -42,7 +42,8 @@ const i = (n) => {
|
|
|
42
42
|
},
|
|
43
43
|
".ant-select-selector": {
|
|
44
44
|
borderWidth: "0 !important",
|
|
45
|
-
boxShadow: "none !important"
|
|
45
|
+
boxShadow: "none !important",
|
|
46
|
+
background: "unset !important"
|
|
46
47
|
},
|
|
47
48
|
".ant-select-single .ant-select-selector": {
|
|
48
49
|
height: "30px !important"
|
|
@@ -124,8 +125,8 @@ const i = (n) => {
|
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
};
|
|
127
|
-
}, o = a("ApForm", (n) => [
|
|
128
|
+
}, o = a("ApForm", (n) => [r(n)]);
|
|
128
129
|
export {
|
|
129
130
|
o as default,
|
|
130
|
-
|
|
131
|
+
r as genApFormItemStyle
|
|
131
132
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { genComponentStyleHook as
|
|
1
|
+
import { genComponentStyleHook as r } from "../../utils/cssinjs/index.mjs";
|
|
2
2
|
const e = (o) => {
|
|
3
|
-
const { componentCls: a } = o;
|
|
3
|
+
const { componentCls: a, apFormModalCloseSize: d } = o;
|
|
4
4
|
return {
|
|
5
5
|
[a]: {
|
|
6
6
|
".ant-modal-content": {
|
|
@@ -16,19 +16,17 @@ const e = (o) => {
|
|
|
16
16
|
padding: o.apFormModalContentPadding
|
|
17
17
|
},
|
|
18
18
|
[`${a}__footer`]: {
|
|
19
|
-
padding: o.apFormModalFooterPadding
|
|
20
|
-
|
|
21
|
-
[`${a}__footer-admin`]: {
|
|
22
|
-
borderTop: "1px solid #E9EDF3"
|
|
19
|
+
padding: o.apFormModalFooterPadding,
|
|
20
|
+
borderTop: o.apFormModalFooterBorderTop
|
|
23
21
|
},
|
|
24
22
|
".ant-modal-close": {
|
|
25
|
-
top:
|
|
26
|
-
width:
|
|
27
|
-
height:
|
|
23
|
+
top: o.calc(o.apFormModalHeaderPaddingBlock).sub(o.calc(d).sub("22px").div(2)).equal(),
|
|
24
|
+
width: d,
|
|
25
|
+
height: d
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
};
|
|
31
|
-
},
|
|
29
|
+
}, n = r(
|
|
32
30
|
"ApForm.Modal",
|
|
33
31
|
(o) => [e(o)],
|
|
34
32
|
{
|
|
@@ -36,10 +34,11 @@ const e = (o) => {
|
|
|
36
34
|
apFormModalHeaderPaddingBlock: 15,
|
|
37
35
|
apFormModalContentPadding: "20px 20px 0px",
|
|
38
36
|
apFormModalFooterPadding: "12px 20px",
|
|
39
|
-
apFormModalCloseSize: 32
|
|
37
|
+
apFormModalCloseSize: 32,
|
|
38
|
+
apFormModalFooterBorderTop: "unset"
|
|
40
39
|
}
|
|
41
40
|
);
|
|
42
41
|
export {
|
|
43
|
-
|
|
42
|
+
n as default,
|
|
44
43
|
e as genModalFormStyle
|
|
45
44
|
};
|