@aplus-frontend/ui 0.0.26 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/ap-action/group/index.vue.mjs +27 -31
- package/es/src/ap-action/item-dropdown/index.vue.mjs +14 -15
- package/es/src/ap-action/style/item-dropdown.css +2 -0
- package/es/src/ap-form/ap-form-item-group/index.vue.mjs +21 -21
- package/es/src/ap-form/ap-form-item.vue.mjs +72 -64
- package/es/src/ap-form/ap-form.vue.d.ts +13 -3
- package/es/src/ap-form/ap-form.vue2.mjs +91 -70
- package/es/src/ap-form/constant.d.ts +1 -0
- package/es/src/ap-form/constant.mjs +2 -1
- package/es/src/ap-form/context.d.ts +4 -3
- package/es/src/ap-form/hooks/use-watch.mjs +20 -16
- package/es/src/ap-form/interface.d.ts +35 -4
- package/es/src/ap-form/items/checkbox/index.vue.mjs +11 -10
- package/es/src/ap-form/items/date/index.vue.mjs +14 -13
- package/es/src/ap-form/items/date-range/index.vue.mjs +12 -11
- package/es/src/ap-form/items/number/index.vue.mjs +13 -12
- package/es/src/ap-form/items/radio/index.vue.mjs +4 -3
- package/es/src/ap-form/items/select/index.vue.mjs +3 -2
- package/es/src/ap-form/items/switch/index.vue.mjs +9 -8
- package/es/src/ap-form/items/text/index.vue2.mjs +15 -14
- package/es/src/ap-form/items/text/password.vue.mjs +1 -0
- package/es/src/ap-form/items/text-area/index.vue.mjs +7 -6
- package/es/src/ap-form/modal-form/index.vue.d.ts +1 -1
- package/es/src/ap-form/modal-form/index.vue.mjs +3 -3
- package/es/src/ap-table/constants.d.ts +132 -0
- package/es/src/ap-table/style/ap-table.css +11 -8
- package/es/src/business/expandAlert/ApExpandAlert.vue.d.ts +19 -1
- package/es/src/business/expandAlert/ApExpandAlert.vue2.mjs +53 -47
- package/es/src/business/expandAlert/interface.d.ts +4 -0
- package/es/src/business/index.d.ts +38 -7
- package/es/src/business/index.mjs +1 -1
- package/es/src/editable-table/form-item.vue.mjs +72 -74
- package/es/src/editable-table/style/index.css +13 -4
- package/es/src/locale/lang/en.mjs +2 -1
- package/es/src/locale/lang/zh-cn.mjs +2 -1
- package/es/src/theme/ap-action/item-dropdown.css +2 -0
- package/es/src/theme/ap-table/ap-table.css +11 -8
- package/es/src/theme/editable-table/index.css +13 -4
- package/lib/src/ap-action/group/index.vue.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-action/style/item-dropdown.css +2 -0
- package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +13 -3
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/constant.d.ts +1 -0
- package/lib/src/ap-form/constant.js +1 -1
- package/lib/src/ap-form/context.d.ts +4 -3
- package/lib/src/ap-form/hooks/use-watch.js +1 -1
- package/lib/src/ap-form/interface.d.ts +35 -4
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +132 -0
- package/lib/src/ap-table/style/ap-table.css +11 -8
- package/lib/src/business/expandAlert/ApExpandAlert.vue.d.ts +19 -1
- package/lib/src/business/expandAlert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/expandAlert/interface.d.ts +4 -0
- package/lib/src/business/index.d.ts +38 -7
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/style/index.css +13 -4
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/theme/ap-action/item-dropdown.css +2 -0
- package/lib/src/theme/ap-table/ap-table.css +11 -8
- package/lib/src/theme/editable-table/index.css +13 -4
- package/package.json +4 -3
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as h, computed as s, unref as
|
|
2
|
-
import { Space as
|
|
3
|
-
import { MoreOutlined as y } from "@ant-design/icons-vue";
|
|
1
|
+
import { defineComponent as h, computed as s, unref as c, openBlock as t, createBlock as r, withCtx as k, createElementBlock as u, Fragment as a, renderList as A, mergeProps as i, createCommentVNode as v } from "vue";
|
|
2
|
+
import { Space as y } from "ant-design-vue";
|
|
4
3
|
import "../item/index.vue.mjs";
|
|
5
4
|
import "../item-modal/index.vue2.mjs";
|
|
6
5
|
import "../item-popconfirm/index.vue2.mjs";
|
|
7
6
|
import "../item-dropdown/index.vue2.mjs";
|
|
8
|
-
import
|
|
7
|
+
import "../../config-provider/index.mjs";
|
|
8
|
+
import { isUndefined as w } from "lodash-unified";
|
|
9
|
+
import { useLocale as x } from "../../config-provider/hooks/use-locale.mjs";
|
|
9
10
|
import p from "../item-dropdown/index.vue.mjs";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const
|
|
11
|
+
import $ from "../item-modal/index.vue.mjs";
|
|
12
|
+
import b from "../item-popconfirm/index.vue.mjs";
|
|
13
|
+
import B from "../item/index.vue2.mjs";
|
|
14
|
+
const q = /* @__PURE__ */ h({
|
|
14
15
|
name: "ApActionGroup",
|
|
15
16
|
__name: "index",
|
|
16
17
|
props: {
|
|
@@ -19,13 +20,13 @@ const U = /* @__PURE__ */ h({
|
|
|
19
20
|
placement: { default: "bottomRight" },
|
|
20
21
|
actions: { default: () => [] }
|
|
21
22
|
},
|
|
22
|
-
setup(
|
|
23
|
-
const n = _,
|
|
23
|
+
setup(f) {
|
|
24
|
+
const n = f, { t: _ } = x(), m = s(
|
|
24
25
|
() => n.actions.filter(
|
|
25
|
-
(e) => e.visible ||
|
|
26
|
+
(e) => e.visible || w(e.visible)
|
|
26
27
|
)
|
|
27
|
-
),
|
|
28
|
-
const e =
|
|
28
|
+
), g = s(() => c(m).length > n.count), l = s(() => {
|
|
29
|
+
const e = c(m);
|
|
29
30
|
return e.length <= n.count ? {
|
|
30
31
|
showActions: e,
|
|
31
32
|
menuActions: []
|
|
@@ -34,43 +35,38 @@ const U = /* @__PURE__ */ h({
|
|
|
34
35
|
menuActions: e.slice(n.count - 1)
|
|
35
36
|
};
|
|
36
37
|
});
|
|
37
|
-
return (e,
|
|
38
|
+
return (e, C) => (t(), r(c(y), {
|
|
38
39
|
size: 16,
|
|
39
40
|
align: "center"
|
|
40
41
|
}, {
|
|
41
|
-
default:
|
|
42
|
-
(t(!0),
|
|
43
|
-
o.actions ? (t(), r(p,
|
|
42
|
+
default: k(() => [
|
|
43
|
+
(t(!0), u(a, null, A(l.value.showActions, (o, d) => (t(), u(a, { key: d }, [
|
|
44
|
+
o.actions ? (t(), r(p, i({
|
|
44
45
|
key: 0,
|
|
45
46
|
ref_for: !0
|
|
46
|
-
}, o), null, 16)) : o.modalProps ? (t(), r(
|
|
47
|
+
}, o), null, 16)) : o.modalProps ? (t(), r($, i({
|
|
47
48
|
key: 1,
|
|
48
49
|
ref_for: !0
|
|
49
|
-
}, o), null, 16)) : o.popconfirmProps ? (t(), r(
|
|
50
|
+
}, o), null, 16)) : o.popconfirmProps ? (t(), r(b, i({
|
|
50
51
|
key: 2,
|
|
51
52
|
ref_for: !0
|
|
52
|
-
}, o), null, 16)) : (t(), r(
|
|
53
|
+
}, o), null, 16)) : (t(), r(B, i({
|
|
53
54
|
key: 3,
|
|
54
55
|
ref_for: !0
|
|
55
56
|
}, o), null, 16))
|
|
56
57
|
], 64))), 128)),
|
|
57
|
-
|
|
58
|
+
g.value ? (t(), r(p, {
|
|
58
59
|
key: 0,
|
|
59
|
-
actions:
|
|
60
|
-
"show-icon": !1,
|
|
60
|
+
actions: l.value.menuActions,
|
|
61
61
|
placement: e.placement,
|
|
62
|
-
trigger: e.trigger
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
A(i(y), { rotate: 90 })
|
|
66
|
-
]),
|
|
67
|
-
_: 1
|
|
68
|
-
}, 8, ["actions", "placement", "trigger"])) : v("", !0)
|
|
62
|
+
trigger: e.trigger,
|
|
63
|
+
text: c(_)("ap.common.more")
|
|
64
|
+
}, null, 8, ["actions", "placement", "trigger", "text"])) : v("", !0)
|
|
69
65
|
]),
|
|
70
66
|
_: 1
|
|
71
67
|
}));
|
|
72
68
|
}
|
|
73
69
|
});
|
|
74
70
|
export {
|
|
75
|
-
|
|
71
|
+
q as default
|
|
76
72
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as _, ref as v, computed as k, openBlock as t, createBlock as l, unref as r, withCtx as n, createVNode as u, createElementBlock as w, Fragment as
|
|
1
|
+
import { defineComponent as _, ref as v, computed as k, openBlock as t, createBlock as l, unref as r, withCtx as n, createVNode as u, createElementBlock as w, Fragment as A, renderList as B, normalizeClass as s, mergeProps as i, createElementVNode as b, normalizeProps as C, guardReactiveProps as I, renderSlot as P, createCommentVNode as D } from "vue";
|
|
2
2
|
import { Dropdown as N, Menu as $, MenuItem as h } from "ant-design-vue";
|
|
3
|
-
import { DownOutlined as V } from "@ant-design/icons-vue";
|
|
4
3
|
import "../item/index.vue.mjs";
|
|
5
4
|
import "../item-modal/index.vue2.mjs";
|
|
6
5
|
import "../item-popconfirm/index.vue2.mjs";
|
|
6
|
+
import { IconApAdLineDown as L } from "@aplus-frontend/icon";
|
|
7
7
|
import "../../config-provider/index.mjs";
|
|
8
|
-
import { isUndefined as
|
|
8
|
+
import { isUndefined as V, omit as z } from "lodash-unified";
|
|
9
9
|
import "../style/item-dropdown.css";
|
|
10
|
-
import { useNamespace as
|
|
10
|
+
import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
11
|
import M from "../item-modal/index.vue.mjs";
|
|
12
12
|
import U from "../item-popconfirm/index.vue.mjs";
|
|
13
13
|
import d from "../item/index.vue2.mjs";
|
|
@@ -27,7 +27,7 @@ const W = /* @__PURE__ */ _({
|
|
|
27
27
|
loading: { type: Boolean, default: !1 }
|
|
28
28
|
},
|
|
29
29
|
setup(c) {
|
|
30
|
-
const f = c, p = v(!1), { e:
|
|
30
|
+
const f = c, p = v(!1), { e: m } = E("action-item-dropdown"), g = k(() => f.actions.filter((e) => e.visible || V(e.visible)).map((e) => ({
|
|
31
31
|
...e,
|
|
32
32
|
onAction: async (a) => {
|
|
33
33
|
var o;
|
|
@@ -47,9 +47,9 @@ const W = /* @__PURE__ */ _({
|
|
|
47
47
|
overlay: n(() => [
|
|
48
48
|
u(r($), null, {
|
|
49
49
|
default: n(() => [
|
|
50
|
-
(t(!0), w(
|
|
50
|
+
(t(!0), w(A, null, B(g.value, (o, y) => (t(), l(r(h), {
|
|
51
51
|
key: y,
|
|
52
|
-
class:
|
|
52
|
+
class: s(r(m)("item"))
|
|
53
53
|
}, {
|
|
54
54
|
default: n(() => [
|
|
55
55
|
o.modalProps ? (t(), l(M, i({
|
|
@@ -70,20 +70,19 @@ const W = /* @__PURE__ */ _({
|
|
|
70
70
|
})
|
|
71
71
|
]),
|
|
72
72
|
default: n(() => [
|
|
73
|
-
|
|
74
|
-
class:
|
|
73
|
+
b("span", {
|
|
74
|
+
class: s(r(m)("wrapper"))
|
|
75
75
|
}, [
|
|
76
|
-
u(d, C(
|
|
76
|
+
u(d, C(I(r(z)(f, ["actions", "trigger", "placement"]))), {
|
|
77
77
|
default: n(() => [
|
|
78
|
-
|
|
78
|
+
P(e.$slots, "default")
|
|
79
79
|
]),
|
|
80
80
|
_: 3
|
|
81
81
|
}, 16),
|
|
82
|
-
e.showIcon ? (t(), l(r(
|
|
82
|
+
e.showIcon ? (t(), l(r(L), {
|
|
83
83
|
key: 0,
|
|
84
|
-
class:
|
|
85
|
-
|
|
86
|
-
}, null, 8, ["class"])) : I("", !0)
|
|
84
|
+
class: s(r(m)("icon"))
|
|
85
|
+
}, null, 8, ["class"])) : D("", !0)
|
|
87
86
|
], 2)
|
|
88
87
|
]),
|
|
89
88
|
_: 3
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { Col as
|
|
3
|
-
import { pick as
|
|
4
|
-
import { apFormItemColPropKeys as
|
|
5
|
-
import { genRealChildren as l, buildColSpan as
|
|
1
|
+
import { isVNode as g, defineComponent as _, useSlots as k, watch as b, onBeforeUpdate as h, shallowRef as x, computed as B, unref as p, createVNode as R, mergeProps as m, openBlock as s, createBlock as i, withCtx as S, createElementBlock as j, Fragment as v, renderList as N, resolveDynamicComponent as P } from "vue";
|
|
2
|
+
import { Col as $, Row as D } from "ant-design-vue";
|
|
3
|
+
import { pick as F } from "lodash-unified";
|
|
4
|
+
import { apFormItemColPropKeys as I } from "../constant.mjs";
|
|
5
|
+
import { genRealChildren as l, buildColSpan as O } from "./helper.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
7
|
import "../style/ap-form-item-group.css";
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
function
|
|
10
|
-
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !
|
|
8
|
+
import { useNamespace as V } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
function A(r) {
|
|
10
|
+
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !g(r);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const J = /* @__PURE__ */ _({
|
|
13
13
|
name: "ApFormItemGroup",
|
|
14
14
|
__name: "index",
|
|
15
15
|
props: {
|
|
@@ -30,7 +30,7 @@ const M = /* @__PURE__ */ _({
|
|
|
30
30
|
setup(r) {
|
|
31
31
|
const {
|
|
32
32
|
b: c
|
|
33
|
-
} =
|
|
33
|
+
} = V("ap-form-item-group"), {
|
|
34
34
|
countPerRow: f,
|
|
35
35
|
...d
|
|
36
36
|
} = r, n = k();
|
|
@@ -39,26 +39,26 @@ const M = /* @__PURE__ */ _({
|
|
|
39
39
|
}), h(() => {
|
|
40
40
|
a.value = l(n.default());
|
|
41
41
|
});
|
|
42
|
-
const a = x(l(n.default())),
|
|
43
|
-
const t = e.props, o =
|
|
44
|
-
return R(
|
|
45
|
-
key: u
|
|
46
|
-
},
|
|
47
|
-
class:
|
|
48
|
-
}),
|
|
42
|
+
const a = x(l(n.default())), w = B(() => p(a).map((e, u) => {
|
|
43
|
+
const t = e.props, o = F(t, I), y = o != null && o.span ? {} : O(f), C = !!(t != null && t.hidden);
|
|
44
|
+
return R($, m({
|
|
45
|
+
key: `${u}-${Date.now()}`
|
|
46
|
+
}, y, o, {
|
|
47
|
+
class: C ? c("col-hidden") : ""
|
|
48
|
+
}), A(e) ? e : {
|
|
49
49
|
default: () => [e]
|
|
50
50
|
});
|
|
51
51
|
}));
|
|
52
|
-
return (e, u) => (s(), i(p(
|
|
52
|
+
return (e, u) => (s(), i(p(D), m({
|
|
53
53
|
class: p(c)()
|
|
54
54
|
}, d), {
|
|
55
|
-
default: S(() => [(s(!0), j(v, null, N(
|
|
56
|
-
key: o
|
|
55
|
+
default: S(() => [(s(!0), j(v, null, N(w.value, (t, o) => (s(), i(P(t), {
|
|
56
|
+
key: `${o}-${Date.now()}`
|
|
57
57
|
}))), 128))]),
|
|
58
58
|
_: 1
|
|
59
59
|
}, 16, ["class"]));
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
J as default
|
|
64
64
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Form as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { isArray as
|
|
5
|
-
import { apFormItemColPropKeys as
|
|
6
|
-
import { QuestionCircleOutlined as
|
|
1
|
+
import { defineComponent as q, useSlots as D, ref as f, onMounted as E, computed as h, unref as t, watch as K, cloneVNode as O, openBlock as C, createBlock as g, mergeProps as Q, createSlots as U, withCtx as i, resolveDynamicComponent as w, createCommentVNode as G, createElementVNode as H, normalizeClass as J, createVNode as V, normalizeStyle as M, renderList as W, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
|
|
2
|
+
import { Form as ee, Tooltip as oe } from "ant-design-vue";
|
|
3
|
+
import { useToken as te } from "ant-design-vue/es/theme/internal";
|
|
4
|
+
import { isArray as le, omit as k } from "lodash-unified";
|
|
5
|
+
import { apFormItemColPropKeys as re } from "./constant.mjs";
|
|
6
|
+
import { QuestionCircleOutlined as ae } from "@ant-design/icons-vue";
|
|
7
7
|
import "../config-provider/index.mjs";
|
|
8
|
-
import { useInjectForm as
|
|
8
|
+
import { useInjectForm as ne } from "./context.mjs";
|
|
9
9
|
import "./style/ap-form-item.css";
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
const
|
|
10
|
+
import { useNamespace as ue } from "../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
const be = /* @__PURE__ */ q({
|
|
12
12
|
name: "ApFormItem",
|
|
13
13
|
__name: "ap-form-item",
|
|
14
14
|
props: {
|
|
@@ -47,95 +47,103 @@ const ye = /* @__PURE__ */ j({
|
|
|
47
47
|
xxl: {},
|
|
48
48
|
flex: {},
|
|
49
49
|
bordered: { type: Boolean, default: !1 },
|
|
50
|
-
valuePropName: { default: "value" }
|
|
50
|
+
valuePropName: { default: "value" },
|
|
51
|
+
initialValue: {}
|
|
51
52
|
},
|
|
52
53
|
setup(N, { expose: P }) {
|
|
53
|
-
var
|
|
54
|
-
const
|
|
55
|
-
|
|
54
|
+
var F, b;
|
|
55
|
+
const o = N, l = D(), { model: u, updateModel: d, internalInstance: s } = ne(), { m: p, b: x } = ue("ap-form-item"), m = f(!1), r = f(), [, S] = te();
|
|
56
|
+
E(() => {
|
|
57
|
+
s == null || s.registerField({
|
|
58
|
+
name: o.name,
|
|
59
|
+
initialValue: o.initialValue
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
const c = h(() => o.name ? le(o.name) ? o.name.reduce((e, a) => e == null ? void 0 : e[a], t(u)) : u == null ? void 0 : u.value[o.name] : null), v = f((b = (F = l.default) == null ? void 0 : F.call(l)) == null ? void 0 : b[0]);
|
|
63
|
+
K(
|
|
56
64
|
() => {
|
|
57
65
|
var e;
|
|
58
|
-
return (e =
|
|
66
|
+
return (e = l.default) == null ? void 0 : e.call(l);
|
|
59
67
|
},
|
|
60
68
|
(e) => {
|
|
61
|
-
|
|
69
|
+
v.value = e == null ? void 0 : e[0];
|
|
62
70
|
}
|
|
63
71
|
);
|
|
64
72
|
function I(e) {
|
|
65
|
-
d == null || d(
|
|
66
|
-
}
|
|
67
|
-
function S() {
|
|
68
|
-
s.value = !0;
|
|
73
|
+
d == null || d(o.name, e);
|
|
69
74
|
}
|
|
70
75
|
function _() {
|
|
71
|
-
|
|
76
|
+
m.value = !0;
|
|
72
77
|
}
|
|
73
|
-
|
|
78
|
+
function z() {
|
|
79
|
+
m.value = !1;
|
|
80
|
+
}
|
|
81
|
+
const y = h(() => {
|
|
74
82
|
var a, n;
|
|
75
|
-
if (!
|
|
76
|
-
return (a =
|
|
77
|
-
const e =
|
|
78
|
-
return e ?
|
|
79
|
-
[
|
|
80
|
-
[`onUpdate:${
|
|
81
|
-
bordered:
|
|
82
|
-
onFocus:
|
|
83
|
-
onBlur:
|
|
83
|
+
if (!o.name)
|
|
84
|
+
return (a = l.default()) == null ? void 0 : a[0];
|
|
85
|
+
const e = t(v);
|
|
86
|
+
return e ? O(e, {
|
|
87
|
+
[o.valuePropName]: t(c),
|
|
88
|
+
[`onUpdate:${o.valuePropName}`]: I,
|
|
89
|
+
bordered: o.bordered ? !1 : (n = e == null ? void 0 : e.props) == null ? void 0 : n.bordered,
|
|
90
|
+
onFocus: _,
|
|
91
|
+
onBlur: z
|
|
84
92
|
}) : null;
|
|
85
93
|
});
|
|
86
|
-
function z() {
|
|
87
|
-
var e;
|
|
88
|
-
(e = l.value) == null || e.onFieldBlur();
|
|
89
|
-
}
|
|
90
94
|
function A() {
|
|
91
95
|
var e;
|
|
92
|
-
(e =
|
|
96
|
+
(e = r.value) == null || e.onFieldBlur();
|
|
93
97
|
}
|
|
94
98
|
function R() {
|
|
95
99
|
var e;
|
|
96
|
-
(e =
|
|
100
|
+
(e = r.value) == null || e.onFieldChange();
|
|
97
101
|
}
|
|
98
102
|
function T() {
|
|
99
103
|
var e;
|
|
100
|
-
(e =
|
|
104
|
+
(e = r.value) == null || e.clearValidate();
|
|
101
105
|
}
|
|
102
106
|
function L() {
|
|
103
|
-
|
|
107
|
+
var e;
|
|
108
|
+
(e = r.value) == null || e.resetField();
|
|
109
|
+
}
|
|
110
|
+
function $() {
|
|
111
|
+
return t(c);
|
|
104
112
|
}
|
|
105
113
|
return P({
|
|
106
|
-
onFieldBlur:
|
|
107
|
-
onFieldChange:
|
|
108
|
-
clearValidate:
|
|
109
|
-
resetField:
|
|
110
|
-
getFieldValue:
|
|
111
|
-
}), (e, a) => (
|
|
114
|
+
onFieldBlur: A,
|
|
115
|
+
onFieldChange: R,
|
|
116
|
+
clearValidate: T,
|
|
117
|
+
resetField: L,
|
|
118
|
+
getFieldValue: $
|
|
119
|
+
}), (e, a) => (C(), g(t(ee).Item, Q({
|
|
112
120
|
ref_key: "formItemRef",
|
|
113
|
-
ref:
|
|
114
|
-
},
|
|
121
|
+
ref: r
|
|
122
|
+
}, t(k)(o, [...t(re), "tooltip"]), {
|
|
115
123
|
class: {
|
|
116
|
-
[
|
|
117
|
-
[
|
|
118
|
-
[
|
|
124
|
+
[t(p)("bordered")]: e.bordered,
|
|
125
|
+
[t(p)("focused")]: e.bordered && m.value,
|
|
126
|
+
[t(x)()]: !0
|
|
119
127
|
},
|
|
120
|
-
colon: e.bordered ? !1 :
|
|
121
|
-
}),
|
|
128
|
+
colon: e.bordered ? !1 : o.colon
|
|
129
|
+
}), U({
|
|
122
130
|
default: i(() => [
|
|
123
|
-
|
|
131
|
+
y.value ? (C(), g(w(y.value), { key: 0 })) : G("", !0)
|
|
124
132
|
]),
|
|
125
133
|
_: 2
|
|
126
134
|
}, [
|
|
127
|
-
|
|
135
|
+
o.tooltip ? {
|
|
128
136
|
name: "tooltip",
|
|
129
137
|
fn: i(({ class: n }) => [
|
|
130
|
-
|
|
131
|
-
class:
|
|
138
|
+
H("span", {
|
|
139
|
+
class: J(n)
|
|
132
140
|
}, [
|
|
133
|
-
|
|
134
|
-
title:
|
|
141
|
+
V(t(oe), {
|
|
142
|
+
title: o.tooltip
|
|
135
143
|
}, {
|
|
136
144
|
default: i(() => [
|
|
137
|
-
|
|
138
|
-
style:
|
|
145
|
+
V(t(ae), {
|
|
146
|
+
style: M({ color: t(S).colorPrimary })
|
|
139
147
|
}, null, 8, ["style"])
|
|
140
148
|
]),
|
|
141
149
|
_: 1
|
|
@@ -144,15 +152,15 @@ const ye = /* @__PURE__ */ j({
|
|
|
144
152
|
]),
|
|
145
153
|
key: "0"
|
|
146
154
|
} : void 0,
|
|
147
|
-
|
|
148
|
-
name:
|
|
149
|
-
fn: i((
|
|
150
|
-
|
|
155
|
+
W(t(k)(l, "default"), (n, B) => ({
|
|
156
|
+
name: B,
|
|
157
|
+
fn: i((j) => [
|
|
158
|
+
X(e.$slots, B, Y(Z(j || {})))
|
|
151
159
|
])
|
|
152
160
|
}))
|
|
153
161
|
]), 1040, ["class", "colon"]));
|
|
154
162
|
}
|
|
155
163
|
});
|
|
156
164
|
export {
|
|
157
|
-
|
|
165
|
+
be as default
|
|
158
166
|
};
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import { ApFormProps, WatchFunc } from './interface';
|
|
1
|
+
import { ApFormProps, RegistedFieldType, WatchFunc } from './interface';
|
|
2
2
|
import { InternalNamePath, NamePath, ValidateOptions, FormLabelAlign } from 'ant-design-vue/es/form/interface';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* 订阅事件
|
|
7
7
|
*/
|
|
8
|
-
declare function registerWatch(callback: WatchFunc): () => void;
|
|
8
|
+
declare function registerWatch(callback: WatchFunc, inner: boolean): () => void;
|
|
9
|
+
/**
|
|
10
|
+
* 注册表单项
|
|
11
|
+
* @param field
|
|
12
|
+
*/
|
|
13
|
+
declare function registerField({ initialValue, name }: RegistedFieldType): void;
|
|
14
|
+
declare function getInternalInstance(mark: string): {
|
|
15
|
+
registerField: typeof registerField;
|
|
16
|
+
registerWatch: typeof registerWatch;
|
|
17
|
+
} | undefined;
|
|
9
18
|
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFormProps>, {
|
|
10
19
|
layout: string;
|
|
11
20
|
hideRequiredMark: boolean;
|
|
@@ -14,7 +23,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
14
23
|
validateOnRuleChange: boolean;
|
|
15
24
|
validateTrigger: string;
|
|
16
25
|
}>, {
|
|
17
|
-
resetFields: (
|
|
26
|
+
resetFields: () => void;
|
|
18
27
|
clearValidate: (name?: NamePath | undefined) => void;
|
|
19
28
|
validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<{
|
|
20
29
|
[key: string]: any;
|
|
@@ -29,6 +38,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
29
38
|
setFieldsValue: (values: Record<string, any>) => void;
|
|
30
39
|
setFieldValue: (key: any, newValue: any) => void;
|
|
31
40
|
registerWatch: typeof registerWatch;
|
|
41
|
+
getInternalInstance: typeof getInternalInstance;
|
|
32
42
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFormProps>, {
|
|
33
43
|
layout: string;
|
|
34
44
|
hideRequiredMark: boolean;
|