@king-one/antdv 1.2.16 → 1.2.18
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/CHANGELOG.md +12 -0
- package/dist/es/components/dept-selector/index.mjs +3 -2
- package/dist/es/components/dept-selector/src/dept.mjs +182 -171
- package/dist/es/components/dept-selector/src/types.mjs +31 -2
- package/dist/es/components/pro-selector/index.mjs +10 -7
- package/dist/es/components/pro-selector/src/components/org-tree.mjs +132 -129
- package/dist/es/components/pro-selector/src/pro-user.mjs +58 -77
- package/dist/es/components/pro-selector/src/types.mjs +42 -1
- package/dist/es/components/pro-sign/src/components/signature.vue.mjs +39 -36
- package/dist/es/components/pro-table/src/pro-table.vue2.mjs +91 -84
- package/dist/es/components/pro-table/utils.mjs +11 -10
- package/dist/es/components/role-selector/index.mjs +3 -2
- package/dist/es/components/role-selector/src/role.mjs +93 -80
- package/dist/es/components/role-selector/src/types.mjs +24 -3
- package/dist/es/index.mjs +80 -74
- package/dist/lib/components/dept-selector/index.js +1 -1
- package/dist/lib/components/dept-selector/src/dept.js +1 -1
- package/dist/lib/components/dept-selector/src/types.js +1 -1
- package/dist/lib/components/pro-selector/index.js +1 -1
- package/dist/lib/components/pro-selector/src/components/org-tree.js +1 -1
- package/dist/lib/components/pro-selector/src/pro-user.js +1 -1
- package/dist/lib/components/pro-selector/src/types.js +1 -1
- package/dist/lib/components/pro-sign/src/components/signature.vue.js +1 -1
- package/dist/lib/components/pro-table/src/pro-table.vue2.js +1 -1
- package/dist/lib/components/pro-table/utils.js +1 -1
- package/dist/lib/components/role-selector/index.js +1 -1
- package/dist/lib/components/role-selector/src/role.js +1 -1
- package/dist/lib/components/role-selector/src/types.js +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/types/components/dept-selector/index.d.ts +55 -6
- package/dist/types/components/dept-selector/src/dept.d.ts +54 -6
- package/dist/types/components/dept-selector/src/types.d.ts +34 -2
- package/dist/types/components/pro-selector/index.d.ts +62 -42
- package/dist/types/components/pro-selector/src/components/org-tree.d.ts +1 -19
- package/dist/types/components/pro-selector/src/pro-user.d.ts +62 -44
- package/dist/types/components/pro-selector/src/types.d.ts +46 -0
- package/dist/types/components/role-selector/index.d.ts +40 -0
- package/dist/types/components/role-selector/src/role.d.ts +20 -0
- package/dist/types/components/role-selector/src/types.d.ts +20 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { withInstall as t } from "../utils/install.mjs";
|
|
2
2
|
import e from "./src/dept.mjs";
|
|
3
3
|
import "./src/style/index.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { GET_DEPT_TREE_URL as s, deptSelectorEmits as E, deptSelectorProps as c } from "./src/types.mjs";
|
|
5
5
|
const m = t(e);
|
|
6
6
|
export {
|
|
7
|
+
s as GET_DEPT_TREE_URL,
|
|
7
8
|
m as KDeptSelector,
|
|
8
9
|
m as default,
|
|
9
|
-
|
|
10
|
+
E as deptSelectorEmits,
|
|
10
11
|
c as deptSelectorProps
|
|
11
12
|
};
|
|
@@ -1,238 +1,249 @@
|
|
|
1
|
-
import { defineComponent as H, ref as
|
|
1
|
+
import { defineComponent as H, ref as o, watch as k, createVNode as n, Fragment as J } from "vue";
|
|
2
2
|
import { useNamespace as Q } from "../../../hooks/use-namespace/index.mjs";
|
|
3
3
|
import "../../index.mjs";
|
|
4
|
-
import { InputSearch as W, Tree as X, Empty as
|
|
5
|
-
import {
|
|
6
|
-
import { KProModal as
|
|
7
|
-
import { KIcon as
|
|
8
|
-
const
|
|
4
|
+
import { InputSearch as W, Tree as X, Empty as C, Input as Y } from "ant-design-vue";
|
|
5
|
+
import { GET_DEPT_TREE_URL as Z, deptSelectorEmits as ee, deptSelectorProps as le } from "./types.mjs";
|
|
6
|
+
import { KProModal as te } from "../../pro-modal/index.mjs";
|
|
7
|
+
import { KIcon as P } from "../../icon/index.mjs";
|
|
8
|
+
const h = Q("dept-selector"), oe = /* @__PURE__ */ H({
|
|
9
9
|
name: "KDeptSelector",
|
|
10
|
-
props:
|
|
11
|
-
emits:
|
|
12
|
-
setup(
|
|
13
|
-
emit:
|
|
14
|
-
attrs:
|
|
15
|
-
slots:
|
|
10
|
+
props: le,
|
|
11
|
+
emits: ee,
|
|
12
|
+
setup(t, {
|
|
13
|
+
emit: m,
|
|
14
|
+
attrs: V,
|
|
15
|
+
slots: g
|
|
16
16
|
}) {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
const x = o(!0), N = o(!0), y = o([]), f = o([]), d = o([]), A = o(!1), u = o(t.isBuiltInRequest ? {
|
|
18
|
+
children: "children",
|
|
19
|
+
title: "deptName",
|
|
20
|
+
key: "id"
|
|
21
|
+
} : t.fieldNames), b = o(""), s = o([]), v = o(t.treeData), E = o(!1), p = o("");
|
|
22
|
+
if (t.isBuiltInRequest) {
|
|
23
|
+
if (!t.http)
|
|
24
|
+
throw new Error("请传入http实例");
|
|
25
|
+
t.http.get(`${t.prefix}${Z}`).then((e) => {
|
|
26
|
+
e.status === 0 && (v.value = e.data);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
const w = () => {
|
|
30
|
+
if (t.type === "checkbox") {
|
|
31
|
+
if (!Array.isArray(t.modelValue)) return;
|
|
32
|
+
const e = t.modelValue.map((l) => l[u.value.key]);
|
|
33
|
+
x.value ? d.value = {
|
|
26
34
|
checked: e,
|
|
27
35
|
halfChecked: []
|
|
28
|
-
} :
|
|
36
|
+
} : d.value = e, y.value = e;
|
|
29
37
|
} else {
|
|
30
|
-
if (Array.isArray(
|
|
31
|
-
const e =
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
}, w = () => {
|
|
35
|
-
if (b.value) {
|
|
36
|
-
b.value = !1;
|
|
37
|
-
return;
|
|
38
|
+
if (Array.isArray(t.modelValue)) return;
|
|
39
|
+
const e = t.modelValue[u.value.key];
|
|
40
|
+
f.value = [e], y.value = [e];
|
|
38
41
|
}
|
|
39
|
-
|
|
42
|
+
}, I = (e) => {
|
|
43
|
+
if (E.value)
|
|
44
|
+
return E.value = !1;
|
|
45
|
+
t.type === "radio" ? s.value.length > 0 && (b.value = s.value[0][u.value.title] || "") : b.value = s.value.map((l) => l[u.value.title]).join(",");
|
|
40
46
|
};
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
k(() => t.visible, () => {
|
|
48
|
+
t.visible && w();
|
|
43
49
|
}, {
|
|
44
50
|
immediate: !0
|
|
45
|
-
}),
|
|
46
|
-
|
|
47
|
-
}, {
|
|
48
|
-
immediate: !0,
|
|
49
|
-
deep: !0
|
|
50
|
-
}), y(s, () => {
|
|
51
|
-
s.value.length > 0 && N();
|
|
51
|
+
}), k(() => t.modelValue, () => {
|
|
52
|
+
v.value.length > 0 && w();
|
|
52
53
|
}, {
|
|
53
54
|
immediate: !0,
|
|
54
55
|
deep: !0
|
|
55
|
-
}),
|
|
56
|
-
|
|
56
|
+
}), k(v, () => {
|
|
57
|
+
v.value.length > 0 && w();
|
|
57
58
|
}, {
|
|
58
59
|
immediate: !0,
|
|
59
60
|
deep: !0
|
|
60
|
-
}), y(h, () => {
|
|
61
|
-
u.type === "radio" && (o.value = D(h.value), w());
|
|
62
|
-
}, {
|
|
63
|
-
immediate: !0,
|
|
64
|
-
deep: !0
|
|
65
|
-
}), y(() => u.treeData, () => {
|
|
66
|
-
s.value = u.treeData;
|
|
67
61
|
});
|
|
68
|
-
function
|
|
69
|
-
const l = (
|
|
70
|
-
for (const
|
|
71
|
-
if (
|
|
72
|
-
return
|
|
73
|
-
if (
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
62
|
+
function _(e) {
|
|
63
|
+
const l = (i, r) => {
|
|
64
|
+
for (const a of i) {
|
|
65
|
+
if (a[u.value.key] === r)
|
|
66
|
+
return a;
|
|
67
|
+
if (a.children && a.children.length) {
|
|
68
|
+
const c = l(a.children, r);
|
|
69
|
+
if (c) return c;
|
|
76
70
|
}
|
|
77
71
|
}
|
|
78
72
|
return null;
|
|
79
73
|
};
|
|
80
|
-
return l(
|
|
74
|
+
return l(v.value, e);
|
|
81
75
|
}
|
|
82
76
|
function D(e) {
|
|
83
|
-
return e.map((l) =>
|
|
77
|
+
return e ? e.map((l) => _(l)).filter(Boolean) : [];
|
|
84
78
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
79
|
+
k(d, () => {
|
|
80
|
+
t.type === "checkbox" && (x.value ? s.value = D(d.value.checked) : s.value = D(d.value), I("watch checkedKeys..."));
|
|
81
|
+
}, {
|
|
82
|
+
immediate: !0,
|
|
83
|
+
deep: !0
|
|
84
|
+
}), k(f, () => {
|
|
85
|
+
t.type === "radio" && (s.value = D(f.value), I("watch selectedKeys..."));
|
|
86
|
+
}, {
|
|
87
|
+
immediate: !0,
|
|
88
|
+
deep: !0
|
|
89
|
+
}), k(() => t.treeData, () => {
|
|
90
|
+
t.isBuiltInRequest || (v.value = t.treeData);
|
|
91
|
+
});
|
|
92
|
+
const R = () => {
|
|
93
|
+
E.value = !0;
|
|
94
|
+
}, O = () => {
|
|
95
|
+
E.value = !0;
|
|
96
|
+
}, B = () => {
|
|
97
|
+
m("update:visible", !1);
|
|
98
|
+
}, M = () => {
|
|
99
|
+
t.type === "radio" ? m("update:modelValue", {
|
|
100
|
+
[u.value.key]: f.value[0],
|
|
101
|
+
[u.value.title]: s.value[0][u.value.title]
|
|
102
|
+
}) : m("update:modelValue", s.value.map((e) => ({
|
|
103
|
+
[u.value.key]: e[u.value.key],
|
|
104
|
+
[u.value.title]: e[u.value.title]
|
|
105
|
+
}))), m("update:visible", !1), I("handleConfirm ...");
|
|
106
|
+
}, L = (e) => {
|
|
107
|
+
if (E.value = !0, t.type === "radio")
|
|
108
|
+
return s.value = [], f.value = [], !1;
|
|
109
|
+
if (x.value)
|
|
110
|
+
d.value.checked = d.value.checked.filter((l) => l !== e[u.value.key]);
|
|
104
111
|
else {
|
|
105
|
-
const l = e.parentId,
|
|
106
|
-
|
|
107
|
-
const
|
|
108
|
-
|
|
112
|
+
const l = e.parentId, i = d.value.indexOf(l);
|
|
113
|
+
i !== -1 && d.value.splice(i, 1), d.value = d.value.filter((a) => a !== e[u.value.key]), q(e.children).forEach((a) => {
|
|
114
|
+
const c = d.value.indexOf(a);
|
|
115
|
+
c !== -1 && d.value.splice(c, 1);
|
|
109
116
|
});
|
|
110
117
|
}
|
|
111
|
-
},
|
|
112
|
-
const l = [],
|
|
113
|
-
for (const
|
|
114
|
-
l.push(
|
|
118
|
+
}, q = (e) => {
|
|
119
|
+
const l = [], i = (r) => {
|
|
120
|
+
for (const a of r)
|
|
121
|
+
l.push(a[u.value.key]), a.children && a.children.length && i(a.children);
|
|
115
122
|
};
|
|
116
|
-
return
|
|
117
|
-
},
|
|
118
|
-
modelValue:
|
|
123
|
+
return i(e), l;
|
|
124
|
+
}, F = () => n(J, null, [n(te, {
|
|
125
|
+
modelValue: t.visible,
|
|
119
126
|
modalProps: {
|
|
120
127
|
cancelText: "取消",
|
|
121
128
|
okText: "确定",
|
|
122
129
|
width: "700px",
|
|
123
|
-
...
|
|
130
|
+
...V
|
|
124
131
|
},
|
|
125
132
|
title: "选择部门",
|
|
126
|
-
onOnCancel:
|
|
127
|
-
onOnConfirm:
|
|
133
|
+
onOnCancel: B,
|
|
134
|
+
onOnConfirm: M
|
|
128
135
|
}, {
|
|
129
|
-
default: () => [
|
|
130
|
-
class:
|
|
131
|
-
}, [
|
|
132
|
-
}, 8, ["modelValue", "modalProps", "onOnCancel", "onOnConfirm"])]),
|
|
133
|
-
let
|
|
134
|
-
for (let
|
|
135
|
-
const
|
|
136
|
-
|
|
136
|
+
default: () => [n("div", {
|
|
137
|
+
class: h.e("modal-content")
|
|
138
|
+
}, [$(), j()], 2)]
|
|
139
|
+
}, 8, ["modelValue", "modalProps", "onOnCancel", "onOnConfirm"])]), K = (e, l) => {
|
|
140
|
+
let i;
|
|
141
|
+
for (let r = 0; r < l.length; r++) {
|
|
142
|
+
const a = l[r];
|
|
143
|
+
if (a.children)
|
|
144
|
+
if (a.children.some((c) => c[u.value.key] === e)) {
|
|
145
|
+
i = a[u.value.key];
|
|
146
|
+
break;
|
|
147
|
+
} else K(e, a.children) && (i = K(e, a.children));
|
|
137
148
|
}
|
|
138
|
-
return
|
|
139
|
-
},
|
|
149
|
+
return i;
|
|
150
|
+
}, z = (e) => {
|
|
140
151
|
if (!e.trim()) {
|
|
141
|
-
|
|
152
|
+
y.value = [], p.value = "", N.value = !0;
|
|
142
153
|
return;
|
|
143
154
|
}
|
|
144
|
-
const l = /* @__PURE__ */ new Set(),
|
|
145
|
-
|
|
146
|
-
var
|
|
147
|
-
if ((
|
|
148
|
-
let S =
|
|
155
|
+
const l = /* @__PURE__ */ new Set(), i = (r, a) => {
|
|
156
|
+
r.forEach((c) => {
|
|
157
|
+
var U;
|
|
158
|
+
if ((U = c[u.value.title]) != null && U.includes(a)) {
|
|
159
|
+
let S = K(c[u.value.key], v.value);
|
|
149
160
|
for (; S; )
|
|
150
|
-
l.add(S), S =
|
|
151
|
-
l.add(
|
|
161
|
+
l.add(S), S = K(S, v.value);
|
|
162
|
+
l.add(c[u.value.key]);
|
|
152
163
|
}
|
|
153
|
-
|
|
164
|
+
c.children && c.children.length > 0 && i(c.children, a);
|
|
154
165
|
});
|
|
155
166
|
};
|
|
156
|
-
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
|
|
167
|
+
i(v.value, e), y.value = Array.from(l), p.value = e, N.value = !0;
|
|
168
|
+
}, G = (e) => {
|
|
169
|
+
const l = e[u.value.title] || "";
|
|
170
|
+
if (!p.value)
|
|
171
|
+
return n("span", null, [l]);
|
|
172
|
+
const i = l.indexOf(p.value);
|
|
173
|
+
if (i === -1)
|
|
174
|
+
return n("span", null, [l]);
|
|
175
|
+
const r = l.substring(0, i), a = l.substring(i, i + p.value.length), c = l.substring(i + p.value.length);
|
|
176
|
+
return n("span", null, [r, n("span", {
|
|
177
|
+
style: "color: #f50; font-weight: bold"
|
|
178
|
+
}, [a]), c]);
|
|
179
|
+
}, $ = () => n("div", {
|
|
180
|
+
class: h.e("modal-content-left")
|
|
181
|
+
}, [n(W, {
|
|
160
182
|
placeholder: "请输入部门名称",
|
|
161
|
-
onSearch:
|
|
183
|
+
onSearch: z,
|
|
162
184
|
style: {
|
|
163
185
|
marginBottom: "10px"
|
|
164
186
|
},
|
|
165
187
|
allowClear: !0
|
|
166
|
-
}, null, 8, ["onSearch", "allowClear"]),
|
|
167
|
-
expandedKeys:
|
|
168
|
-
"onUpdate:expandedKeys": (e) =>
|
|
169
|
-
selectedKeys:
|
|
170
|
-
"onUpdate:selectedKeys": (e) =>
|
|
171
|
-
checkedKeys:
|
|
172
|
-
"onUpdate:checkedKeys": (e) =>
|
|
173
|
-
checkable:
|
|
174
|
-
checkStrictly:
|
|
188
|
+
}, null, 8, ["onSearch", "allowClear"]), v.value.length > 0 ? n(X, {
|
|
189
|
+
expandedKeys: y.value,
|
|
190
|
+
"onUpdate:expandedKeys": (e) => y.value = e,
|
|
191
|
+
selectedKeys: f.value,
|
|
192
|
+
"onUpdate:selectedKeys": (e) => f.value = e,
|
|
193
|
+
checkedKeys: d.value,
|
|
194
|
+
"onUpdate:checkedKeys": (e) => d.value = e,
|
|
195
|
+
checkable: t.type === "checkbox",
|
|
196
|
+
checkStrictly: x.value,
|
|
175
197
|
"show-icon": !0,
|
|
176
|
-
autoExpandParent:
|
|
198
|
+
autoExpandParent: N.value,
|
|
177
199
|
blockNode: !0,
|
|
178
200
|
defaultExpandAll: !0,
|
|
179
|
-
fieldNames:
|
|
180
|
-
"show-line":
|
|
181
|
-
"tree-data":
|
|
182
|
-
onCheck:
|
|
183
|
-
onSelect:
|
|
184
|
-
class:
|
|
201
|
+
fieldNames: u.value,
|
|
202
|
+
"show-line": A.value,
|
|
203
|
+
"tree-data": v.value,
|
|
204
|
+
onCheck: R,
|
|
205
|
+
onSelect: O,
|
|
206
|
+
class: h.e("modal-content-left-tree")
|
|
185
207
|
}, {
|
|
186
|
-
icon: (e) =>
|
|
187
|
-
title:
|
|
188
|
-
const l = e.label || "";
|
|
189
|
-
if (!p.value)
|
|
190
|
-
return a("span", null, [l]);
|
|
191
|
-
const n = l.indexOf(p.value);
|
|
192
|
-
if (n === -1)
|
|
193
|
-
return a("span", null, [l]);
|
|
194
|
-
const d = l.substring(0, n), t = l.substring(n, n + p.value.length), i = l.substring(n + p.value.length);
|
|
195
|
-
return a("span", null, [d, a("span", {
|
|
196
|
-
style: "color: #f50; font-weight: bold"
|
|
197
|
-
}, [t]), i]);
|
|
198
|
-
},
|
|
208
|
+
icon: (e) => T(e),
|
|
209
|
+
title: G,
|
|
199
210
|
_: 1
|
|
200
|
-
}, 8, ["expandedKeys", "onUpdate:expandedKeys", "selectedKeys", "onUpdate:selectedKeys", "checkedKeys", "onUpdate:checkedKeys", "checkable", "checkStrictly", "show-icon", "autoExpandParent", "blockNode", "defaultExpandAll", "fieldNames", "show-line", "tree-data", "onCheck", "onSelect", "class"]) :
|
|
211
|
+
}, 8, ["expandedKeys", "onUpdate:expandedKeys", "selectedKeys", "onUpdate:selectedKeys", "checkedKeys", "onUpdate:checkedKeys", "checkable", "checkStrictly", "show-icon", "autoExpandParent", "blockNode", "defaultExpandAll", "fieldNames", "show-line", "tree-data", "onCheck", "onSelect", "class"]) : n(C, {
|
|
201
212
|
description: "暂无数据",
|
|
202
|
-
image:
|
|
203
|
-
}, null, 8, ["image"])], 2),
|
|
213
|
+
image: C.PRESENTED_IMAGE_SIMPLE
|
|
214
|
+
}, null, 8, ["image"])], 2), T = (e) => n(P, {
|
|
204
215
|
name: e.parentId === "0" ? "qiye" : "bumen",
|
|
205
216
|
size: 16
|
|
206
|
-
}, null, 8, ["name"]),
|
|
207
|
-
class:
|
|
208
|
-
}, [
|
|
209
|
-
class:
|
|
210
|
-
}, [
|
|
211
|
-
class:
|
|
212
|
-
}, [
|
|
213
|
-
class:
|
|
214
|
-
onClick: () =>
|
|
215
|
-
}, [
|
|
217
|
+
}, null, 8, ["name"]), j = () => n("div", {
|
|
218
|
+
class: h.e("modal-content-right")
|
|
219
|
+
}, [s.value.length > 0 ? s.value.map((e) => n("div", {
|
|
220
|
+
class: h.e("modal-content-right-item")
|
|
221
|
+
}, [n("div", {
|
|
222
|
+
class: h.e("modal-content-right-item-label")
|
|
223
|
+
}, [T(e), n("span", null, [e[u.value.title]])], 2), n("div", {
|
|
224
|
+
class: h.e("modal-content-right-item-del"),
|
|
225
|
+
onClick: () => L(e)
|
|
226
|
+
}, [n(P, {
|
|
216
227
|
name: "shanchu",
|
|
217
228
|
size: 16
|
|
218
|
-
}, null)], 10, ["onClick"])], 2)) :
|
|
229
|
+
}, null)], 10, ["onClick"])], 2)) : n(C, {
|
|
219
230
|
description: "暂无数据",
|
|
220
|
-
image:
|
|
231
|
+
image: C.PRESENTED_IMAGE_SIMPLE
|
|
221
232
|
}, null, 8, ["image"])], 2);
|
|
222
233
|
return () => {
|
|
223
234
|
var e;
|
|
224
|
-
return
|
|
225
|
-
class:
|
|
226
|
-
}, [(e =
|
|
235
|
+
return n("div", {
|
|
236
|
+
class: h.b()
|
|
237
|
+
}, [(e = g.default) != null && e.call(g) ? g.default() : n("div", null, [n(Y, {
|
|
227
238
|
style: "width: 100%;",
|
|
228
239
|
readonly: !0,
|
|
229
|
-
value:
|
|
230
|
-
"onUpdate:value": (l) =>
|
|
231
|
-
onClick: () =>
|
|
240
|
+
value: b.value,
|
|
241
|
+
"onUpdate:value": (l) => b.value = l,
|
|
242
|
+
onClick: () => m("update:visible", !0)
|
|
232
243
|
}, {
|
|
233
|
-
suffix: () =>
|
|
234
|
-
onClick: () =>
|
|
235
|
-
}, [
|
|
244
|
+
suffix: () => n("div", {
|
|
245
|
+
onClick: () => m("update:visible", !0)
|
|
246
|
+
}, [n(P, {
|
|
236
247
|
style: {
|
|
237
248
|
cursor: "pointer"
|
|
238
249
|
},
|
|
@@ -241,10 +252,10 @@ const v = Q("dept-selector"), de = /* @__PURE__ */ H({
|
|
|
241
252
|
color: "#606266"
|
|
242
253
|
}, null)], 8, ["onClick"]),
|
|
243
254
|
_: 1
|
|
244
|
-
}, 8, ["readonly", "value", "onUpdate:value", "onClick"])]),
|
|
255
|
+
}, 8, ["readonly", "value", "onUpdate:value", "onClick"])]), F()], 2);
|
|
245
256
|
};
|
|
246
257
|
}
|
|
247
258
|
});
|
|
248
259
|
export {
|
|
249
|
-
|
|
260
|
+
oe as default
|
|
250
261
|
};
|
|
@@ -11,12 +11,41 @@ const t = {
|
|
|
11
11
|
treeData: {
|
|
12
12
|
type: Array,
|
|
13
13
|
default: () => []
|
|
14
|
-
}
|
|
15
|
-
|
|
14
|
+
},
|
|
15
|
+
fieldNames: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default: () => ({
|
|
18
|
+
title: "label",
|
|
19
|
+
key: "id",
|
|
20
|
+
children: "children"
|
|
21
|
+
})
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* 是否使用内置请求,内置请求会走用户中心即
|
|
25
|
+
* ${prefix}security/company/role/page?pageNum=1&pageSize=1000
|
|
26
|
+
*/
|
|
27
|
+
isBuiltInRequest: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !1
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* axios 实例
|
|
33
|
+
*/
|
|
34
|
+
http: {
|
|
35
|
+
type: [Object, Function],
|
|
36
|
+
default: () => {
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
/**
|
|
40
|
+
* 请求前缀,如 qy-user-service
|
|
41
|
+
*/
|
|
42
|
+
prefix: String
|
|
43
|
+
}, l = "/security/dept/company/tree", a = {
|
|
16
44
|
"update:visible": (e) => !0,
|
|
17
45
|
"update:modelValue": (e) => !0
|
|
18
46
|
};
|
|
19
47
|
export {
|
|
48
|
+
l as GET_DEPT_TREE_URL,
|
|
20
49
|
a as deptSelectorEmits,
|
|
21
50
|
t as deptSelectorProps
|
|
22
51
|
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { withInstall as
|
|
2
|
-
import
|
|
1
|
+
import { withInstall as r } from "../utils/install.mjs";
|
|
2
|
+
import e from "./src/pro-user.mjs";
|
|
3
3
|
import "./style/index.mjs";
|
|
4
|
-
import "./src/types.mjs";
|
|
4
|
+
import { GTE_ORGTREE_URL as l, UserSelectorProps as E, selectUserContextKey as R } from "./src/types.mjs";
|
|
5
5
|
import "./src/hooks/index.mjs";
|
|
6
|
-
|
|
7
|
-
const
|
|
6
|
+
e.GTE_ORGTREE_URL = "/security/dept/user/tree";
|
|
7
|
+
const m = r(e);
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
l as GTE_ORGTREE_URL,
|
|
10
|
+
m as KUserSelector,
|
|
11
|
+
e as ProUserSelector,
|
|
12
|
+
E as UserSelectorProps,
|
|
13
|
+
R as selectUserContextKey
|
|
11
14
|
};
|