@king-one/antdv 1.0.33 → 1.0.35
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/index.mjs +18 -14
- package/dist/es/components/pro-area/apis/pro-area.api.mjs +6 -0
- package/dist/es/components/pro-area/hooks/use-pro-area.mjs +11 -0
- package/dist/es/components/pro-area/index.mjs +13 -0
- package/dist/es/components/pro-area/src/ProArea.vue.mjs +4 -0
- package/dist/es/components/pro-area/src/ProArea.vue2.mjs +91 -0
- package/dist/es/components/pro-area/src/types.mjs +21 -0
- package/dist/es/components/pro-area/style/index.mjs +2 -0
- package/dist/es/components/pro-modal/hooks/useProModal.mjs +34 -0
- package/dist/es/components/pro-modal/index.mjs +14 -0
- package/dist/es/components/pro-modal/src/ProModal.vue.mjs +4 -0
- package/dist/es/components/pro-modal/src/ProModal.vue2.mjs +39 -0
- package/dist/es/components/{pro-dialog → pro-modal}/src/types.mjs +2 -2
- package/dist/es/components/pro-modal/style/index.mjs +2 -0
- package/dist/es/components/pro-picker/apis/pro-picker.api.mjs +7 -0
- package/dist/es/components/pro-picker/index.mjs +10 -0
- package/dist/es/components/pro-picker/src/ProPicker.vue.mjs +4 -0
- package/dist/es/components/pro-picker/src/ProPicker.vue2.mjs +64 -0
- package/dist/es/components/pro-picker/src/types.mjs +23 -0
- package/dist/es/index.mjs +40 -30
- package/dist/lib/components/index.js +1 -1
- package/dist/lib/components/pro-area/apis/pro-area.api.js +1 -0
- package/dist/lib/components/pro-area/hooks/use-pro-area.js +1 -0
- package/dist/lib/components/pro-area/index.js +1 -0
- package/dist/lib/components/{pro-dialog/src/ProDialog.vue.js → pro-area/src/ProArea.vue.js} +1 -1
- package/dist/lib/components/pro-area/src/ProArea.vue2.js +1 -0
- package/dist/lib/components/pro-area/src/types.js +1 -0
- package/dist/lib/components/pro-area/style/index.js +1 -0
- package/dist/lib/components/pro-modal/hooks/useProModal.js +1 -0
- package/dist/lib/components/pro-modal/index.js +1 -0
- package/dist/lib/components/pro-modal/src/ProModal.vue.js +1 -0
- package/dist/lib/components/pro-modal/src/ProModal.vue2.js +1 -0
- package/dist/lib/components/pro-modal/src/types.js +1 -0
- package/dist/lib/components/{pro-dialog → pro-modal}/style/index.js +1 -1
- package/dist/lib/components/pro-picker/apis/pro-picker.api.js +1 -0
- package/dist/lib/components/pro-picker/index.js +1 -0
- package/dist/lib/components/pro-picker/src/ProPicker.vue.js +1 -0
- package/dist/lib/components/pro-picker/src/ProPicker.vue2.js +1 -0
- package/dist/lib/components/pro-picker/src/types.js +1 -0
- package/dist/lib/index.js +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/theme-chalk/por-area-select.css +1 -0
- package/dist/theme-chalk/pro-modal.css +1 -0
- package/dist/types/components/index.d.ts +3 -1
- package/dist/types/components/pro-area/apis/pro-area.api.d.ts +3 -0
- package/dist/types/components/pro-area/hooks/use-pro-area.d.ts +4 -0
- package/dist/types/components/pro-area/index.d.ts +72 -0
- package/dist/types/components/pro-area/src/ProArea.vue.d.ts +69 -0
- package/dist/types/components/pro-area/src/types.d.ts +42 -0
- package/dist/types/components/pro-modal/hooks/useProModal.d.ts +14 -0
- package/dist/types/components/pro-modal/index.d.ts +5 -0
- package/dist/types/components/{pro-dialog/src/ProDialog.vue.d.ts → pro-modal/src/ProModal.vue.d.ts} +17 -3
- package/dist/types/components/{pro-dialog → pro-modal}/src/types.d.ts +2 -2
- package/dist/types/components/pro-picker/apis/pro-picker.api.d.ts +5 -0
- package/dist/types/components/pro-picker/index.d.ts +59 -0
- package/dist/types/components/pro-picker/src/ProPicker.vue.d.ts +57 -0
- package/dist/types/components/pro-picker/src/types.d.ts +24 -0
- package/package.json +2 -1
- package/dist/es/components/pro-dialog/hooks/useProDialog.mjs +0 -34
- package/dist/es/components/pro-dialog/index.mjs +0 -13
- package/dist/es/components/pro-dialog/src/ProDialog.vue.mjs +0 -4
- package/dist/es/components/pro-dialog/src/ProDialog.vue2.mjs +0 -33
- package/dist/es/components/pro-dialog/style/index.mjs +0 -2
- package/dist/lib/components/pro-dialog/hooks/useProDialog.js +0 -1
- package/dist/lib/components/pro-dialog/index.js +0 -1
- package/dist/lib/components/pro-dialog/src/ProDialog.vue2.js +0 -1
- package/dist/lib/components/pro-dialog/src/types.js +0 -1
- package/dist/theme-chalk/pro-dialog.css +0 -1
- package/dist/types/components/pro-dialog/hooks/useProDialog.d.ts +0 -14
- package/dist/types/components/pro-dialog/index.d.ts +0 -30
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { KForm as
|
|
2
|
-
import { KCollapseTranstion as
|
|
3
|
-
import {
|
|
4
|
-
import { KProTitle as
|
|
5
|
-
import { KScrollBar as
|
|
6
|
-
import { KScaleVirtualList as
|
|
7
|
-
import { KProTag as
|
|
1
|
+
import { KForm as e } from "./form/index.mjs";
|
|
2
|
+
import { KCollapseTranstion as m } from "./collapse-transtion/index.mjs";
|
|
3
|
+
import { KProModal as f } from "./pro-modal/index.mjs";
|
|
4
|
+
import { KProTitle as K } from "./pro-title/index.mjs";
|
|
5
|
+
import { KScrollBar as l } from "./scroll-bar/index.mjs";
|
|
6
|
+
import { KScaleVirtualList as i } from "./scale-virtual-list/index.mjs";
|
|
7
|
+
import { KProTag as s } from "./pro-tag/index.mjs";
|
|
8
|
+
import { KProPicker as n } from "./pro-picker/index.mjs";
|
|
9
|
+
import { KProArea as d } from "./pro-area/index.mjs";
|
|
8
10
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
s as
|
|
15
|
-
K as
|
|
11
|
+
m as KCollapseTranstion,
|
|
12
|
+
e as KForm,
|
|
13
|
+
d as KProArea,
|
|
14
|
+
f as KProModal,
|
|
15
|
+
n as KProPicker,
|
|
16
|
+
s as KProTag,
|
|
17
|
+
K as KProTitle,
|
|
18
|
+
i as KScaleVirtualList,
|
|
19
|
+
l as KScrollBar
|
|
16
20
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { withInstall as r } from "../utils/install.mjs";
|
|
2
|
+
import "./src/ProArea.vue.mjs";
|
|
3
|
+
import "./style/index.mjs";
|
|
4
|
+
import { ProAreaProps as s } from "./src/types.mjs";
|
|
5
|
+
import { useAreaProArea as P } from "./hooks/use-pro-area.mjs";
|
|
6
|
+
import o from "./src/ProArea.vue2.mjs";
|
|
7
|
+
const p = r(o);
|
|
8
|
+
export {
|
|
9
|
+
p as KProArea,
|
|
10
|
+
s as ProAreaProps,
|
|
11
|
+
p as default,
|
|
12
|
+
P as useAreaProArea
|
|
13
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineComponent as b, mergeModels as B, useModel as P, computed as u, openBlock as c, createBlock as p, unref as i, withCtx as m, createElementBlock as w, Fragment as y, renderList as A, createVNode as F, normalizeClass as M } from "vue";
|
|
2
|
+
import { Row as N, Col as k, Select as U } from "ant-design-vue";
|
|
3
|
+
import { useNamespace as q } from "../../../hooks/use-namespace/index.mjs";
|
|
4
|
+
import { ProAreaProps as z } from "./types.mjs";
|
|
5
|
+
const O = /* @__PURE__ */ b({
|
|
6
|
+
name: "ProArea",
|
|
7
|
+
__name: "ProArea",
|
|
8
|
+
props: /* @__PURE__ */ B(z, {
|
|
9
|
+
modelValue: {
|
|
10
|
+
required: !0
|
|
11
|
+
},
|
|
12
|
+
modelModifiers: {}
|
|
13
|
+
}),
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(d) {
|
|
16
|
+
const n = d, a = P(d, "modelValue"), { b: f } = q("pro-area-select"), v = u(() => (e) => `请选择${e === 1 ? "请选择省份" : e === 2 ? "请选择城市" : "请选择区县"}`), h = u(() => (e) => n.options.length > 0 ? g(e) : []);
|
|
17
|
+
function g(e) {
|
|
18
|
+
var l;
|
|
19
|
+
if (e === 1)
|
|
20
|
+
return n.options.map((r) => ({
|
|
21
|
+
value: o(r, "id"),
|
|
22
|
+
label: o(r, "name")
|
|
23
|
+
}));
|
|
24
|
+
if (e === 2) {
|
|
25
|
+
const r = a.value.province;
|
|
26
|
+
return r ? s(n.options, r).map((t) => ({
|
|
27
|
+
value: o(t, "id"),
|
|
28
|
+
label: o(t, "name")
|
|
29
|
+
})) : [];
|
|
30
|
+
} else {
|
|
31
|
+
const r = (l = a.value) == null ? void 0 : l.city;
|
|
32
|
+
return r ? s(n.options, r).map((t) => ({
|
|
33
|
+
value: o(t, "id"),
|
|
34
|
+
label: o(t, "name")
|
|
35
|
+
})) : [];
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function s(e, l) {
|
|
39
|
+
for (const r of e) {
|
|
40
|
+
if (o(r, "id") === l)
|
|
41
|
+
return o(r, "children") || [];
|
|
42
|
+
if (o(r, "children")) {
|
|
43
|
+
const t = s(o(r, "children"), l);
|
|
44
|
+
if (t)
|
|
45
|
+
return t;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function o(e, l) {
|
|
50
|
+
return e && l ? e[(n == null ? void 0 : n.FieldNames[l]) || l] : void 0;
|
|
51
|
+
}
|
|
52
|
+
const C = u(() => {
|
|
53
|
+
let e = n.level;
|
|
54
|
+
const l = [];
|
|
55
|
+
for (; e--; )
|
|
56
|
+
l.push(e === 2 ? "province" : e === 1 ? "city" : "county");
|
|
57
|
+
return l;
|
|
58
|
+
}), V = u(() => [f()]);
|
|
59
|
+
return (e, l) => (c(), p(i(N), { gutter: 10 }, {
|
|
60
|
+
default: m(() => [
|
|
61
|
+
(c(!0), w(
|
|
62
|
+
y,
|
|
63
|
+
null,
|
|
64
|
+
A(C.value, (r, t) => (c(), p(i(k), {
|
|
65
|
+
key: r,
|
|
66
|
+
span: 24 / e.level
|
|
67
|
+
}, {
|
|
68
|
+
default: m(() => [
|
|
69
|
+
F(i(U), {
|
|
70
|
+
value: a.value[r],
|
|
71
|
+
"onUpdate:value": (_) => a.value[r] = _,
|
|
72
|
+
placeholder: v.value(t + 1),
|
|
73
|
+
class: M(V.value),
|
|
74
|
+
options: h.value(t + 1)
|
|
75
|
+
}, null, 8, ["value", "onUpdate:value", "placeholder", "class", "options"])
|
|
76
|
+
]),
|
|
77
|
+
_: 2
|
|
78
|
+
/* DYNAMIC */
|
|
79
|
+
}, 1032, ["span"]))),
|
|
80
|
+
128
|
|
81
|
+
/* KEYED_FRAGMENT */
|
|
82
|
+
))
|
|
83
|
+
]),
|
|
84
|
+
_: 1
|
|
85
|
+
/* STABLE */
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
export {
|
|
90
|
+
O as default
|
|
91
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
level: {
|
|
3
|
+
type: Number,
|
|
4
|
+
default: 3
|
|
5
|
+
},
|
|
6
|
+
options: {
|
|
7
|
+
type: Array,
|
|
8
|
+
required: !0
|
|
9
|
+
},
|
|
10
|
+
FieldNames: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default: () => ({
|
|
13
|
+
name: "name",
|
|
14
|
+
id: "id",
|
|
15
|
+
children: "children"
|
|
16
|
+
})
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
e as ProAreaProps
|
|
21
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ref as l, getCurrentInstance as a, unref as i } from "vue";
|
|
2
|
+
function d() {
|
|
3
|
+
const e = l(!1), n = () => {
|
|
4
|
+
e.value = !0;
|
|
5
|
+
}, t = () => {
|
|
6
|
+
e.value = !1;
|
|
7
|
+
}, s = {
|
|
8
|
+
openModal: n,
|
|
9
|
+
closeModal: t
|
|
10
|
+
}, o = a();
|
|
11
|
+
return o && o.emit("init", s), { dialogVisible: e, openModal: n, closeModal: t };
|
|
12
|
+
}
|
|
13
|
+
function r() {
|
|
14
|
+
const e = l(null), n = () => {
|
|
15
|
+
const o = i(e.value);
|
|
16
|
+
return o || console.error("useModal instance is undefined!"), o;
|
|
17
|
+
};
|
|
18
|
+
return [(o) => {
|
|
19
|
+
e.value = o;
|
|
20
|
+
}, {
|
|
21
|
+
openModal: () => {
|
|
22
|
+
var o;
|
|
23
|
+
(o = n()) == null || o.openModal();
|
|
24
|
+
},
|
|
25
|
+
closeModal: () => {
|
|
26
|
+
var o;
|
|
27
|
+
return (o = n()) == null ? void 0 : o.closeModal();
|
|
28
|
+
}
|
|
29
|
+
}];
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
d as useProModal,
|
|
33
|
+
r as usePromodalInit
|
|
34
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { withInstall as o } from "../utils/install.mjs";
|
|
2
|
+
import "./src/ProModal.vue.mjs";
|
|
3
|
+
import "./style/index.mjs";
|
|
4
|
+
import { useProModal as e, usePromodalInit as f } from "./hooks/useProModal.mjs";
|
|
5
|
+
import { ProModalProps as P } from "./src/types.mjs";
|
|
6
|
+
import r from "./src/ProModal.vue2.mjs";
|
|
7
|
+
const i = o(r);
|
|
8
|
+
export {
|
|
9
|
+
i as KProModal,
|
|
10
|
+
P as ProModalProps,
|
|
11
|
+
i as default,
|
|
12
|
+
e as useProModal,
|
|
13
|
+
f as usePromodalInit
|
|
14
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent as c, mergeModels as a, useModel as i, computed as f, openBlock as C, createBlock as M, unref as P, mergeProps as k, withCtx as v, renderSlot as w } from "vue";
|
|
2
|
+
import { Modal as B } from "ant-design-vue";
|
|
3
|
+
import { useNamespace as V } from "../../../hooks/use-namespace/index.mjs";
|
|
4
|
+
import { ProModalProps as _ } from "./types.mjs";
|
|
5
|
+
const x = /* @__PURE__ */ c({
|
|
6
|
+
name: "ProModal",
|
|
7
|
+
__name: "ProModal",
|
|
8
|
+
props: /* @__PURE__ */ a(_, {
|
|
9
|
+
modelValue: { required: !0, type: Boolean },
|
|
10
|
+
modelModifiers: {}
|
|
11
|
+
}),
|
|
12
|
+
emits: /* @__PURE__ */ a(["onConfirm", "onCancel"], ["update:modelValue"]),
|
|
13
|
+
setup(l, { emit: t }) {
|
|
14
|
+
const e = t, o = i(l, "modelValue"), { b: m } = V("pro-modal"), p = f(() => m());
|
|
15
|
+
function d() {
|
|
16
|
+
e("onConfirm");
|
|
17
|
+
}
|
|
18
|
+
function s() {
|
|
19
|
+
e("onCancel");
|
|
20
|
+
}
|
|
21
|
+
return (n, r) => (C(), M(P(B), k({
|
|
22
|
+
open: o.value,
|
|
23
|
+
"onUpdate:open": r[0] || (r[0] = (u) => o.value = u)
|
|
24
|
+
}, n.modalProps, {
|
|
25
|
+
"wrap-class-name": p.value,
|
|
26
|
+
onOk: d,
|
|
27
|
+
onCancel: s
|
|
28
|
+
}), {
|
|
29
|
+
default: v(() => [
|
|
30
|
+
w(n.$slots, "default")
|
|
31
|
+
]),
|
|
32
|
+
_: 3
|
|
33
|
+
/* FORWARDED */
|
|
34
|
+
}, 16, ["open", "wrap-class-name"]));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
x as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { withInstall as r } from "../utils/install.mjs";
|
|
2
|
+
import "./src/ProPicker.vue.mjs";
|
|
3
|
+
import { ProPickerProps as s } from "./src/types.mjs";
|
|
4
|
+
import o from "./src/ProPicker.vue2.mjs";
|
|
5
|
+
const p = r(o);
|
|
6
|
+
export {
|
|
7
|
+
p as KProPicker,
|
|
8
|
+
s as ProPickerProps,
|
|
9
|
+
p as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineComponent as p, mergeModels as d, useModel as m, reactive as f, watch as u, openBlock as h, createBlock as g, unref as r, createSlots as v, withCtx as y, createVNode as P } from "vue";
|
|
2
|
+
import { debounce as k } from "lodash-es";
|
|
3
|
+
import { Select as b, Spin as S } from "ant-design-vue";
|
|
4
|
+
import { proPickerApi as c } from "../apis/pro-picker.api.mjs";
|
|
5
|
+
import { ProPickerProps as w } from "./types.mjs";
|
|
6
|
+
const z = /* @__PURE__ */ p({
|
|
7
|
+
name: "ProPicker",
|
|
8
|
+
__name: "ProPicker",
|
|
9
|
+
props: /* @__PURE__ */ d(w, {
|
|
10
|
+
modelValue: {},
|
|
11
|
+
modelModifiers: {}
|
|
12
|
+
}),
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(i) {
|
|
15
|
+
const a = i, l = m(i, "modelValue"), o = f({
|
|
16
|
+
data: [],
|
|
17
|
+
fetching: !1
|
|
18
|
+
});
|
|
19
|
+
u(l, (e) => {
|
|
20
|
+
(typeof e == "string" || typeof e == "number") && a.isInit && console.log("开始复制");
|
|
21
|
+
}, {
|
|
22
|
+
once: !0
|
|
23
|
+
});
|
|
24
|
+
const s = k((e) => {
|
|
25
|
+
e && (o.fetching = !0, a.type === "company" ? c.company({
|
|
26
|
+
params: { label: e }
|
|
27
|
+
}).then((t) => {
|
|
28
|
+
o.data = t.data.options.map((n) => ({
|
|
29
|
+
label: n.label,
|
|
30
|
+
value: n.value
|
|
31
|
+
})), o.fetching = !1;
|
|
32
|
+
}) : c.user({
|
|
33
|
+
params: { label: e }
|
|
34
|
+
}).then(() => {
|
|
35
|
+
}));
|
|
36
|
+
}, a.delay);
|
|
37
|
+
return (e, t) => (h(), g(r(b), {
|
|
38
|
+
value: l.value,
|
|
39
|
+
"onUpdate:value": t[0] || (t[0] = (n) => l.value = n),
|
|
40
|
+
mode: e.mode,
|
|
41
|
+
"show-search": "",
|
|
42
|
+
placeholder: e.placeholder,
|
|
43
|
+
style: { width: "100%" },
|
|
44
|
+
"filter-option": !1,
|
|
45
|
+
"not-found-content": o.fetching ? void 0 : null,
|
|
46
|
+
options: o.data,
|
|
47
|
+
onSearch: r(s)
|
|
48
|
+
}, v({
|
|
49
|
+
_: 2
|
|
50
|
+
/* DYNAMIC */
|
|
51
|
+
}, [
|
|
52
|
+
o.fetching ? {
|
|
53
|
+
name: "notFoundContent",
|
|
54
|
+
fn: y(() => [
|
|
55
|
+
P(r(S), { size: "small" })
|
|
56
|
+
]),
|
|
57
|
+
key: "0"
|
|
58
|
+
} : void 0
|
|
59
|
+
]), 1032, ["value", "mode", "placeholder", "not-found-content", "options", "onSearch"]));
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
z as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
type: {
|
|
3
|
+
type: String,
|
|
4
|
+
default: "company"
|
|
5
|
+
},
|
|
6
|
+
placeholder: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "请选择"
|
|
9
|
+
},
|
|
10
|
+
mode: {
|
|
11
|
+
type: String
|
|
12
|
+
},
|
|
13
|
+
isInit: {
|
|
14
|
+
type: Boolean
|
|
15
|
+
},
|
|
16
|
+
delay: {
|
|
17
|
+
type: Number,
|
|
18
|
+
default: 200
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
e as ProPickerProps
|
|
23
|
+
};
|
package/dist/es/index.mjs
CHANGED
|
@@ -1,38 +1,48 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./installer.mjs";
|
|
2
2
|
import "./components/index.mjs";
|
|
3
3
|
import "./hooks/index.mjs";
|
|
4
4
|
import { formType as f } from "./components/form/component/form.mjs";
|
|
5
5
|
import { KForm as x } from "./components/form/index.mjs";
|
|
6
|
-
import { collapseProps as
|
|
7
|
-
import { KCollapseTranstion as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { TitleProps as
|
|
12
|
-
import { KProTitle as
|
|
13
|
-
import { scrollbarProps as
|
|
14
|
-
import { KScrollBar as
|
|
15
|
-
import { KScaleVirtualList as
|
|
16
|
-
import { proTagProps as
|
|
17
|
-
import { KProTag as
|
|
18
|
-
import {
|
|
6
|
+
import { collapseProps as l } from "./components/collapse-transtion/src/types.mjs";
|
|
7
|
+
import { KCollapseTranstion as i } from "./components/collapse-transtion/index.mjs";
|
|
8
|
+
import { useProModal as u, usePromodalInit as c } from "./components/pro-modal/hooks/useProModal.mjs";
|
|
9
|
+
import { ProModalProps as d } from "./components/pro-modal/src/types.mjs";
|
|
10
|
+
import { KProModal as A } from "./components/pro-modal/index.mjs";
|
|
11
|
+
import { TitleProps as F } from "./components/pro-title/src/types.mjs";
|
|
12
|
+
import { KProTitle as k } from "./components/pro-title/index.mjs";
|
|
13
|
+
import { scrollbarProps as S } from "./components/scroll-bar/src/types.mjs";
|
|
14
|
+
import { KScrollBar as y } from "./components/scroll-bar/index.mjs";
|
|
15
|
+
import { KScaleVirtualList as C } from "./components/scale-virtual-list/index.mjs";
|
|
16
|
+
import { proTagProps as V } from "./components/pro-tag/src/types.mjs";
|
|
17
|
+
import { KProTag as j } from "./components/pro-tag/index.mjs";
|
|
18
|
+
import { ProPickerProps as v } from "./components/pro-picker/src/types.mjs";
|
|
19
|
+
import { KProPicker as z } from "./components/pro-picker/index.mjs";
|
|
20
|
+
import { ProAreaProps as E } from "./components/pro-area/src/types.mjs";
|
|
21
|
+
import { useAreaProArea as H } from "./components/pro-area/hooks/use-pro-area.mjs";
|
|
22
|
+
import { KProArea as N } from "./components/pro-area/index.mjs";
|
|
23
|
+
import { useProForm as Q, useProFormInit as R } from "./hooks/useProForm.mjs";
|
|
19
24
|
export {
|
|
20
|
-
|
|
25
|
+
i as KCollapseTranstion,
|
|
21
26
|
x as KForm,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
N as KProArea,
|
|
28
|
+
A as KProModal,
|
|
29
|
+
z as KProPicker,
|
|
30
|
+
j as KProTag,
|
|
31
|
+
k as KProTitle,
|
|
32
|
+
C as KScaleVirtualList,
|
|
33
|
+
y as KScrollBar,
|
|
34
|
+
E as ProAreaProps,
|
|
35
|
+
d as ProModalProps,
|
|
36
|
+
v as ProPickerProps,
|
|
37
|
+
F as TitleProps,
|
|
38
|
+
l as collapseProps,
|
|
39
|
+
o as default,
|
|
30
40
|
f as formType,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
V as proTagProps,
|
|
42
|
+
S as scrollbarProps,
|
|
43
|
+
H as useAreaProArea,
|
|
44
|
+
Q as useProForm,
|
|
45
|
+
R as useProFormInit,
|
|
46
|
+
u as useProModal,
|
|
47
|
+
c as usePromodalInit
|
|
38
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./form/index.js"),e=require("./collapse-transtion/index.js"),o=require("./pro-modal/index.js"),i=require("./pro-title/index.js"),n=require("./scroll-bar/index.js"),t=require("./scale-virtual-list/index.js"),l=require("./pro-tag/index.js"),a=require("./pro-picker/index.js"),K=require("./pro-area/index.js");exports.KForm=r.KForm;exports.KCollapseTranstion=e.KCollapseTranstion;exports.KProModal=o.KProModal;exports.KProTitle=i.KProTitle;exports.KScrollBar=n.KScrollBar;exports.KScaleVirtualList=t.KScaleVirtualList;exports.KProTag=l.KProTag;exports.KProPicker=a.KProPicker;exports.KProArea=K.KProArea;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={areaTree:()=>globalThis.$http.get("/basic/area/setting/tree")};exports.proAreaApis=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),o=require("../apis/pro-area.api.js");function t(){const e=a.ref([]);return o.proAreaApis.areaTree().then(r=>{e.value=r.data}),{ops:e}}exports.useAreaProArea=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../utils/install.js");require("./src/ProArea.vue.js");require("./style/index.js");const t=require("./src/types.js"),u=require("./hooks/use-pro-area.js"),o=require("./src/ProArea.vue2.js"),e=r.withInstall(o.default);exports.ProAreaProps=t.ProAreaProps;exports.useAreaProArea=u.useAreaProArea;exports.KProArea=e;exports.default=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ProArea.vue2.js");exports.default=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("ant-design-vue"),B=require("../../../hooks/use-namespace/index.js"),_=require("./types.js"),b=e.defineComponent({name:"ProArea",__name:"ProArea",props:e.mergeModels(_.ProAreaProps,{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const u=i,a=e.useModel(i,"modelValue"),{b:d}=B.useNamespace("pro-area-select"),p=e.computed(()=>t=>`请选择${t===1?"请选择省份":t===2?"请选择城市":"请选择区县"}`),v=e.computed(()=>t=>u.options.length>0?m(t):[]);function m(t){var l;if(t===1)return u.options.map(r=>({value:o(r,"id"),label:o(r,"name")}));if(t===2){const r=a.value.province;return r?c(u.options,r).map(n=>({value:o(n,"id"),label:o(n,"name")})):[]}else{const r=(l=a.value)==null?void 0:l.city;return r?c(u.options,r).map(n=>({value:o(n,"id"),label:o(n,"name")})):[]}}function c(t,l){for(const r of t){if(o(r,"id")===l)return o(r,"children")||[];if(o(r,"children")){const n=c(o(r,"children"),l);if(n)return n}}}function o(t,l){return t&&l?t[(u==null?void 0:u.FieldNames[l])||l]:void 0}const f=e.computed(()=>{let t=u.level;const l=[];for(;t--;)l.push(t===2?"province":t===1?"city":"county");return l}),h=e.computed(()=>[d()]);return(t,l)=>(e.openBlock(),e.createBlock(e.unref(s.Row),{gutter:10},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(r,n)=>(e.openBlock(),e.createBlock(e.unref(s.Col),{key:r,span:24/t.level},{default:e.withCtx(()=>[e.createVNode(e.unref(s.Select),{value:a.value[r],"onUpdate:value":g=>a.value[r]=g,placeholder:p.value(n+1),class:e.normalizeClass(h.value),options:v.value(n+1)},null,8,["value","onUpdate:value","placeholder","class","options"])]),_:2},1032,["span"]))),128))]),_:1}))}});exports.default=b;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={level:{type:Number,default:3},options:{type:Array,required:!0},FieldNames:{type:Object,default:()=>({name:"name",id:"id",children:"children"})}};exports.ProAreaProps=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("../../base/style/index.js");require("@king-one/antdv/dist/theme-chalk/por-area-select.css");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue");function a(){const o=t.ref(!1),n=()=>{o.value=!0},s=()=>{o.value=!1},l={openModal:n,closeModal:s},e=t.getCurrentInstance();return e&&e.emit("init",l),{dialogVisible:o,openModal:n,closeModal:s}}function i(){const o=t.ref(null),n=()=>{const e=t.unref(o.value);return e||console.error("useModal instance is undefined!"),e};return[e=>{o.value=e},{openModal:()=>{var e;(e=n())==null||e.openModal()},closeModal:()=>{var e;return(e=n())==null?void 0:e.closeModal()}}]}exports.useProModal=a;exports.usePromodalInit=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../utils/install.js");require("./src/ProModal.vue.js");require("./style/index.js");const e=require("./hooks/useProModal.js"),t=require("./src/types.js"),u=require("./src/ProModal.vue2.js"),o=r.withInstall(u.default);exports.useProModal=e.useProModal;exports.usePromodalInit=e.usePromodalInit;exports.ProModalProps=t.ProModalProps;exports.KProModal=o;exports.default=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ProModal.vue2.js");exports.default=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("ant-design-vue"),p=require("../../../hooks/use-namespace/index.js"),f=require("./types.js"),M=e.defineComponent({name:"ProModal",__name:"ProModal",props:e.mergeModels(f.ProModalProps,{modelValue:{required:!0,type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["onConfirm","onCancel"],["update:modelValue"]),setup(t,{emit:a}){const o=a,n=e.useModel(t,"modelValue"),{b:s}=p.useNamespace("pro-modal"),u=e.computed(()=>s());function d(){o("onConfirm")}function c(){o("onCancel")}return(r,l)=>(e.openBlock(),e.createBlock(e.unref(m.Modal),e.mergeProps({open:n.value,"onUpdate:open":l[0]||(l[0]=i=>n.value=i)},r.modalProps,{"wrap-class-name":u.value,onOk:d,onCancel:c}),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3},16,["open","wrap-class-name"]))}});exports.default=M;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={modalProps:{type:Object}};exports.ProModalProps=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("../../base/style/index.js");require("@king-one/antdv/dist/theme-chalk/pro-
|
|
1
|
+
"use strict";require("../../base/style/index.js");require("@king-one/antdv/dist/theme-chalk/pro-modal.css");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={company:t=>globalThis.$http.get("/security/company/options",t),user:t=>globalThis.$http.get("/security/user/options",t)};exports.proPickerApi=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../utils/install.js");require("./src/ProPicker.vue.js");const t=require("./src/types.js"),i=require("./src/ProPicker.vue2.js"),e=r.withInstall(i.default);exports.ProPickerProps=t.ProPickerProps;exports.KProPicker=e;exports.default=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ProPicker.vue2.js");exports.default=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("lodash-es"),s=require("ant-design-vue"),c=require("../apis/pro-picker.api.js"),p=require("./types.js"),f=e.defineComponent({name:"ProPicker",__name:"ProPicker",props:e.mergeModels(p.ProPickerProps,{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const r=i,l=e.useModel(i,"modelValue"),t=e.reactive({data:[],fetching:!1});e.watch(l,o=>{(typeof o=="string"||typeof o=="number")&&r.isInit&&console.log("开始复制")},{once:!0});const u=d.debounce(o=>{o&&(t.fetching=!0,r.type==="company"?c.proPickerApi.company({params:{label:o}}).then(n=>{t.data=n.data.options.map(a=>({label:a.label,value:a.value})),t.fetching=!1}):c.proPickerApi.user({params:{label:o}}).then(()=>{}))},r.delay);return(o,n)=>(e.openBlock(),e.createBlock(e.unref(s.Select),{value:l.value,"onUpdate:value":n[0]||(n[0]=a=>l.value=a),mode:o.mode,"show-search":"",placeholder:o.placeholder,style:{width:"100%"},"filter-option":!1,"not-found-content":t.fetching?void 0:null,options:t.data,onSearch:e.unref(u)},e.createSlots({_:2},[t.fetching?{name:"notFoundContent",fn:e.withCtx(()=>[e.createVNode(e.unref(s.Spin),{size:"small"})]),key:"0"}:void 0]),1032,["value","mode","placeholder","not-found-content","options","onSearch"]))}});exports.default=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={type:{type:String,default:"company"},placeholder:{type:String,default:"请选择"},mode:{type:String},isInit:{type:Boolean},delay:{type:Number,default:200}};exports.ProPickerProps=e;
|
package/dist/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./installer.js");require("./components/index.js");require("./hooks/index.js");const s=require("./components/form/component/form.js"),i=require("./components/form/index.js"),t=require("./components/collapse-transtion/src/types.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./installer.js");require("./components/index.js");require("./hooks/index.js");const s=require("./components/form/component/form.js"),i=require("./components/form/index.js"),t=require("./components/collapse-transtion/src/types.js"),P=require("./components/collapse-transtion/index.js"),r=require("./components/pro-modal/hooks/useProModal.js"),u=require("./components/pro-modal/src/types.js"),a=require("./components/pro-modal/index.js"),l=require("./components/pro-title/src/types.js"),n=require("./components/pro-title/index.js"),c=require("./components/scroll-bar/src/types.js"),p=require("./components/scroll-bar/index.js"),d=require("./components/scale-virtual-list/index.js"),q=require("./components/pro-tag/src/types.js"),K=require("./components/pro-tag/index.js"),$=require("./components/pro-picker/src/types.js"),m=require("./components/pro-picker/index.js"),T=require("./components/pro-area/src/types.js"),y=require("./components/pro-area/hooks/use-pro-area.js"),x=require("./components/pro-area/index.js"),e=require("./hooks/useProForm.js");exports.default=o.default;exports.formType=s.formType;exports.KForm=i.KForm;exports.collapseProps=t.collapseProps;exports.KCollapseTranstion=P.KCollapseTranstion;exports.useProModal=r.useProModal;exports.usePromodalInit=r.usePromodalInit;exports.ProModalProps=u.ProModalProps;exports.KProModal=a.KProModal;exports.TitleProps=l.TitleProps;exports.KProTitle=n.KProTitle;exports.scrollbarProps=c.scrollbarProps;exports.KScrollBar=p.KScrollBar;exports.KScaleVirtualList=d.KScaleVirtualList;exports.proTagProps=q.proTagProps;exports.KProTag=K.KProTag;exports.ProPickerProps=$.ProPickerProps;exports.KProPicker=m.KProPicker;exports.ProAreaProps=T.ProAreaProps;exports.useAreaProArea=y.useAreaProArea;exports.KProArea=x.KProArea;exports.useProForm=e.useProForm;exports.useProFormInit=e.useProFormInit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-success:#67c23a;--king-color-warning:#e6a23c;--king-color-danger:#f56c6c;--king-color-error:#f56c6c;--king-color-info:#909399;--king-transition-duration:0.3s}.king-button--primary{--king-button-text-color:var(--king-color-primary)}.king-button--success{--king-button-text-color:var(--king-color-success)}.king-button--warning{--king-button-text-color:var(--king-color-warning)}.king-button--danger{--king-button-text-color:var(--king-color-danger)}.king-button--error{--king-button-text-color:var(--king-color-error)}.king-button--info{--king-button-text-color:var(--king-color-info)}.king-button{color:var(--king-button-text-color)}.king-scrollbar{overflow:hidden;position:relative;z-index:auto;height:100%;width:100%}.king-scrollbar .king-scrollbar-container{width:100%;overflow:scroll;height:100%;min-height:inherit;max-height:inherit;scrollbar-width:none}.king-scrollbar .king-scrollbar-content{width:-moz-fit-content;width:fit-content}.king-scrollbar .king-scrollbar-rail{position:absolute}.king-scrollbar .king-scrollbar-rail--vertical{right:0;width:5px;top:2px;bottom:2px;right:4px}.king-scrollbar .king-scrollbar-rail--horizontal{bottom:2px;height:5px;left:2px;right:2px}.king-scrollbar .king-scrollbar-rail__scrollbar--vertical{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;width:100%;cursor:pointer}.king-scrollbar .king-scrollbar-rail__scrollbar--horizontal{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;height:100%;cursor:pointer}.v-vl-items{width:-moz-fit-content;width:fit-content}.king-scale-virtual-list{width:100%;height:100%}.king-scale-virtual-list .king-scale-vittual-wrapper{width:-moz-fit-content;width:fit-content;margin:0 auto}.king-pro-title{border-bottom:1px solid #ccc;position:relative;padding-left:10px}.king-pro-title::before{content:"";position:absolute;width:3px;height:16px;background:#517cfc;left:0;top:3px}.king-pro-title--unborder{border:none}.king-pro-
|
|
1
|
+
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-success:#67c23a;--king-color-warning:#e6a23c;--king-color-danger:#f56c6c;--king-color-error:#f56c6c;--king-color-info:#909399;--king-transition-duration:0.3s}.king-button--primary{--king-button-text-color:var(--king-color-primary)}.king-button--success{--king-button-text-color:var(--king-color-success)}.king-button--warning{--king-button-text-color:var(--king-color-warning)}.king-button--danger{--king-button-text-color:var(--king-color-danger)}.king-button--error{--king-button-text-color:var(--king-color-error)}.king-button--info{--king-button-text-color:var(--king-color-info)}.king-button{color:var(--king-button-text-color)}.king-scrollbar{overflow:hidden;position:relative;z-index:auto;height:100%;width:100%}.king-scrollbar .king-scrollbar-container{width:100%;overflow:scroll;height:100%;min-height:inherit;max-height:inherit;scrollbar-width:none}.king-scrollbar .king-scrollbar-content{width:-moz-fit-content;width:fit-content}.king-scrollbar .king-scrollbar-rail{position:absolute}.king-scrollbar .king-scrollbar-rail--vertical{right:0;width:5px;top:2px;bottom:2px;right:4px}.king-scrollbar .king-scrollbar-rail--horizontal{bottom:2px;height:5px;left:2px;right:2px}.king-scrollbar .king-scrollbar-rail__scrollbar--vertical{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;width:100%;cursor:pointer}.king-scrollbar .king-scrollbar-rail__scrollbar--horizontal{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;height:100%;cursor:pointer}.v-vl-items{width:-moz-fit-content;width:fit-content}.king-scale-virtual-list{width:100%;height:100%}.king-scale-virtual-list .king-scale-vittual-wrapper{width:-moz-fit-content;width:fit-content;margin:0 auto}.king-pro-title{border-bottom:1px solid #ccc;position:relative;padding-left:10px}.king-pro-title::before{content:"";position:absolute;width:3px;height:16px;background:#517cfc;left:0;top:3px}.king-pro-title--unborder{border:none}.king-pro-modal .ant-modal-content{padding:0}.king-pro-modal .ant-modal-header{height:56px;padding-left:32px;padding-right:24px;display:flex;justify-content:space-between;align-items:center;background:#f1f7ff;border-bottom:1px solid #e6e8ea}.king-pro-modal .ant-modal-body{padding:10px 20px;max-height:65vh;overflow:auto}.king-pro-modal .ant-modal-footer{height:56px;display:flex;padding:0 16px;justify-content:flex-end;align-items:center;border-top:1px solid #e6e8ea}.king-pro-area-select{width:100%}
|