@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
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Popover as
|
|
3
|
-
import { PlusOutlined as
|
|
4
|
-
import { IconApAdLinePoor as
|
|
1
|
+
import { defineComponent as z, ref as O, computed as T, createElementBlock as r, openBlock as d, normalizeStyle as A, normalizeClass as a, unref as s, createVNode as b, withCtx as V, createElementVNode as c, createCommentVNode as y, Fragment as N, renderList as R, withModifiers as f, renderSlot as h, createTextVNode as g, toDisplayString as u, createBlock as L } from "vue";
|
|
2
|
+
import { Popover as j } from "@aplus-frontend/antdv";
|
|
3
|
+
import { PlusOutlined as M, InfoCircleFilled as q } from "@ant-design/icons-vue";
|
|
4
|
+
import { IconApAdLinePoor as G } from "@aplus-frontend/icon";
|
|
5
5
|
import "../../config-provider/index.mjs";
|
|
6
|
-
import
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
|
|
9
|
-
const Y = ["onClick"], Z = { class: "label" }, _ = { class: "value" }, x = ["onClick"], ee = ["onClick"], te = { class: "label" }, le = { class: "value" }, se = { class: "text" }, he = /* @__PURE__ */ L({
|
|
6
|
+
import J from "./style/index.mjs";
|
|
7
|
+
import { useNamespace as Q } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
const U = ["onClick"], W = { class: "label" }, X = { class: "value" }, Y = ["onClick"], Z = ["onClick"], _ = { class: "label" }, x = { class: "value" }, ee = { class: "text" }, de = /* @__PURE__ */ z({
|
|
10
9
|
name: "ApValueSelectCard",
|
|
11
10
|
__name: "index",
|
|
12
11
|
props: {
|
|
@@ -26,7 +25,7 @@ const Y = ["onClick"], Z = { class: "label" }, _ = { class: "value" }, x = ["onC
|
|
|
26
25
|
},
|
|
27
26
|
emits: ["update:selectedKeys", "update:highlightedKeys", "change", "select", "remove", "highlight"],
|
|
28
27
|
setup(v, { expose: F, emit: H }) {
|
|
29
|
-
const o = H, l = v, { b: n
|
|
28
|
+
const o = H, l = v, { b: n } = Q("ap-value-select-card"), D = J("ap-value-select-card"), E = O(null), p = O(!1), K = T(() => l.options), C = T(() => K.value.filter(
|
|
30
29
|
(e) => l.selectedKeys.includes(e.key)
|
|
31
30
|
)), B = (e) => l.selectedKeys.includes(e), S = (e) => l.highlightedKeys.includes(e), $ = (e) => {
|
|
32
31
|
l.selectedKeys.includes(e) ? k(e) : I(e);
|
|
@@ -53,7 +52,7 @@ const Y = ["onClick"], Z = { class: "label" }, _ = { class: "value" }, x = ["onC
|
|
|
53
52
|
else
|
|
54
53
|
i = [...l.highlightedKeys, e];
|
|
55
54
|
o("update:highlightedKeys", i), o("highlight", i);
|
|
56
|
-
},
|
|
55
|
+
}, P = (e) => {
|
|
57
56
|
e || (p.value = e);
|
|
58
57
|
};
|
|
59
58
|
return F({
|
|
@@ -67,19 +66,19 @@ const Y = ["onClick"], Z = { class: "label" }, _ = { class: "value" }, x = ["onC
|
|
|
67
66
|
removeOption: k,
|
|
68
67
|
highlightOption: w
|
|
69
68
|
}), (e, i) => (d(), r("div", {
|
|
70
|
-
class: a([s(n)(),
|
|
69
|
+
class: a([s(n)(), s(D)]),
|
|
71
70
|
style: A({
|
|
72
71
|
...e.wrapperStyle,
|
|
73
72
|
"--ap-value-select-card-column-count": e.maxRowDisplay
|
|
74
73
|
})
|
|
75
74
|
}, [
|
|
76
|
-
b(s(
|
|
75
|
+
b(s(j), {
|
|
77
76
|
open: p.value,
|
|
78
77
|
trigger: "click",
|
|
79
78
|
placement: "bottomRight",
|
|
80
79
|
arrow: !1,
|
|
81
80
|
"get-popup-container": e.getContainer,
|
|
82
|
-
onOpenChange:
|
|
81
|
+
onOpenChange: P
|
|
83
82
|
}, {
|
|
84
83
|
content: V(() => [
|
|
85
84
|
c("div", {
|
|
@@ -89,11 +88,11 @@ const Y = ["onClick"], Z = { class: "label" }, _ = { class: "value" }, x = ["onC
|
|
|
89
88
|
key: 0,
|
|
90
89
|
class: a(s(n)("title"))
|
|
91
90
|
}, [
|
|
92
|
-
e.showTitleIcon ? (d(),
|
|
91
|
+
e.showTitleIcon ? (d(), L(s(q), {
|
|
93
92
|
key: 0,
|
|
94
93
|
class: a(s(n)("title-icon"))
|
|
95
94
|
}, null, 8, ["class"])) : y("", !0),
|
|
96
|
-
g(" " +
|
|
95
|
+
g(" " + u(e.popoverTitle), 1)
|
|
97
96
|
], 2)) : y("", !0),
|
|
98
97
|
c("div", {
|
|
99
98
|
class: a(s(n)("list"))
|
|
@@ -110,17 +109,17 @@ const Y = ["onClick"], Z = { class: "label" }, _ = { class: "value" }, x = ["onC
|
|
|
110
109
|
]),
|
|
111
110
|
onClick: f((m) => $(t.key), ["stop"])
|
|
112
111
|
}, [
|
|
113
|
-
c("div",
|
|
114
|
-
|
|
115
|
-
g(
|
|
112
|
+
c("div", W, [
|
|
113
|
+
h(e.$slots, "popover-label", { option: t }, () => [
|
|
114
|
+
g(u(t.label), 1)
|
|
116
115
|
])
|
|
117
116
|
]),
|
|
118
|
-
c("div",
|
|
119
|
-
|
|
120
|
-
g(
|
|
117
|
+
c("div", X, [
|
|
118
|
+
h(e.$slots, "popover-value", { option: t }, () => [
|
|
119
|
+
g(u(t.value), 1)
|
|
121
120
|
])
|
|
122
121
|
])
|
|
123
|
-
], 10,
|
|
122
|
+
], 10, U))), 128))
|
|
124
123
|
], 2)
|
|
125
124
|
], 2)
|
|
126
125
|
]),
|
|
@@ -132,7 +131,7 @@ const Y = ["onClick"], Z = { class: "label" }, _ = { class: "value" }, x = ["onC
|
|
|
132
131
|
key: t.key,
|
|
133
132
|
ref_for: !0,
|
|
134
133
|
ref_key: "listItemRef",
|
|
135
|
-
ref:
|
|
134
|
+
ref: E,
|
|
136
135
|
class: a([
|
|
137
136
|
s(n)("list-item"),
|
|
138
137
|
{
|
|
@@ -149,29 +148,29 @@ const Y = ["onClick"], Z = { class: "label" }, _ = { class: "value" }, x = ["onC
|
|
|
149
148
|
class: a(s(n)("list-item-close")),
|
|
150
149
|
onClick: f((m) => k(t.key), ["stop"])
|
|
151
150
|
}, [
|
|
152
|
-
|
|
153
|
-
b(s(
|
|
151
|
+
h(e.$slots, "close-icon", {}, () => [
|
|
152
|
+
b(s(G))
|
|
154
153
|
])
|
|
155
|
-
], 10,
|
|
156
|
-
c("div",
|
|
157
|
-
|
|
158
|
-
g(
|
|
154
|
+
], 10, Z)) : y("", !0),
|
|
155
|
+
c("div", _, [
|
|
156
|
+
h(e.$slots, "label", { option: t }, () => [
|
|
157
|
+
g(u(t.label), 1)
|
|
159
158
|
])
|
|
160
159
|
]),
|
|
161
|
-
c("div",
|
|
162
|
-
|
|
163
|
-
g(
|
|
160
|
+
c("div", x, [
|
|
161
|
+
h(e.$slots, "value", { option: t }, () => [
|
|
162
|
+
g(u(t.value), 1)
|
|
164
163
|
])
|
|
165
164
|
])
|
|
166
|
-
], 14,
|
|
165
|
+
], 14, Y))), 128)),
|
|
167
166
|
e.showAddButton && (!e.maxSelected || e.selectedKeys.length < e.maxSelected) ? (d(), r("div", {
|
|
168
167
|
key: 0,
|
|
169
168
|
class: a([s(n)("list-item"), "choose"]),
|
|
170
169
|
onClick: i[0] || (i[0] = f((t) => p.value = !0, ["stop"]))
|
|
171
170
|
}, [
|
|
172
|
-
|
|
173
|
-
b(s(
|
|
174
|
-
c("span",
|
|
171
|
+
h(e.$slots, "add-button", {}, () => [
|
|
172
|
+
b(s(M)),
|
|
173
|
+
c("span", ee, u(e.addButtonText), 1)
|
|
175
174
|
])
|
|
176
175
|
], 2)) : y("", !0)
|
|
177
176
|
], 2)
|
|
@@ -182,5 +181,5 @@ const Y = ["onClick"], Z = { class: "label" }, _ = { class: "value" }, x = ["onC
|
|
|
182
181
|
}
|
|
183
182
|
});
|
|
184
183
|
export {
|
|
185
|
-
|
|
184
|
+
de as default
|
|
186
185
|
};
|
|
@@ -17,7 +17,7 @@ const l = (o) => {
|
|
|
17
17
|
position: "relative",
|
|
18
18
|
boxSizing: "border-box",
|
|
19
19
|
padding: "8px 16px",
|
|
20
|
-
color: o.
|
|
20
|
+
color: o.textColor2,
|
|
21
21
|
border: `1px solid ${o.colorBg1}`,
|
|
22
22
|
borderRadius: o.borderRadius,
|
|
23
23
|
cursor: "pointer",
|
|
@@ -49,7 +49,7 @@ const l = (o) => {
|
|
|
49
49
|
border: `1px solid ${o.colorPrimary}`
|
|
50
50
|
},
|
|
51
51
|
"&.select": {
|
|
52
|
-
color: o.
|
|
52
|
+
color: o.textColor1,
|
|
53
53
|
borderColor: "transparent",
|
|
54
54
|
boxShadow: "3px 10px 30px -2px rgba(123, 121, 140, 0.15)",
|
|
55
55
|
background: "linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, var(--ap-value-select-card-bg-color, #f5f9ff) 92%)",
|
|
@@ -58,7 +58,7 @@ const l = (o) => {
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"&.all": {
|
|
61
|
-
color: o.
|
|
61
|
+
color: o.textColor2,
|
|
62
62
|
background: "#fff",
|
|
63
63
|
border: `1px solid ${o.colorBg1}`,
|
|
64
64
|
boxShadow: "none",
|
|
@@ -66,13 +66,13 @@ const l = (o) => {
|
|
|
66
66
|
borderColor: o.colorPrimary
|
|
67
67
|
},
|
|
68
68
|
"&.disabled": {
|
|
69
|
-
color:
|
|
69
|
+
color: o.textColor3,
|
|
70
70
|
background: "#f9f9fa",
|
|
71
71
|
cursor: "not-allowed",
|
|
72
72
|
border: `1px solid ${o.colorBg1}`
|
|
73
73
|
},
|
|
74
74
|
"&.select": {
|
|
75
|
-
background:
|
|
75
|
+
background: o.colorBgControl,
|
|
76
76
|
borderColor: o.colorPrimary,
|
|
77
77
|
cursor: "pointer"
|
|
78
78
|
}
|
|
@@ -97,35 +97,13 @@ const l = (o) => {
|
|
|
97
97
|
display: "flex",
|
|
98
98
|
alignItems: "center",
|
|
99
99
|
marginBlockEnd: "12px",
|
|
100
|
-
color:
|
|
100
|
+
color: o.textColor2,
|
|
101
101
|
fontSize: o.fontSize,
|
|
102
102
|
"&-icon": {
|
|
103
103
|
marginRight: "4px",
|
|
104
|
-
color:
|
|
104
|
+
color: o.textColor4,
|
|
105
105
|
fontSize: o.fontSizeLG
|
|
106
106
|
}
|
|
107
|
-
},
|
|
108
|
-
"&--admin": {
|
|
109
|
-
[r]: {
|
|
110
|
-
"&-list": {
|
|
111
|
-
"&-item": {
|
|
112
|
-
"&.all": {
|
|
113
|
-
"&.select": {
|
|
114
|
-
background: "#F7FCFA"
|
|
115
|
-
},
|
|
116
|
-
"&.disabled": {
|
|
117
|
-
color: "#999"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
"&-title": {
|
|
123
|
-
color: "#666",
|
|
124
|
-
"&-icon": {
|
|
125
|
-
color: "#BFBFBF"
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
107
|
}
|
|
130
108
|
}
|
|
131
109
|
};
|
|
@@ -1,105 +1,102 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as T, ref as y, watch as $, createElementBlock as l, openBlock as m, normalizeClass as V, unref as e, createElementVNode as o, createCommentVNode as f, toDisplayString as c, createVNode as i, withModifiers as b, withCtx as r } from "vue";
|
|
2
2
|
import "../../../config-provider/index.mjs";
|
|
3
3
|
import { useViewInject as B } from "../hooks/use-view-provide.mjs";
|
|
4
|
-
import { SYSTEM_VIEW_KEY as
|
|
5
|
-
import { Space as
|
|
4
|
+
import { SYSTEM_VIEW_KEY as h } from "../utils/enum.mjs";
|
|
5
|
+
import { Space as C, Popconfirm as F } from "@aplus-frontend/antdv";
|
|
6
6
|
import L from "../icons/line-delete.vue.mjs";
|
|
7
7
|
import "../../../ap-tag/index.mjs";
|
|
8
8
|
import "../../../ap-form/ap-form.vue.mjs";
|
|
9
|
-
import { ApField as
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
9
|
+
import { ApField as M } from "../../../ap-field/index.mjs";
|
|
10
|
+
import P from "../style/index.mjs";
|
|
11
|
+
import { useToken as Y } from "../../../config-provider/hooks/use-token.mjs";
|
|
12
|
+
import { useNamespace as j } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
13
|
+
import { useLocale as A } from "../../../config-provider/hooks/use-locale.mjs";
|
|
14
|
+
import O from "../../../ap-tag/ap-tag.vue.mjs";
|
|
15
15
|
import x from "../../../ap-form/ap-form.vue2.mjs";
|
|
16
16
|
const U = { class: "menu-list-content-name" }, W = ["title"], q = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "menu-list-content-default"
|
|
19
|
-
},
|
|
19
|
+
}, G = { class: "menu-list-content-action-delete" }, H = { class: "menu-list-content-edit" }, ve = /* @__PURE__ */ T({
|
|
20
20
|
__name: "menu-list-content",
|
|
21
21
|
props: {
|
|
22
22
|
view: {}
|
|
23
23
|
},
|
|
24
24
|
setup(N) {
|
|
25
|
-
const { b:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}, D = O("uiMode"), {
|
|
29
|
-
currentViewKey: S,
|
|
30
|
-
changeCurrentViewKey: g,
|
|
25
|
+
const { b: v } = j("ap-view"), d = P("ap-view"), { token: K } = Y(), { t: n } = A(), t = N, {
|
|
26
|
+
currentViewKey: D,
|
|
27
|
+
changeCurrentViewKey: S,
|
|
31
28
|
viewListCRUD: p,
|
|
32
|
-
tableKey:
|
|
29
|
+
tableKey: w,
|
|
33
30
|
menuOpen: _
|
|
34
|
-
} = B(), s = y(!1), k = y(),
|
|
35
|
-
|
|
36
|
-
},
|
|
31
|
+
} = B(), s = y(!1), k = y(), g = () => {
|
|
32
|
+
S(t.view.viewKey), _.value = !1;
|
|
33
|
+
}, E = () => {
|
|
37
34
|
p?.changeView?.({
|
|
38
35
|
...t.view,
|
|
39
|
-
tableKey:
|
|
36
|
+
tableKey: w,
|
|
40
37
|
isDefault: !0
|
|
41
38
|
});
|
|
42
|
-
},
|
|
39
|
+
}, I = () => {
|
|
43
40
|
p?.removeView?.({
|
|
44
|
-
tableKey:
|
|
41
|
+
tableKey: w,
|
|
45
42
|
viewKey: t.view.viewKey
|
|
46
43
|
});
|
|
47
|
-
},
|
|
48
|
-
const
|
|
44
|
+
}, z = async () => {
|
|
45
|
+
const u = await k.value?.validate?.();
|
|
49
46
|
p?.changeView?.({
|
|
50
47
|
...t.view,
|
|
51
|
-
tableKey:
|
|
52
|
-
viewName:
|
|
48
|
+
tableKey: w,
|
|
49
|
+
viewName: u?.viewName || t.view.viewName
|
|
53
50
|
}), s.value = !1;
|
|
54
51
|
};
|
|
55
52
|
return $(
|
|
56
53
|
() => _.value,
|
|
57
|
-
(
|
|
58
|
-
|
|
54
|
+
(u) => {
|
|
55
|
+
u && (s.value = !1);
|
|
59
56
|
}
|
|
60
|
-
), (
|
|
57
|
+
), (u, a) => s.value === !1 ? (m(), l("div", {
|
|
61
58
|
key: 0,
|
|
62
|
-
class:
|
|
63
|
-
[e(
|
|
64
|
-
[e(
|
|
59
|
+
class: V({
|
|
60
|
+
[e(v)("menu-list-content")]: !0,
|
|
61
|
+
[e(v)("menu-list-content-active")]: t.view?.viewKey === e(D),
|
|
65
62
|
hashId: e(d)
|
|
66
63
|
}),
|
|
67
|
-
onClick:
|
|
64
|
+
onClick: g
|
|
68
65
|
}, [
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
o("div", U, [
|
|
67
|
+
o("span", {
|
|
71
68
|
title: t.view?.viewName
|
|
72
|
-
},
|
|
69
|
+
}, c(t.view?.viewName), 9, W)
|
|
73
70
|
]),
|
|
74
|
-
t.view?.viewKey !== e(
|
|
75
|
-
i(e(
|
|
71
|
+
t.view?.viewKey !== e(h) && t.view?.isDefault ? (m(), l("div", q, [
|
|
72
|
+
i(e(O), {
|
|
76
73
|
text: e(n)("ap.apView.default"),
|
|
77
74
|
size: "small",
|
|
78
|
-
color:
|
|
75
|
+
color: e(K).colorPrimary
|
|
79
76
|
}, null, 8, ["text", "color"])
|
|
80
|
-
])) :
|
|
81
|
-
t.view?.viewKey !== e(
|
|
77
|
+
])) : f("", !0),
|
|
78
|
+
t.view?.viewKey !== e(h) ? (m(), l("div", {
|
|
82
79
|
key: 1,
|
|
83
80
|
class: "menu-list-content-action",
|
|
84
|
-
onClick:
|
|
81
|
+
onClick: a[1] || (a[1] = b(() => {
|
|
85
82
|
}, ["stop"]))
|
|
86
83
|
}, [
|
|
87
|
-
i(e(
|
|
84
|
+
i(e(C), { size: 8 }, {
|
|
88
85
|
default: r(() => [
|
|
89
|
-
|
|
86
|
+
o("div", {
|
|
90
87
|
class: "menu-list-content-action-text",
|
|
91
|
-
onClick:
|
|
92
|
-
},
|
|
93
|
-
t.view?.isDefault ?
|
|
88
|
+
onClick: a[0] || (a[0] = (R) => s.value = !0)
|
|
89
|
+
}, c(e(n)("ap.apView.rename")), 1),
|
|
90
|
+
t.view?.isDefault ? f("", !0) : (m(), l("div", {
|
|
94
91
|
key: 0,
|
|
95
92
|
class: "menu-list-content-action-text",
|
|
96
|
-
onClick:
|
|
97
|
-
},
|
|
98
|
-
|
|
93
|
+
onClick: E
|
|
94
|
+
}, c(e(n)("ap.apView.setDefault")), 1)),
|
|
95
|
+
o("div", G, [
|
|
99
96
|
i(e(F), {
|
|
100
97
|
title: e(n)("ap.apView.deleteTip"),
|
|
101
98
|
"ok-text": e(n)("ap.apView.ok"),
|
|
102
|
-
onConfirm:
|
|
99
|
+
onConfirm: I
|
|
103
100
|
}, {
|
|
104
101
|
default: r(() => [
|
|
105
102
|
i(L)
|
|
@@ -110,10 +107,10 @@ const U = { class: "menu-list-content-name" }, W = ["title"], q = {
|
|
|
110
107
|
]),
|
|
111
108
|
_: 1
|
|
112
109
|
})
|
|
113
|
-
])) :
|
|
114
|
-
], 2)) : (
|
|
110
|
+
])) : f("", !0)
|
|
111
|
+
], 2)) : (m(), l("div", {
|
|
115
112
|
key: 1,
|
|
116
|
-
class:
|
|
113
|
+
class: V([e(v)("menu-list-content"), e(v)("menu-list-content-edit"), e(d)])
|
|
117
114
|
}, [
|
|
118
115
|
i(x, {
|
|
119
116
|
ref_key: "formRef",
|
|
@@ -123,23 +120,23 @@ const U = { class: "menu-list-content-name" }, W = ["title"], q = {
|
|
|
123
120
|
}
|
|
124
121
|
}, {
|
|
125
122
|
default: r(() => [
|
|
126
|
-
|
|
127
|
-
i(e(
|
|
123
|
+
o("div", H, [
|
|
124
|
+
i(e(C), { size: 8 }, {
|
|
128
125
|
default: r(() => [
|
|
129
126
|
i(x.FormItem, { name: "viewName" }, {
|
|
130
127
|
default: r(() => [
|
|
131
|
-
i(e(
|
|
128
|
+
i(e(M).Text, { maxlength: 20 })
|
|
132
129
|
]),
|
|
133
130
|
_: 1
|
|
134
131
|
}),
|
|
135
|
-
|
|
132
|
+
o("div", {
|
|
136
133
|
class: "menu-list-content-action-text",
|
|
137
|
-
onClick:
|
|
138
|
-
},
|
|
139
|
-
|
|
134
|
+
onClick: z
|
|
135
|
+
}, c(e(n)("ap.apView.save")), 1),
|
|
136
|
+
o("div", {
|
|
140
137
|
class: "menu-list-content-action-text",
|
|
141
|
-
onClick:
|
|
142
|
-
},
|
|
138
|
+
onClick: a[2] || (a[2] = (R) => s.value = !1)
|
|
139
|
+
}, c(e(n)("ap.apView.cancel")), 1)
|
|
143
140
|
]),
|
|
144
141
|
_: 1
|
|
145
142
|
})
|
|
@@ -1,87 +1,82 @@
|
|
|
1
|
-
import { resetComponent as
|
|
2
|
-
import { genComponentStyleHook as
|
|
3
|
-
const
|
|
1
|
+
import { resetComponent as o } from "../../style/index.mjs";
|
|
2
|
+
import { genComponentStyleHook as t } from "../../utils/cssinjs/index.mjs";
|
|
3
|
+
const s = (e) => {
|
|
4
4
|
const {
|
|
5
|
-
componentCls:
|
|
6
|
-
checkCardDisabledOutlineColor:
|
|
7
|
-
checkCardIndicatorSize:
|
|
8
|
-
checkCardOutlineWidth:
|
|
9
|
-
checkCardIndicatorOffset:
|
|
10
|
-
} =
|
|
5
|
+
componentCls: i,
|
|
6
|
+
checkCardDisabledOutlineColor: c,
|
|
7
|
+
checkCardIndicatorSize: d,
|
|
8
|
+
checkCardOutlineWidth: r,
|
|
9
|
+
checkCardIndicatorOffset: l
|
|
10
|
+
} = e, a = e.calc(d).mul(2).equal();
|
|
11
11
|
return {
|
|
12
|
-
[`${
|
|
13
|
-
...
|
|
14
|
-
borderRadius:
|
|
12
|
+
[`${i}`]: {
|
|
13
|
+
...o(e),
|
|
14
|
+
borderRadius: e.borderRadius,
|
|
15
15
|
position: "relative",
|
|
16
16
|
"&--disabled": {
|
|
17
|
-
backgroundColor:
|
|
17
|
+
backgroundColor: e.checkCardDisabledBg,
|
|
18
18
|
cursor: "not-allowed !important"
|
|
19
19
|
},
|
|
20
20
|
"&--bordered": {
|
|
21
|
-
outline: `1px solid ${
|
|
21
|
+
outline: `1px solid ${e.borderColorBase}`
|
|
22
22
|
},
|
|
23
|
-
[`&:hover:not(${
|
|
23
|
+
[`&:hover:not(${i}--disabled)`]: {
|
|
24
24
|
cursor: "pointer",
|
|
25
|
-
outline: `1px solid ${
|
|
25
|
+
outline: `1px solid ${e.colorPrimary}`
|
|
26
26
|
},
|
|
27
27
|
"&::after": {
|
|
28
28
|
content: '""',
|
|
29
29
|
position: "absolute",
|
|
30
30
|
width: 0,
|
|
31
31
|
height: 0,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
borderRadius: r.borderRadius
|
|
32
|
+
insetBlockStart: 0,
|
|
33
|
+
insetInlineEnd: 0,
|
|
34
|
+
clipPath: "polygon(100% 0, 100% 100%, 0 0)",
|
|
35
|
+
background: e.colorPrimary,
|
|
36
|
+
borderRadius: e.calc(e.borderRadius).add("2px").equal()
|
|
38
37
|
},
|
|
39
38
|
"&--checked": {
|
|
40
|
-
outline: `${
|
|
41
|
-
[`&:hover:not(${
|
|
42
|
-
outline: `${
|
|
39
|
+
outline: `${r} solid ${e.colorPrimary}`,
|
|
40
|
+
[`&:hover:not(${i}--disabled)`]: {
|
|
41
|
+
outline: `${r} solid ${e.colorPrimary}`
|
|
43
42
|
},
|
|
44
43
|
"&::after": {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
insetInlineEnd: i,
|
|
51
|
-
transition: "all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)"
|
|
44
|
+
width: a,
|
|
45
|
+
height: a,
|
|
46
|
+
insetBlockStart: l,
|
|
47
|
+
insetInlineEnd: l,
|
|
48
|
+
transition: "width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), height 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), inset 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)"
|
|
52
49
|
},
|
|
53
|
-
[`&${
|
|
54
|
-
outlineColor:
|
|
50
|
+
[`&${i}--disabled`]: {
|
|
51
|
+
outlineColor: c,
|
|
55
52
|
"&::after": {
|
|
56
|
-
|
|
57
|
-
borderInlineStart: `${e} solid transparent`,
|
|
58
|
-
borderBlockEnd: `${e} solid transparent`
|
|
53
|
+
backgroundColor: c
|
|
59
54
|
}
|
|
60
55
|
}
|
|
61
56
|
},
|
|
62
57
|
"&--middle": {
|
|
63
|
-
padding:
|
|
58
|
+
padding: e.spaceLG
|
|
64
59
|
},
|
|
65
60
|
"&--small": {
|
|
66
|
-
padding: `${
|
|
61
|
+
padding: `${e.spaceSM} ${e.spaceLG}`
|
|
67
62
|
},
|
|
68
|
-
[`${
|
|
69
|
-
...
|
|
70
|
-
marginBottom:
|
|
63
|
+
[`${i}__title`]: {
|
|
64
|
+
...o(e),
|
|
65
|
+
marginBottom: e.spaceXS,
|
|
71
66
|
color: "#333",
|
|
72
67
|
fontWeight: "bold",
|
|
73
68
|
"&--disabled": {
|
|
74
|
-
color:
|
|
69
|
+
color: e.textColor4
|
|
75
70
|
}
|
|
76
71
|
},
|
|
77
|
-
[`${
|
|
78
|
-
...
|
|
72
|
+
[`${i}__content`]: {
|
|
73
|
+
...o(e),
|
|
79
74
|
color: "#333",
|
|
80
75
|
"&--disabled": {
|
|
81
|
-
color:
|
|
76
|
+
color: e.textColor4
|
|
82
77
|
}
|
|
83
78
|
},
|
|
84
|
-
[`${
|
|
79
|
+
[`${i}__checked-icon`]: {
|
|
85
80
|
position: "absolute",
|
|
86
81
|
top: 0,
|
|
87
82
|
right: 0,
|
|
@@ -89,15 +84,15 @@ const c = (r) => {
|
|
|
89
84
|
lineHeight: 1,
|
|
90
85
|
userSelect: "none",
|
|
91
86
|
"& > img": {
|
|
92
|
-
width:
|
|
87
|
+
width: e.calc(d).sub(r).equal(),
|
|
93
88
|
verticalAlign: "top"
|
|
94
89
|
}
|
|
95
90
|
}
|
|
96
91
|
}
|
|
97
92
|
};
|
|
98
|
-
},
|
|
93
|
+
}, h = t(
|
|
99
94
|
"CheckCard",
|
|
100
|
-
(
|
|
95
|
+
(e) => [s(e)],
|
|
101
96
|
{
|
|
102
97
|
checkCardDisabledBg: "#F9F9FA",
|
|
103
98
|
checkCardDisabledOutlineColor: "#E9EDF3",
|
|
@@ -107,5 +102,5 @@ const c = (r) => {
|
|
|
107
102
|
}
|
|
108
103
|
);
|
|
109
104
|
export {
|
|
110
|
-
|
|
105
|
+
h as default
|
|
111
106
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { ContextToken } from '../../design-token/interface';
|
|
3
3
|
type DesignTokenContextType = {
|
|
4
|
-
token: Ref<
|
|
4
|
+
token: Ref<ContextToken>;
|
|
5
5
|
rootCls: Ref<string | undefined>;
|
|
6
6
|
};
|
|
7
7
|
export declare const designTokenContextKey: InjectionKey<DesignTokenContextType>;
|
|
@@ -13,14 +13,16 @@ const o = {
|
|
|
13
13
|
colorErrorDisabled: "#ffdbdc",
|
|
14
14
|
colorWarn: "#ffa940",
|
|
15
15
|
colorWarnDisabled: "#ffeed9",
|
|
16
|
-
textColor1: "#
|
|
17
|
-
textColor2: "#
|
|
16
|
+
textColor1: "#182948",
|
|
17
|
+
textColor2: "#526a90",
|
|
18
18
|
textColor3: "#8896b0",
|
|
19
19
|
textColor4: "#abb7cc",
|
|
20
20
|
colorBg1: "#e9edf3",
|
|
21
21
|
colorBg2: "#f6f9fa",
|
|
22
22
|
colorBg3: "#f3f5f8",
|
|
23
23
|
colorBgDisabled: "#f2f6f9",
|
|
24
|
+
colorBgLayout: "#f2f6f9",
|
|
25
|
+
colorBgControl: "#F5F9FF",
|
|
24
26
|
fontSizeSM: 10,
|
|
25
27
|
fontSize: 12,
|
|
26
28
|
fontSizeLG: 14,
|