@guodun/antdv 1.6.1 → 1.6.2
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/dist/es/components/dept-selector/src/DeptSelector.vue.mjs +23 -30
- package/dist/es/components/pro-selector/src/ProUserSelector.vue.mjs +22 -29
- package/dist/es/components/pro-selector-group/src/index.vue.mjs +23 -28
- package/dist/es/components/pro-selector-group/src/utils/index.mjs +2 -2
- package/dist/es/components/role-selector/src/RoleSelector.vue.mjs +21 -28
- package/dist/es/components/selector-core/components/SelectionChips.mjs +5 -0
- package/dist/es/components/selector-core/components/SelectionChips.vue.mjs +114 -0
- package/dist/lib/components/dept-selector/src/DeptSelector.vue.cjs +1 -1
- package/dist/lib/components/pro-selector/src/ProUserSelector.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/index.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/utils/index.cjs +1 -1
- package/dist/lib/components/role-selector/src/RoleSelector.vue.cjs +1 -1
- package/dist/lib/components/selector-core/components/SelectionChips.cjs +1 -0
- package/dist/lib/components/selector-core/components/SelectionChips.vue.cjs +1 -0
- package/dist/theme/icon.css +1 -1
- package/dist/theme/index.css +1 -1
- package/dist/theme/pro-dynamic-tags.css +1 -1
- package/dist/theme/selector-core.css +1 -1
- package/dist/types/components/pro-dynamic-tags/src/index.vue.d.ts +2 -2
- package/dist/types/components/pro-selector-group/src/utils/index.d.ts +1 -1
- package/dist/types/components/selector-core/components/SelectionChips.vue.d.ts +16 -0
- package/package.json +5 -5
- package/dist/theme/dept-selector.css +0 -1
- package/dist/theme/pro-selector-group.css +0 -1
- package/dist/theme/role-selector.css +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import e from "../../
|
|
2
|
-
import
|
|
3
|
-
import i from "../../selector-core/components/
|
|
1
|
+
import { defaultFieldNames as e, serializeDepartments as t, text as n } from "../../selector-core/model.mjs";
|
|
2
|
+
import r from "../../selector-core/components/SelectorDialog.mjs";
|
|
3
|
+
import i from "../../selector-core/components/SelectionChips.mjs";
|
|
4
4
|
import { deptSelectorEmits as a, deptSelectorProps as o } from "./types.mjs";
|
|
5
5
|
import { computed as s, createBlock as c, createCommentVNode as l, createElementVNode as u, createVNode as d, defineComponent as f, openBlock as p, renderSlot as m, unref as h, useAttrs as g, withCtx as _ } from "vue";
|
|
6
6
|
import { FormItemRest as v } from "ant-design-vue";
|
|
@@ -11,16 +11,12 @@ var y = { class: "gd-ant-dept-selector" }, b = /* @__PURE__ */ f({
|
|
|
11
11
|
props: o,
|
|
12
12
|
emits: a,
|
|
13
13
|
setup(a, { emit: o }) {
|
|
14
|
-
let f = a, b = o, x = g(), S = s(() => f.isBuiltInRequest ?
|
|
14
|
+
let f = a, b = o, x = g(), S = s(() => f.isBuiltInRequest ? e : f.fieldNames), C = s(() => (Array.isArray(f.modelValue) ? f.modelValue : f.modelValue ? [f.modelValue] : []).map((e) => ({
|
|
15
15
|
type: "dept",
|
|
16
|
-
value:
|
|
17
|
-
label:
|
|
16
|
+
value: n(e[S.value.key]),
|
|
17
|
+
label: n(e[S.value.title]),
|
|
18
18
|
raw: e
|
|
19
|
-
})).filter((e) => e.value)), w = s(() =>
|
|
20
|
-
label: e.label,
|
|
21
|
-
value: e.value,
|
|
22
|
-
closable: !0
|
|
23
|
-
}))), T = s(() => {
|
|
19
|
+
})).filter((e) => e.value)), w = s(() => {
|
|
24
20
|
let { modalProps: e, ...t } = x;
|
|
25
21
|
return {
|
|
26
22
|
cancelText: "取消",
|
|
@@ -29,34 +25,31 @@ var y = { class: "gd-ant-dept-selector" }, b = /* @__PURE__ */ f({
|
|
|
29
25
|
...e || {}
|
|
30
26
|
};
|
|
31
27
|
});
|
|
32
|
-
function
|
|
28
|
+
function T(e) {
|
|
33
29
|
b("update:visible", e === !0);
|
|
34
30
|
}
|
|
35
|
-
function
|
|
36
|
-
let { values:
|
|
31
|
+
function E(e) {
|
|
32
|
+
let { values: n, confirm: r } = t(e, S.value), i = f.type === "radio" ? n[0] || null : n;
|
|
37
33
|
b("update:visible", !1), b("update:modelValue", i), b("confirm", r);
|
|
38
34
|
}
|
|
39
|
-
function
|
|
35
|
+
function D() {
|
|
40
36
|
b("update:visible", !1), b("cancel");
|
|
41
37
|
}
|
|
42
|
-
function
|
|
38
|
+
function O(e) {
|
|
43
39
|
if (f.type === "radio") {
|
|
44
40
|
b("update:modelValue", null);
|
|
45
41
|
return;
|
|
46
42
|
}
|
|
47
43
|
b("update:modelValue", (Array.isArray(f.modelValue) ? f.modelValue : []).filter((t) => String(t[S.value.key]) !== e));
|
|
48
44
|
}
|
|
49
|
-
return (
|
|
50
|
-
default: _(() => [u("div", y, [f.hideSlot ? l("", !0) : m(
|
|
51
|
-
|
|
52
|
-
"max-count": f.maxVisibleCount,
|
|
53
|
-
"show-add": "",
|
|
45
|
+
return (e, t) => (p(), c(h(v), null, {
|
|
46
|
+
default: _(() => [u("div", y, [f.hideSlot ? l("", !0) : m(e.$slots, "default", { key: 0 }, () => [d(i, {
|
|
47
|
+
items: C.value,
|
|
48
|
+
"max-visible-count": f.maxVisibleCount,
|
|
54
49
|
"add-text": "选择部门",
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
onClose: n[1] ||= (e) => k(String(e.value))
|
|
59
|
-
}, null, 8, ["model-value", "max-count"])]), d(i, {
|
|
50
|
+
onAdd: t[0] ||= (e) => b("update:visible", !0),
|
|
51
|
+
onRemove: t[1] ||= (e) => O(e.value)
|
|
52
|
+
}, null, 8, ["items", "max-visible-count"])]), d(r, {
|
|
60
53
|
open: f.visible,
|
|
61
54
|
mode: "dept",
|
|
62
55
|
selected: C.value,
|
|
@@ -67,10 +60,10 @@ var y = { class: "gd-ant-dept-selector" }, b = /* @__PURE__ */ f({
|
|
|
67
60
|
http: f.http,
|
|
68
61
|
prefix: f.prefix,
|
|
69
62
|
"is-built-in-request": f.isBuiltInRequest,
|
|
70
|
-
"modal-props":
|
|
71
|
-
"onUpdate:open":
|
|
72
|
-
onConfirm:
|
|
73
|
-
onCancel:
|
|
63
|
+
"modal-props": w.value,
|
|
64
|
+
"onUpdate:open": T,
|
|
65
|
+
onConfirm: E,
|
|
66
|
+
onCancel: D
|
|
74
67
|
}, null, 8, [
|
|
75
68
|
"open",
|
|
76
69
|
"selected",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import e from "../../
|
|
2
|
-
import
|
|
3
|
-
import r from "../../selector-core/components/
|
|
1
|
+
import { serializeUsers as e, text as t } from "../../selector-core/model.mjs";
|
|
2
|
+
import n from "../../selector-core/components/SelectorDialog.mjs";
|
|
3
|
+
import r from "../../selector-core/components/SelectionChips.mjs";
|
|
4
4
|
import { UserSelectorProps as i, userSelectorEmits as a } from "./types.mjs";
|
|
5
5
|
import { computed as o, createBlock as s, createCommentVNode as c, createElementVNode as l, createVNode as u, defineComponent as d, openBlock as f, renderSlot as p, unref as m, useAttrs as h, withCtx as g } from "vue";
|
|
6
6
|
import { FormItemRest as _ } from "ant-design-vue";
|
|
@@ -13,7 +13,7 @@ var v = { class: "gd-ant-pro-user-selector" }, y = /* @__PURE__ */ d({
|
|
|
13
13
|
setup(i, { expose: a, emit: d }) {
|
|
14
14
|
let y = i, b = d, x = h(), S = o(() => y.modelValue.map((e) => ({
|
|
15
15
|
type: "user",
|
|
16
|
-
value:
|
|
16
|
+
value: t(e.id),
|
|
17
17
|
label: e.realName,
|
|
18
18
|
avatar: e.avatar,
|
|
19
19
|
raw: {
|
|
@@ -21,11 +21,7 @@ var v = { class: "gd-ant-pro-user-selector" }, y = /* @__PURE__ */ d({
|
|
|
21
21
|
id: e.id,
|
|
22
22
|
userId: e.id
|
|
23
23
|
}
|
|
24
|
-
}))), C = o(() =>
|
|
25
|
-
label: e.realName,
|
|
26
|
-
value: e.id,
|
|
27
|
-
closable: !0
|
|
28
|
-
}))), w = o(() => {
|
|
24
|
+
}))), C = o(() => {
|
|
29
25
|
let { modalProps: e, ...t } = x;
|
|
30
26
|
return {
|
|
31
27
|
cancelText: "取消",
|
|
@@ -34,30 +30,27 @@ var v = { class: "gd-ant-pro-user-selector" }, y = /* @__PURE__ */ d({
|
|
|
34
30
|
...e || {}
|
|
35
31
|
};
|
|
36
32
|
});
|
|
37
|
-
function
|
|
33
|
+
function w(e) {
|
|
38
34
|
b("update:visible", e === !0);
|
|
39
35
|
}
|
|
40
|
-
function
|
|
41
|
-
let n = t
|
|
36
|
+
function T(t) {
|
|
37
|
+
let n = e(t);
|
|
42
38
|
b("update:visible", !1), b("update:modelValue", n), b("confirm", n);
|
|
43
39
|
}
|
|
44
|
-
function
|
|
40
|
+
function E() {
|
|
45
41
|
b("update:visible", !1), b("cancel");
|
|
46
42
|
}
|
|
47
|
-
function
|
|
43
|
+
function D(e) {
|
|
48
44
|
b("update:modelValue", y.modelValue.filter((t) => t.id !== e)), b("delete-user", e);
|
|
49
45
|
}
|
|
50
|
-
return a({ deleteCheckedUser:
|
|
51
|
-
default: g(() => [l("div", v, [y.hideSlot ? c("", !0) : p(
|
|
52
|
-
|
|
53
|
-
"max-count": y.maxVisibleCount,
|
|
54
|
-
"show-add": "",
|
|
46
|
+
return a({ deleteCheckedUser: D }), (e, t) => (f(), s(m(_), null, {
|
|
47
|
+
default: g(() => [l("div", v, [y.hideSlot ? c("", !0) : p(e.$slots, "default", { key: 0 }, () => [u(r, {
|
|
48
|
+
items: S.value,
|
|
49
|
+
"max-visible-count": y.maxVisibleCount,
|
|
55
50
|
"add-text": "选择用户",
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
onClose: n[1] ||= (e) => O(String(e.value))
|
|
60
|
-
}, null, 8, ["model-value", "max-count"])]), u(r, {
|
|
51
|
+
onAdd: t[0] ||= (e) => b("update:visible", !0),
|
|
52
|
+
onRemove: t[1] ||= (e) => D(e.value)
|
|
53
|
+
}, null, 8, ["items", "max-visible-count"])]), u(n, {
|
|
61
54
|
open: y.visible,
|
|
62
55
|
mode: "user",
|
|
63
56
|
selected: S.value,
|
|
@@ -69,11 +62,11 @@ var v = { class: "gd-ant-pro-user-selector" }, y = /* @__PURE__ */ d({
|
|
|
69
62
|
prefix: y.prefix,
|
|
70
63
|
"init-data": y.initData,
|
|
71
64
|
"is-built-in-request": y.isBuiltInRequest,
|
|
72
|
-
"modal-props":
|
|
73
|
-
"onUpdate:open":
|
|
74
|
-
"onUpdate:variant":
|
|
75
|
-
onConfirm:
|
|
76
|
-
onCancel:
|
|
65
|
+
"modal-props": C.value,
|
|
66
|
+
"onUpdate:open": w,
|
|
67
|
+
"onUpdate:variant": t[2] ||= (e) => b("update:variant", e),
|
|
68
|
+
onConfirm: T,
|
|
69
|
+
onCancel: E
|
|
77
70
|
}, null, 8, [
|
|
78
71
|
"open",
|
|
79
72
|
"selected",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import e from "../../
|
|
2
|
-
import
|
|
3
|
-
import r from "../../selector-core/components/
|
|
1
|
+
import { serializeGroup as e, text as t } from "../../selector-core/model.mjs";
|
|
2
|
+
import n from "../../selector-core/components/SelectorDialog.mjs";
|
|
3
|
+
import r from "../../selector-core/components/SelectionChips.mjs";
|
|
4
4
|
import { normalizeSelectorOptions as i, removeSelectorOption as a } from "./utils/index.mjs";
|
|
5
5
|
import { computed as o, createBlock as s, createCommentVNode as c, createElementVNode as l, createVNode as u, defineComponent as d, mergeModels as f, openBlock as p, renderSlot as m, unref as h, useAttrs as g, useModel as _, withCtx as v } from "vue";
|
|
6
6
|
import { FormItemRest as y } from "ant-design-vue";
|
|
@@ -43,14 +43,10 @@ var b = { class: "gd-ant-pro-selector-group" }, x = /* @__PURE__ */ d({
|
|
|
43
43
|
setup(d, { emit: f }) {
|
|
44
44
|
let x = d, S = f, C = g(), w = _(d, "modelValue"), T = _(d, "visible"), E = o(() => w.value.map((e) => ({
|
|
45
45
|
type: e.type || x.type || "dept",
|
|
46
|
-
value:
|
|
46
|
+
value: t(e.value),
|
|
47
47
|
label: e.label || "",
|
|
48
48
|
raw: e
|
|
49
|
-
}))), D = o(() =>
|
|
50
|
-
label: e.label || "",
|
|
51
|
-
value: e.value,
|
|
52
|
-
type: e.type
|
|
53
|
-
}))), O = o(() => {
|
|
49
|
+
}))), D = o(() => {
|
|
54
50
|
let { modalProps: e, ...t } = C;
|
|
55
51
|
return {
|
|
56
52
|
cancelText: "取消",
|
|
@@ -59,24 +55,23 @@ var b = { class: "gd-ant-pro-selector-group" }, x = /* @__PURE__ */ d({
|
|
|
59
55
|
...e || {}
|
|
60
56
|
};
|
|
61
57
|
});
|
|
62
|
-
function
|
|
63
|
-
w.value = i(t
|
|
58
|
+
function O(t) {
|
|
59
|
+
w.value = i(e(t)), T.value = !1, S("confirm");
|
|
64
60
|
}
|
|
65
|
-
function
|
|
61
|
+
function k() {
|
|
66
62
|
T.value = !1, S("cancel");
|
|
67
63
|
}
|
|
68
|
-
function
|
|
69
|
-
w.value = a(w.value,
|
|
64
|
+
function A(e) {
|
|
65
|
+
w.value = a(w.value, e.value, e.type, x.type || "dept");
|
|
70
66
|
}
|
|
71
|
-
return (
|
|
72
|
-
default: v(() => [l("div", b, [x.hideSlot ? c("", !0) : m(
|
|
73
|
-
|
|
74
|
-
"max-count": x.maxVisibleCount ?? 5,
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}, null, 8, ["model-value", "max-count"])]), u(r, {
|
|
67
|
+
return (e, t) => (p(), s(h(y), null, {
|
|
68
|
+
default: v(() => [l("div", b, [x.hideSlot ? c("", !0) : m(e.$slots, "default", { key: 0 }, () => [u(r, {
|
|
69
|
+
items: E.value,
|
|
70
|
+
"max-visible-count": x.maxVisibleCount ?? 5,
|
|
71
|
+
"add-text": "选择对象",
|
|
72
|
+
onAdd: t[0] ||= (e) => T.value = !0,
|
|
73
|
+
onRemove: A
|
|
74
|
+
}, null, 8, ["items", "max-visible-count"])]), u(n, {
|
|
80
75
|
open: T.value,
|
|
81
76
|
mode: "group",
|
|
82
77
|
selected: E.value,
|
|
@@ -85,11 +80,11 @@ var b = { class: "gd-ant-pro-selector-group" }, x = /* @__PURE__ */ d({
|
|
|
85
80
|
title: x.title,
|
|
86
81
|
http: x.http,
|
|
87
82
|
prefix: x.urlPrefix,
|
|
88
|
-
"modal-props":
|
|
89
|
-
"onUpdate:open":
|
|
90
|
-
onConfirm:
|
|
91
|
-
onCancel:
|
|
92
|
-
onChangeTab:
|
|
83
|
+
"modal-props": D.value,
|
|
84
|
+
"onUpdate:open": t[1] ||= (e) => T.value = e === !0,
|
|
85
|
+
onConfirm: O,
|
|
86
|
+
onCancel: k,
|
|
87
|
+
onChangeTab: t[2] ||= (e) => S("changeTab", e)
|
|
93
88
|
}, null, 8, [
|
|
94
89
|
"open",
|
|
95
90
|
"selected",
|
|
@@ -17,8 +17,8 @@ function t(t) {
|
|
|
17
17
|
}]);
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
|
-
function n(e, t, n) {
|
|
21
|
-
return e.filter((e) => !(e.value === t && (
|
|
20
|
+
function n(e, t, n, r) {
|
|
21
|
+
return e.filter((e) => !(e.value === t && (e.type || r) === n));
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
24
|
export { t as normalizeSelectorOptions, n as removeSelectorOption };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import e from "../../
|
|
2
|
-
import
|
|
3
|
-
import r from "../../selector-core/components/
|
|
1
|
+
import { serializeRoles as e, text as t } from "../../selector-core/model.mjs";
|
|
2
|
+
import n from "../../selector-core/components/SelectorDialog.mjs";
|
|
3
|
+
import r from "../../selector-core/components/SelectionChips.mjs";
|
|
4
4
|
import { roleSelectorEmits as i, roleSelectorProps as a } from "./types.mjs";
|
|
5
5
|
import { computed as o, createBlock as s, createCommentVNode as c, createElementVNode as l, createVNode as u, defineComponent as d, openBlock as f, renderSlot as p, unref as m, useAttrs as h, withCtx as g } from "vue";
|
|
6
6
|
import { FormItemRest as _ } from "ant-design-vue";
|
|
@@ -13,14 +13,10 @@ var v = { class: "gd-ant-role-selector" }, y = /* @__PURE__ */ d({
|
|
|
13
13
|
setup(i, { emit: a }) {
|
|
14
14
|
let d = i, y = a, b = h(), x = o(() => (Array.isArray(d.modelValue) ? d.modelValue : d.modelValue ? [d.modelValue] : []).map((e) => ({
|
|
15
15
|
type: "role",
|
|
16
|
-
value:
|
|
16
|
+
value: t(e.value),
|
|
17
17
|
label: e.label || "",
|
|
18
18
|
raw: e
|
|
19
|
-
}))), S = o(() =>
|
|
20
|
-
label: e.label,
|
|
21
|
-
value: e.value,
|
|
22
|
-
closable: !0
|
|
23
|
-
}))), C = o(() => {
|
|
19
|
+
}))), S = o(() => {
|
|
24
20
|
let { modalProps: e, ...t } = b;
|
|
25
21
|
return {
|
|
26
22
|
cancelText: "取消",
|
|
@@ -29,34 +25,31 @@ var v = { class: "gd-ant-role-selector" }, y = /* @__PURE__ */ d({
|
|
|
29
25
|
...e || {}
|
|
30
26
|
};
|
|
31
27
|
});
|
|
32
|
-
function
|
|
28
|
+
function C(e) {
|
|
33
29
|
y("update:visible", e === !0);
|
|
34
30
|
}
|
|
35
|
-
function
|
|
36
|
-
let n = t
|
|
31
|
+
function w(t) {
|
|
32
|
+
let n = e(t), r = d.type === "radio" ? n[0] || null : n;
|
|
37
33
|
y("update:visible", !1), y("update:modelValue", r), y("confirm", n);
|
|
38
34
|
}
|
|
39
|
-
function
|
|
35
|
+
function T() {
|
|
40
36
|
y("update:visible", !1), y("cancel");
|
|
41
37
|
}
|
|
42
|
-
function
|
|
38
|
+
function E(e) {
|
|
43
39
|
if (d.type === "radio") {
|
|
44
40
|
y("update:modelValue", null);
|
|
45
41
|
return;
|
|
46
42
|
}
|
|
47
43
|
y("update:modelValue", (Array.isArray(d.modelValue) ? d.modelValue : []).filter((t) => t.value !== e));
|
|
48
44
|
}
|
|
49
|
-
return (
|
|
50
|
-
default: g(() => [l("div", v, [d.hideSlot ? c("", !0) : p(
|
|
51
|
-
|
|
52
|
-
"max-count": d.maxVisibleCount,
|
|
53
|
-
"show-add": "",
|
|
45
|
+
return (e, t) => (f(), s(m(_), null, {
|
|
46
|
+
default: g(() => [l("div", v, [d.hideSlot ? c("", !0) : p(e.$slots, "default", { key: 0 }, () => [u(r, {
|
|
47
|
+
items: x.value,
|
|
48
|
+
"max-visible-count": d.maxVisibleCount,
|
|
54
49
|
"add-text": "选择角色",
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
onClose: n[1] ||= (e) => D(String(e.value))
|
|
59
|
-
}, null, 8, ["model-value", "max-count"])]), u(r, {
|
|
50
|
+
onAdd: t[0] ||= (e) => y("update:visible", !0),
|
|
51
|
+
onRemove: t[1] ||= (e) => E(e.value)
|
|
52
|
+
}, null, 8, ["items", "max-visible-count"])]), u(n, {
|
|
60
53
|
open: d.visible,
|
|
61
54
|
mode: "role",
|
|
62
55
|
selected: x.value,
|
|
@@ -67,10 +60,10 @@ var v = { class: "gd-ant-role-selector" }, y = /* @__PURE__ */ d({
|
|
|
67
60
|
prefix: d.prefix,
|
|
68
61
|
"is-built-in-request": d.isBuiltInRequest,
|
|
69
62
|
"value-field": d.valueField,
|
|
70
|
-
"modal-props":
|
|
71
|
-
"onUpdate:open":
|
|
72
|
-
onConfirm:
|
|
73
|
-
onCancel:
|
|
63
|
+
"modal-props": S.value,
|
|
64
|
+
"onUpdate:open": C,
|
|
65
|
+
onConfirm: w,
|
|
66
|
+
onCancel: T
|
|
74
67
|
}, null, 8, [
|
|
75
68
|
"open",
|
|
76
69
|
"selected",
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import e from "../../icon/src/icon.mjs";
|
|
2
|
+
import { entityKey as t } from "../model.mjs";
|
|
3
|
+
import n from "../../pro-user-avatar/src/index.mjs";
|
|
4
|
+
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, renderList as p, toDisplayString as m, unref as h, withCtx as g, withModifiers as _ } from "vue";
|
|
5
|
+
import { Popover as v } from "ant-design-vue";
|
|
6
|
+
//#region src/components/selector-core/components/SelectionChips.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var y = { class: "gd-ant-selector__confirmed" }, b = { class: "gd-ant-selector__confirmed-chips" }, x = ["title"], S = ["aria-label", "onClick"], C = { class: "gd-ant-selector__confirmed-actions" }, w = {
|
|
8
|
+
class: "gd-ant-selector__confirmed-popover-content",
|
|
9
|
+
"aria-label": "隐藏的已选择项"
|
|
10
|
+
}, T = ["title"], E = ["aria-label", "onClick"], D = ["title", "aria-label"], O = ["aria-label"], k = /* @__PURE__ */ u({
|
|
11
|
+
__name: "SelectionChips",
|
|
12
|
+
props: {
|
|
13
|
+
items: {},
|
|
14
|
+
maxVisibleCount: { default: 5 },
|
|
15
|
+
addText: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["add", "remove"],
|
|
18
|
+
setup(u) {
|
|
19
|
+
let k = u, A = i(() => {
|
|
20
|
+
let e = k.maxVisibleCount;
|
|
21
|
+
return Number.isFinite(e) && e >= 0 ? Math.floor(e) : 5;
|
|
22
|
+
}), j = i(() => k.items.slice(0, A.value)), M = i(() => k.items.slice(A.value)), N = i(() => `另有 ${M.value.length} 项:${M.value.map((e) => e.label || "未命名").join("、")}`);
|
|
23
|
+
return (i, k) => (f(), s("div", y, [c("div", b, [(f(!0), s(r, null, p(j.value, (r) => (f(), s("div", {
|
|
24
|
+
key: h(t)(r),
|
|
25
|
+
class: d(["gd-ant-selector__confirmed-chip", `gd-ant-selector__confirmed-chip--${r.type}`])
|
|
26
|
+
}, [
|
|
27
|
+
r.type === "user" ? (f(), a(n, {
|
|
28
|
+
key: 0,
|
|
29
|
+
name: r.label,
|
|
30
|
+
avatar: r.avatar,
|
|
31
|
+
preview: !1,
|
|
32
|
+
size: "small"
|
|
33
|
+
}, null, 8, ["name", "avatar"])) : (f(), s("span", {
|
|
34
|
+
key: 1,
|
|
35
|
+
class: d(["gd-ant-selector__confirmed-chip-icon", `gd-ant-selector__confirmed-chip-icon--${r.type}`])
|
|
36
|
+
}, [l(e, {
|
|
37
|
+
name: r.type === "dept" ? "bumen" : "a-jiaoseguanli2",
|
|
38
|
+
size: 14,
|
|
39
|
+
"aria-hidden": "true"
|
|
40
|
+
}, null, 8, ["name"])], 2)),
|
|
41
|
+
c("span", {
|
|
42
|
+
class: "gd-ant-selector__confirmed-chip-label",
|
|
43
|
+
title: r.label || "未命名"
|
|
44
|
+
}, m(r.label || "未命名"), 9, x),
|
|
45
|
+
c("button", {
|
|
46
|
+
type: "button",
|
|
47
|
+
class: "gd-ant-selector__confirmed-chip-remove",
|
|
48
|
+
"aria-label": `移除已选择的${r.label || "未命名"}`,
|
|
49
|
+
onClick: _((e) => i.$emit("remove", r), ["stop"])
|
|
50
|
+
}, [l(e, {
|
|
51
|
+
name: "guanbi",
|
|
52
|
+
size: 10,
|
|
53
|
+
"aria-hidden": "true"
|
|
54
|
+
})], 8, S)
|
|
55
|
+
], 2))), 128))]), c("div", C, [M.value.length ? (f(), a(h(v), {
|
|
56
|
+
key: 0,
|
|
57
|
+
placement: "top",
|
|
58
|
+
trigger: "click",
|
|
59
|
+
"overlay-class-name": "gd-ant-selector__confirmed-popover"
|
|
60
|
+
}, {
|
|
61
|
+
content: g(() => [c("div", w, [(f(!0), s(r, null, p(M.value, (r) => (f(), s("div", {
|
|
62
|
+
key: h(t)(r),
|
|
63
|
+
class: d(["gd-ant-selector__confirmed-chip", `gd-ant-selector__confirmed-chip--${r.type}`])
|
|
64
|
+
}, [
|
|
65
|
+
r.type === "user" ? (f(), a(n, {
|
|
66
|
+
key: 0,
|
|
67
|
+
name: r.label,
|
|
68
|
+
avatar: r.avatar,
|
|
69
|
+
preview: !1,
|
|
70
|
+
size: "small"
|
|
71
|
+
}, null, 8, ["name", "avatar"])) : (f(), s("span", {
|
|
72
|
+
key: 1,
|
|
73
|
+
class: d(["gd-ant-selector__confirmed-chip-icon", `gd-ant-selector__confirmed-chip-icon--${r.type}`])
|
|
74
|
+
}, [l(e, {
|
|
75
|
+
name: r.type === "dept" ? "bumen" : "a-jiaoseguanli2",
|
|
76
|
+
size: 14,
|
|
77
|
+
"aria-hidden": "true"
|
|
78
|
+
}, null, 8, ["name"])], 2)),
|
|
79
|
+
c("span", {
|
|
80
|
+
class: "gd-ant-selector__confirmed-chip-label",
|
|
81
|
+
title: r.label || "未命名"
|
|
82
|
+
}, m(r.label || "未命名"), 9, T),
|
|
83
|
+
c("button", {
|
|
84
|
+
type: "button",
|
|
85
|
+
class: "gd-ant-selector__confirmed-chip-remove",
|
|
86
|
+
"aria-label": `移除已选择的${r.label || "未命名"}`,
|
|
87
|
+
onClick: _((e) => i.$emit("remove", r), ["stop"])
|
|
88
|
+
}, [l(e, {
|
|
89
|
+
name: "guanbi",
|
|
90
|
+
size: 10,
|
|
91
|
+
"aria-hidden": "true"
|
|
92
|
+
})], 8, E)
|
|
93
|
+
], 2))), 128))])]),
|
|
94
|
+
default: g(() => [c("button", {
|
|
95
|
+
type: "button",
|
|
96
|
+
class: "gd-ant-selector__confirmed-more",
|
|
97
|
+
title: N.value,
|
|
98
|
+
"aria-label": `查看隐藏的已选择项,共 ${M.value.length} 项`
|
|
99
|
+
}, " +" + m(M.value.length), 9, D)]),
|
|
100
|
+
_: 1
|
|
101
|
+
})) : o("", !0), c("button", {
|
|
102
|
+
type: "button",
|
|
103
|
+
class: "gd-ant-selector__confirmed-add",
|
|
104
|
+
"aria-label": u.items.length ? "继续选择" : u.addText,
|
|
105
|
+
onClick: k[0] ||= (e) => i.$emit("add")
|
|
106
|
+
}, [l(e, {
|
|
107
|
+
name: "plus",
|
|
108
|
+
size: 15,
|
|
109
|
+
"aria-hidden": "true"
|
|
110
|
+
}), c("span", null, m(u.items.length ? "继续选择" : u.addText), 1)], 8, O)])]));
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
//#endregion
|
|
114
|
+
export { k as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../
|
|
1
|
+
require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../selector-core/model.cjs`),t=require(`../../selector-core/components/SelectorDialog.cjs`),n=require(`../../selector-core/components/SelectionChips.cjs`),r=require(`./types.cjs`);let i=require(`vue`),a=require(`ant-design-vue`);var o={class:`gd-ant-dept-selector`},s=(0,i.defineComponent)({name:`KDeptSelector`,__name:`DeptSelector`,props:r.deptSelectorProps,emits:r.deptSelectorEmits,setup(r,{emit:s}){let c=r,l=s,u=(0,i.useAttrs)(),d=(0,i.computed)(()=>c.isBuiltInRequest?e.defaultFieldNames:c.fieldNames),f=(0,i.computed)(()=>(Array.isArray(c.modelValue)?c.modelValue:c.modelValue?[c.modelValue]:[]).map(t=>({type:`dept`,value:e.text(t[d.value.key]),label:e.text(t[d.value.title]),raw:t})).filter(e=>e.value)),p=(0,i.computed)(()=>{let{modalProps:e,...t}=u;return{cancelText:`取消`,okText:`确定`,...t,...e||{}}});function m(e){l(`update:visible`,e===!0)}function h(t){let{values:n,confirm:r}=e.serializeDepartments(t,d.value),i=c.type===`radio`?n[0]||null:n;l(`update:visible`,!1),l(`update:modelValue`,i),l(`confirm`,r)}function g(){l(`update:visible`,!1),l(`cancel`)}function _(e){if(c.type===`radio`){l(`update:modelValue`,null);return}l(`update:modelValue`,(Array.isArray(c.modelValue)?c.modelValue:[]).filter(t=>String(t[d.value.key])!==e))}return(e,r)=>((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.FormItemRest),null,{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,o,[c.hideSlot?(0,i.createCommentVNode)(``,!0):(0,i.renderSlot)(e.$slots,`default`,{key:0},()=>[(0,i.createVNode)(n.default,{items:f.value,"max-visible-count":c.maxVisibleCount,"add-text":`选择部门`,onAdd:r[0]||=e=>l(`update:visible`,!0),onRemove:r[1]||=e=>_(e.value)},null,8,[`items`,`max-visible-count`])]),(0,i.createVNode)(t.default,{open:c.visible,mode:`dept`,selected:f.value,selection:c.type,title:`选择部门`,"tree-data":c.treeData,"field-names":d.value,http:c.http,prefix:c.prefix,"is-built-in-request":c.isBuiltInRequest,"modal-props":p.value,"onUpdate:open":m,onConfirm:h,onCancel:g},null,8,[`open`,`selected`,`selection`,`tree-data`,`field-names`,`http`,`prefix`,`is-built-in-request`,`modal-props`])])]),_:3}))}});exports.default=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../
|
|
1
|
+
require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../selector-core/model.cjs`),t=require(`../../selector-core/components/SelectorDialog.cjs`),n=require(`../../selector-core/components/SelectionChips.cjs`),r=require(`./types.cjs`);let i=require(`vue`),a=require(`ant-design-vue`);var o={class:`gd-ant-pro-user-selector`},s=(0,i.defineComponent)({name:`ProUserSelector`,__name:`ProUserSelector`,props:r.UserSelectorProps,emits:r.userSelectorEmits,setup(r,{expose:s,emit:c}){let l=r,u=c,d=(0,i.useAttrs)(),f=(0,i.computed)(()=>l.modelValue.map(t=>({type:`user`,value:e.text(t.id),label:t.realName,avatar:t.avatar,raw:{...t,id:t.id,userId:t.id}}))),p=(0,i.computed)(()=>{let{modalProps:e,...t}=d;return{cancelText:`取消`,okText:`确定`,...t,...e||{}}});function m(e){u(`update:visible`,e===!0)}function h(t){let n=e.serializeUsers(t);u(`update:visible`,!1),u(`update:modelValue`,n),u(`confirm`,n)}function g(){u(`update:visible`,!1),u(`cancel`)}function _(e){u(`update:modelValue`,l.modelValue.filter(t=>t.id!==e)),u(`delete-user`,e)}return s({deleteCheckedUser:_}),(e,r)=>((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.FormItemRest),null,{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,o,[l.hideSlot?(0,i.createCommentVNode)(``,!0):(0,i.renderSlot)(e.$slots,`default`,{key:0},()=>[(0,i.createVNode)(n.default,{items:f.value,"max-visible-count":l.maxVisibleCount,"add-text":`选择用户`,onAdd:r[0]||=e=>u(`update:visible`,!0),onRemove:r[1]||=e=>_(e.value)},null,8,[`items`,`max-visible-count`])]),(0,i.createVNode)(t.default,{open:l.visible,mode:`user`,selected:f.value,selection:l.type,"max-count":l.maxCount,variant:l.variant,title:l.title||`选择联系人`,http:l.http,prefix:l.prefix,"init-data":l.initData,"is-built-in-request":l.isBuiltInRequest,"modal-props":p.value,"onUpdate:open":m,"onUpdate:variant":r[2]||=e=>u(`update:variant`,e),onConfirm:h,onCancel:g},null,8,[`open`,`selected`,`selection`,`max-count`,`variant`,`title`,`http`,`prefix`,`init-data`,`is-built-in-request`,`modal-props`])])]),_:3}))}});exports.default=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../
|
|
1
|
+
require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../selector-core/model.cjs`),t=require(`../../selector-core/components/SelectorDialog.cjs`),n=require(`../../selector-core/components/SelectionChips.cjs`),r=require(`./utils/index.cjs`);let i=require(`vue`),a=require(`ant-design-vue`);var o={class:`gd-ant-pro-selector-group`},s=(0,i.defineComponent)({name:`ProSelectorGroup`,__name:`index`,props:(0,i.mergeModels)({title:{default:`选择器`},http:{},urlPrefix:{},isSingle:{type:Boolean,default:!0},type:{default:`dept`},maxVisibleCount:{},hideSlot:{type:Boolean,default:!1}},{modelValue:{required:!0,default:()=>[]},modelModifiers:{},visible:{type:Boolean,required:!0,default:!1},visibleModifiers:{}}),emits:(0,i.mergeModels)([`confirm`,`cancel`,`changeTab`],[`update:modelValue`,`update:visible`]),setup(s,{emit:c}){let l=s,u=c,d=(0,i.useAttrs)(),f=(0,i.useModel)(s,`modelValue`),p=(0,i.useModel)(s,`visible`),m=(0,i.computed)(()=>f.value.map(t=>({type:t.type||l.type||`dept`,value:e.text(t.value),label:t.label||``,raw:t}))),h=(0,i.computed)(()=>{let{modalProps:e,...t}=d;return{cancelText:`取消`,okText:`确定`,...t,...e||{}}});function g(t){f.value=r.normalizeSelectorOptions(e.serializeGroup(t)),p.value=!1,u(`confirm`)}function _(){p.value=!1,u(`cancel`)}function v(e){f.value=r.removeSelectorOption(f.value,e.value,e.type,l.type||`dept`)}return(e,r)=>((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.FormItemRest),null,{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,o,[l.hideSlot?(0,i.createCommentVNode)(``,!0):(0,i.renderSlot)(e.$slots,`default`,{key:0},()=>[(0,i.createVNode)(n.default,{items:m.value,"max-visible-count":l.maxVisibleCount??5,"add-text":`选择对象`,onAdd:r[0]||=e=>p.value=!0,onRemove:v},null,8,[`items`,`max-visible-count`])]),(0,i.createVNode)(t.default,{open:p.value,mode:`group`,selected:m.value,"initial-tab":l.type,"is-single":l.isSingle,title:l.title,http:l.http,prefix:l.urlPrefix,"modal-props":h.value,"onUpdate:open":r[1]||=e=>p.value=e===!0,onConfirm:g,onCancel:_,onChangeTab:r[2]||=e=>u(`changeTab`,e)},null,8,[`open`,`selected`,`initial-tab`,`is-single`,`title`,`http`,`prefix`,`modal-props`])])]),_:3}))}});exports.default=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,t){return`${e||`unknown`}:${t}`}function t(t){if(!Array.isArray(t))return[];let n=new Set;return t.flatMap(t=>{if(!t||typeof t!=`object`)return[];let r=t;if(typeof r.value!=`string`||!r.value)return[];let i=e(r.type,r.value);return n.has(i)?[]:(n.add(i),[{label:typeof r.label==`string`?r.label:``,value:r.value,type:r.type}])})}function n(e,t,n){return e.filter(e=>!(e.value===t&&(
|
|
1
|
+
function e(e,t){return`${e||`unknown`}:${t}`}function t(t){if(!Array.isArray(t))return[];let n=new Set;return t.flatMap(t=>{if(!t||typeof t!=`object`)return[];let r=t;if(typeof r.value!=`string`||!r.value)return[];let i=e(r.type,r.value);return n.has(i)?[]:(n.add(i),[{label:typeof r.label==`string`?r.label:``,value:r.value,type:r.type}])})}function n(e,t,n,r){return e.filter(e=>!(e.value===t&&(e.type||r)===n))}exports.normalizeSelectorOptions=t,exports.removeSelectorOption=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../
|
|
1
|
+
require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../selector-core/model.cjs`),t=require(`../../selector-core/components/SelectorDialog.cjs`),n=require(`../../selector-core/components/SelectionChips.cjs`),r=require(`./types.cjs`);let i=require(`vue`),a=require(`ant-design-vue`);var o={class:`gd-ant-role-selector`},s=(0,i.defineComponent)({name:`KRoleSelector`,__name:`RoleSelector`,props:r.roleSelectorProps,emits:r.roleSelectorEmits,setup(r,{emit:s}){let c=r,l=s,u=(0,i.useAttrs)(),d=(0,i.computed)(()=>(Array.isArray(c.modelValue)?c.modelValue:c.modelValue?[c.modelValue]:[]).map(t=>({type:`role`,value:e.text(t.value),label:t.label||``,raw:t}))),f=(0,i.computed)(()=>{let{modalProps:e,...t}=u;return{cancelText:`取消`,okText:`确定`,...t,...e||{}}});function p(e){l(`update:visible`,e===!0)}function m(t){let n=e.serializeRoles(t),r=c.type===`radio`?n[0]||null:n;l(`update:visible`,!1),l(`update:modelValue`,r),l(`confirm`,n)}function h(){l(`update:visible`,!1),l(`cancel`)}function g(e){if(c.type===`radio`){l(`update:modelValue`,null);return}l(`update:modelValue`,(Array.isArray(c.modelValue)?c.modelValue:[]).filter(t=>t.value!==e))}return(e,r)=>((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.FormItemRest),null,{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,o,[c.hideSlot?(0,i.createCommentVNode)(``,!0):(0,i.renderSlot)(e.$slots,`default`,{key:0},()=>[(0,i.createVNode)(n.default,{items:d.value,"max-visible-count":c.maxVisibleCount,"add-text":`选择角色`,onAdd:r[0]||=e=>l(`update:visible`,!0),onRemove:r[1]||=e=>g(e.value)},null,8,[`items`,`max-visible-count`])]),(0,i.createVNode)(t.default,{open:c.visible,mode:`role`,selected:d.value,selection:c.type,title:`选择角色`,"role-options":c.options,http:c.http,prefix:c.prefix,"is-built-in-request":c.isBuiltInRequest,"value-field":c.valueField,"modal-props":f.value,"onUpdate:open":p,onConfirm:m,onCancel:h},null,8,[`open`,`selected`,`selection`,`role-options`,`http`,`prefix`,`is-built-in-request`,`value-field`,`modal-props`])])]),_:3}))}});exports.default=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`./SelectionChips.vue.cjs`).default;exports.default=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../icon/src/icon.cjs`),t=require(`../model.cjs`),n=require(`../../pro-user-avatar/src/index.cjs`);let r=require(`vue`),i=require(`ant-design-vue`);var a={class:`gd-ant-selector__confirmed`},o={class:`gd-ant-selector__confirmed-chips`},s=[`title`],c=[`aria-label`,`onClick`],l={class:`gd-ant-selector__confirmed-actions`},u={class:`gd-ant-selector__confirmed-popover-content`,"aria-label":`隐藏的已选择项`},d=[`title`],f=[`aria-label`,`onClick`],p=[`title`,`aria-label`],m=[`aria-label`],h=(0,r.defineComponent)({__name:`SelectionChips`,props:{items:{},maxVisibleCount:{default:5},addText:{}},emits:[`add`,`remove`],setup(h){let g=h,_=(0,r.computed)(()=>{let e=g.maxVisibleCount;return Number.isFinite(e)&&e>=0?Math.floor(e):5}),v=(0,r.computed)(()=>g.items.slice(0,_.value)),y=(0,r.computed)(()=>g.items.slice(_.value)),b=(0,r.computed)(()=>`另有 ${y.value.length} 项:${y.value.map(e=>e.label||`未命名`).join(`、`)}`);return(g,_)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,a,[(0,r.createElementVNode)(`div`,o,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(v.value,i=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{key:(0,r.unref)(t.entityKey)(i),class:(0,r.normalizeClass)([`gd-ant-selector__confirmed-chip`,`gd-ant-selector__confirmed-chip--${i.type}`])},[i.type===`user`?((0,r.openBlock)(),(0,r.createBlock)(n.default,{key:0,name:i.label,avatar:i.avatar,preview:!1,size:`small`},null,8,[`name`,`avatar`])):((0,r.openBlock)(),(0,r.createElementBlock)(`span`,{key:1,class:(0,r.normalizeClass)([`gd-ant-selector__confirmed-chip-icon`,`gd-ant-selector__confirmed-chip-icon--${i.type}`])},[(0,r.createVNode)(e.default,{name:i.type===`dept`?`bumen`:`a-jiaoseguanli2`,size:14,"aria-hidden":`true`},null,8,[`name`])],2)),(0,r.createElementVNode)(`span`,{class:`gd-ant-selector__confirmed-chip-label`,title:i.label||`未命名`},(0,r.toDisplayString)(i.label||`未命名`),9,s),(0,r.createElementVNode)(`button`,{type:`button`,class:`gd-ant-selector__confirmed-chip-remove`,"aria-label":`移除已选择的${i.label||`未命名`}`,onClick:(0,r.withModifiers)(e=>g.$emit(`remove`,i),[`stop`])},[(0,r.createVNode)(e.default,{name:`guanbi`,size:10,"aria-hidden":`true`})],8,c)],2))),128))]),(0,r.createElementVNode)(`div`,l,[y.value.length?((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(i.Popover),{key:0,placement:`top`,trigger:`click`,"overlay-class-name":`gd-ant-selector__confirmed-popover`},{content:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`div`,u,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(y.value,i=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{key:(0,r.unref)(t.entityKey)(i),class:(0,r.normalizeClass)([`gd-ant-selector__confirmed-chip`,`gd-ant-selector__confirmed-chip--${i.type}`])},[i.type===`user`?((0,r.openBlock)(),(0,r.createBlock)(n.default,{key:0,name:i.label,avatar:i.avatar,preview:!1,size:`small`},null,8,[`name`,`avatar`])):((0,r.openBlock)(),(0,r.createElementBlock)(`span`,{key:1,class:(0,r.normalizeClass)([`gd-ant-selector__confirmed-chip-icon`,`gd-ant-selector__confirmed-chip-icon--${i.type}`])},[(0,r.createVNode)(e.default,{name:i.type===`dept`?`bumen`:`a-jiaoseguanli2`,size:14,"aria-hidden":`true`},null,8,[`name`])],2)),(0,r.createElementVNode)(`span`,{class:`gd-ant-selector__confirmed-chip-label`,title:i.label||`未命名`},(0,r.toDisplayString)(i.label||`未命名`),9,d),(0,r.createElementVNode)(`button`,{type:`button`,class:`gd-ant-selector__confirmed-chip-remove`,"aria-label":`移除已选择的${i.label||`未命名`}`,onClick:(0,r.withModifiers)(e=>g.$emit(`remove`,i),[`stop`])},[(0,r.createVNode)(e.default,{name:`guanbi`,size:10,"aria-hidden":`true`})],8,f)],2))),128))])]),default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`button`,{type:`button`,class:`gd-ant-selector__confirmed-more`,title:b.value,"aria-label":`查看隐藏的已选择项,共 ${y.value.length} 项`},` +`+(0,r.toDisplayString)(y.value.length),9,p)]),_:1})):(0,r.createCommentVNode)(``,!0),(0,r.createElementVNode)(`button`,{type:`button`,class:`gd-ant-selector__confirmed-add`,"aria-label":h.items.length?`继续选择`:h.addText,onClick:_[0]||=e=>g.$emit(`add`)},[(0,r.createVNode)(e.default,{name:`plus`,size:15,"aria-hidden":`true`}),(0,r.createElementVNode)(`span`,null,(0,r.toDisplayString)(h.items.length?`继续选择`:h.addText),1)],8,m)])]))}});exports.default=h;
|
package/dist/theme/icon.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:gd-ant-iconfont;src:url(./fonts/iconfont.woff2?t=
|
|
1
|
+
@font-face{font-family:gd-ant-iconfont;src:url(./fonts/iconfont.woff2?t=58620)format("woff2"),url(./fonts/iconfont.woff?t=97095)format("woff"),url(./fonts/iconfont.ttf?t=96906)format("truetype")}.gd-ant-icon{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;font-style:normal;font-family:gd-ant-iconfont!important}.icon-gd-ant-xinzeng:before{content:""}.icon-gd-ant-guanbi:before{content:""}.icon-gd-ant-sync:before{content:""}.icon-gd-ant-tupianjiazaishibai:before{content:""}.icon-gd-ant-double-left:before{content:""}.icon-gd-ant-double-right:before{content:""}.icon-gd-ant-question-circle:before{content:""}.icon-gd-ant-sound:before{content:""}.icon-gd-ant-code:before{content:""}.icon-gd-ant-desktop:before{content:""}.icon-gd-ant-delete1:before{content:""}.icon-gd-ant-mobile:before{content:""}.icon-gd-ant-qiye:before{content:""}.icon-gd-ant-bumen:before{content:""}.icon-gd-ant-a-jiaoseguanli2:before{content:""}.icon-gd-ant-shanchu:before{content:""}.icon-gd-ant-zuzhijiagou:before{content:""}.icon-gd-ant-search:before{content:""}.icon-gd-ant-calendar:before{content:""}.icon-gd-ant-carry-out:before{content:""}.icon-gd-ant-file-add:before{content:""}.icon-gd-ant-form:before{content:""}.icon-gd-ant-close-circle:before{content:""}.icon-gd-ant-close-circle-o:before{content:""}.icon-gd-ant-vertical-align-bottom:before{content:""}.icon-gd-ant-merge-cells:before{content:""}.icon-gd-ant-split-cells:before{content:""}.icon-gd-ant-down:before{content:""}.icon-gd-ant-left:before{content:""}.icon-gd-ant-right:before{content:""}.icon-gd-ant-up:before{content:""}.icon-gd-ant-plus:before{content:""}.icon-gd-ant-xsl:before{content:""}.icon-gd-ant-word:before{content:""}.icon-gd-ant-eye:before{content:""}.icon-gd-ant-PDF:before{content:""}.icon-gd-ant-delete:before{content:""}.icon-gd-ant-upload-icon:before{content:""}.icon-gd-ant-title-icon:before{content:""}
|