@aplus-frontend/ui 7.13.12 → 7.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.mjs +58 -56
- package/es/src/ap-field/text/index.vue2.mjs +2 -2
- package/es/src/ap-field/text/password.vue.mjs +8 -8
- package/es/src/ap-form/ap-form.vue.d.ts +1 -0
- package/es/src/ap-form/ap-form.vue2.mjs +122 -106
- package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -0
- package/es/src/ap-form/drawer-form/index.vue.mjs +13 -10
- package/es/src/ap-form/interface.d.ts +5 -0
- package/es/src/ap-form/item/index.vue.d.ts +1 -0
- package/es/src/ap-form/item/index.vue.mjs +84 -70
- package/es/src/ap-form/items/checkbox/index.vue.mjs +9 -8
- package/es/src/ap-form/items/date/index.vue.mjs +10 -9
- package/es/src/ap-form/items/date-range/index.vue.mjs +10 -9
- package/es/src/ap-form/items/number/index.vue.mjs +7 -6
- package/es/src/ap-form/items/radio/index.vue.mjs +9 -8
- package/es/src/ap-form/items/select/index.vue.mjs +3 -2
- package/es/src/ap-form/items/switch/index.vue.mjs +10 -9
- package/es/src/ap-form/items/text/index.vue2.mjs +6 -5
- package/es/src/ap-form/items/text/password.vue.mjs +10 -9
- package/es/src/ap-form/items/text-area/index.vue.mjs +4 -3
- package/es/src/ap-form/items/tree-select/index.vue.mjs +1 -0
- package/es/src/ap-form/modal-form/index.vue.d.ts +4 -0
- package/es/src/ap-form/modal-form/index.vue.mjs +3 -0
- package/es/src/ap-form/render/item.vue.mjs +6 -5
- package/es/src/ap-form/search-form/index.vue.d.ts +4 -0
- package/es/src/ap-form/search-form/index.vue.mjs +26 -23
- package/es/src/ap-table/ap-table.vue2.mjs +2 -2
- package/es/src/ap-table/components/setting/index.d.ts +2 -0
- package/es/src/ap-table/components/setting/index.mjs +5 -0
- package/es/src/ap-table/components/setting/modal/index.vue.mjs +277 -2
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +2 -273
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +11 -8
- package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +2 -0
- package/es/src/ap-table/components/setting/template/item.vue2.mjs +35 -35
- package/es/src/ap-table/hooks/use-table-template-storage.mjs +55 -54
- package/es/src/ap-table/index.d.ts +2 -2
- package/es/src/ap-table/index.mjs +7 -6
- package/es/src/ap-table/interface.d.ts +16 -0
- package/es/src/business/ap-size-input/form-item.vue.mjs +6 -5
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +2 -0
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -0
- package/es/src/business/batch-input-group/form-item.vue.mjs +8 -7
- package/es/src/index.mjs +54 -52
- package/es/src/locale/lang/en.mjs +1 -0
- package/es/src/locale/lang/zh-cn.mjs +1 -0
- package/es/src/render/render.d.ts +7 -4
- package/es/src/render/render.mjs +17 -7
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +1 -0
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -0
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/interface.d.ts +5 -0
- package/lib/src/ap-form/item/index.vue.d.ts +1 -0
- package/lib/src/ap-form/item/index.vue.js +1 -1
- 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/items/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -0
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/render/item.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +4 -0
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/index.d.ts +2 -0
- package/lib/src/ap-table/components/setting/index.js +1 -0
- package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +2 -0
- package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -1
- package/lib/src/ap-table/hooks/use-table-template-storage.js +1 -1
- package/lib/src/ap-table/index.d.ts +2 -2
- package/lib/src/ap-table/index.js +1 -1
- package/lib/src/ap-table/interface.d.ts +16 -0
- package/lib/src/business/ap-size-input/form-item.vue.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +2 -0
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -0
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/render/render.d.ts +7 -4
- package/lib/src/render/render.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +5 -5
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as g, ref as b, createElementBlock as c, openBlock as s, normalizeClass as n, unref as t, createElementVNode as f, createBlock as w, createCommentVNode as v, toDisplayString as B, withCtx as r, createVNode as i, withModifiers as d } from "vue";
|
|
2
2
|
import { EditOutlined as N, DeleteOutlined as A } from "@ant-design/icons-vue";
|
|
3
3
|
import { Flex as D, Popover as E } from "@aplus-frontend/antdv";
|
|
4
4
|
import "../../../../config-provider/index.mjs";
|
|
5
|
-
import { useInjectApColumnSetting as
|
|
5
|
+
import { useInjectApColumnSetting as S } from "../context.mjs";
|
|
6
6
|
import "./edit-form.vue.mjs";
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
7
|
+
import { useNamespace as V } from "../../../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
import F from "./edit-form.vue2.mjs";
|
|
9
|
+
const K = /* @__PURE__ */ g({
|
|
10
10
|
__name: "item",
|
|
11
11
|
props: {
|
|
12
12
|
value: {},
|
|
@@ -14,29 +14,29 @@ const M = /* @__PURE__ */ b({
|
|
|
14
14
|
onClick: { type: Function },
|
|
15
15
|
shouldRemove: { type: Boolean }
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const p =
|
|
19
|
-
function y(
|
|
20
|
-
if (!
|
|
17
|
+
setup(C) {
|
|
18
|
+
const p = C, { b: l } = V("ap-column-setting-template-item"), a = b(!1), { deleteTemplate: k, cacheConfig: m } = S();
|
|
19
|
+
function y(o) {
|
|
20
|
+
if (!o || o === p.value.label)
|
|
21
21
|
return;
|
|
22
|
-
const
|
|
23
|
-
|
|
22
|
+
const e = p.value;
|
|
23
|
+
e.label = o, m.value?.onChange?.(e.columnState, e), a.value = !1;
|
|
24
24
|
}
|
|
25
|
-
return (
|
|
26
|
-
class: n([
|
|
27
|
-
onClick:
|
|
28
|
-
(...
|
|
25
|
+
return (o, e) => (s(), c("div", {
|
|
26
|
+
class: n([t(l)(), { [t(l)("active")]: o.isActive }]),
|
|
27
|
+
onClick: e[3] || (e[3] = //@ts-ignore
|
|
28
|
+
(...u) => o.onClick && o.onClick(...u))
|
|
29
29
|
}, [
|
|
30
|
-
|
|
31
|
-
class: n(
|
|
32
|
-
}, B(
|
|
33
|
-
|
|
30
|
+
f("span", {
|
|
31
|
+
class: n(t(l)("label"))
|
|
32
|
+
}, B(o.value.label), 3),
|
|
33
|
+
t(m).persistenceKey ? (s(), w(t(D), {
|
|
34
34
|
key: 0,
|
|
35
35
|
gap: 8,
|
|
36
|
-
class: n(
|
|
36
|
+
class: n(t(l)("action-wrapper"))
|
|
37
37
|
}, {
|
|
38
38
|
default: r(() => [
|
|
39
|
-
i(
|
|
39
|
+
i(t(E), {
|
|
40
40
|
open: a.value,
|
|
41
41
|
trigger: "click",
|
|
42
42
|
arrow: !1,
|
|
@@ -44,36 +44,36 @@ const M = /* @__PURE__ */ b({
|
|
|
44
44
|
"destroy-tooltip-on-hide": ""
|
|
45
45
|
}, {
|
|
46
46
|
content: r(() => [
|
|
47
|
-
i(
|
|
47
|
+
i(F, {
|
|
48
48
|
"is-edit": "",
|
|
49
|
-
"initial-values": { label:
|
|
49
|
+
"initial-values": { label: o.value.label },
|
|
50
50
|
onConfirm: y,
|
|
51
|
-
onCancel:
|
|
51
|
+
onCancel: e[1] || (e[1] = () => a.value = !1)
|
|
52
52
|
}, null, 8, ["initial-values"])
|
|
53
53
|
]),
|
|
54
54
|
default: r(() => [
|
|
55
|
-
|
|
56
|
-
class: n(
|
|
57
|
-
onClick:
|
|
55
|
+
f("span", {
|
|
56
|
+
class: n(t(l)("icon-wrapper")),
|
|
57
|
+
onClick: e[0] || (e[0] = d((u) => a.value = !0, ["stop"]))
|
|
58
58
|
}, [
|
|
59
|
-
i(
|
|
59
|
+
i(t(N))
|
|
60
60
|
], 2)
|
|
61
61
|
]),
|
|
62
62
|
_: 1
|
|
63
63
|
}, 8, ["open"]),
|
|
64
|
-
|
|
64
|
+
o.shouldRemove ? (s(), c("span", {
|
|
65
65
|
key: 0,
|
|
66
|
-
class: n(
|
|
67
|
-
onClick:
|
|
66
|
+
class: n(t(l)("icon-wrapper")),
|
|
67
|
+
onClick: e[2] || (e[2] = d(() => t(k)(o.value.key), ["stop"]))
|
|
68
68
|
}, [
|
|
69
|
-
i(
|
|
70
|
-
], 2)) :
|
|
69
|
+
i(t(A))
|
|
70
|
+
], 2)) : v("", !0)
|
|
71
71
|
]),
|
|
72
72
|
_: 1
|
|
73
|
-
}, 8, ["class"])) :
|
|
73
|
+
}, 8, ["class"])) : v("", !0)
|
|
74
74
|
], 2));
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
export {
|
|
78
|
-
|
|
78
|
+
K as default
|
|
79
79
|
};
|
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import { useToken as
|
|
2
|
-
import { isBoolean as J, isNumber as
|
|
1
|
+
import { useToken as C } from "@aplus-frontend/antdv/es/theme/internal";
|
|
2
|
+
import { isBoolean as J, isNumber as v, isObject as x, mergeWith as y, omit as M, isString as j } from "lodash-unified";
|
|
3
3
|
import { ref as S, unref as c, watch as h } from "vue";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { randomStr as
|
|
5
|
+
import { randomStr as A } from "../../utils/index.mjs";
|
|
6
6
|
import { getColumnStateString as G } from "../components/setting/utils.mjs";
|
|
7
|
-
import { useInjectApTable as
|
|
7
|
+
import { useInjectApTable as P } from "../context.mjs";
|
|
8
8
|
import { getTableTitle as R } from "../utils.mjs";
|
|
9
|
+
import { useLocale as U } from "../../config-provider/hooks/use-locale.mjs";
|
|
9
10
|
import { useNamespace as W } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
11
|
function X(t, e, i, o) {
|
|
11
12
|
return o ? o.fixed : e ? e.fixed : i && "fixed" in i ? i.fixed : J(t.fixed) ? t.fixed ? "left" : void 0 : t.fixed;
|
|
12
13
|
}
|
|
13
|
-
const b = Number.MAX_SAFE_INTEGER, q =
|
|
14
|
-
function
|
|
15
|
-
const i =
|
|
16
|
-
let o =
|
|
14
|
+
const b = Number.MAX_SAFE_INTEGER, q = A();
|
|
15
|
+
function D(t, e) {
|
|
16
|
+
const i = v(t.order) ? t.order : b;
|
|
17
|
+
let o = v(e.order) ? e.order : b;
|
|
17
18
|
return t.fixed === "right" && e.fixed !== "right" && (o = i - 1), e.fixed === "left" && t.fixed !== "left" && (o = i - 1), i - o;
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
+
function H(t, e) {
|
|
20
21
|
e && t.removeItem(e);
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function K(t, e) {
|
|
23
24
|
if (!e)
|
|
24
25
|
return [];
|
|
25
26
|
const i = t.getItem(e);
|
|
26
27
|
if (!i)
|
|
27
28
|
return [];
|
|
28
29
|
const o = JSON.parse(i);
|
|
29
|
-
return Array.isArray(o) ? o : (
|
|
30
|
+
return Array.isArray(o) ? o : (H(t, e), []);
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
+
function k(t, e) {
|
|
32
33
|
if (x(t) && x(e))
|
|
33
|
-
return y({}, t, e,
|
|
34
|
+
return y({}, t, e, k);
|
|
34
35
|
}
|
|
35
|
-
const
|
|
36
|
-
const { columnsBackup: i, size: o } =
|
|
36
|
+
const ae = (t, e) => {
|
|
37
|
+
const { columnsBackup: i, size: o } = P(), { t: I } = U(), { be: E } = W("ap-table"), [Q, N] = C(), m = S(), l = S(
|
|
37
38
|
z(
|
|
38
|
-
|
|
39
|
+
K(localStorage, c(e))
|
|
39
40
|
)
|
|
40
41
|
);
|
|
41
42
|
h(
|
|
@@ -43,7 +44,7 @@ const ie = (t, e) => {
|
|
|
43
44
|
([r, n]) => {
|
|
44
45
|
r && (m.value = {
|
|
45
46
|
label: "basic_template",
|
|
46
|
-
columnState:
|
|
47
|
+
columnState: f(r),
|
|
47
48
|
key: q,
|
|
48
49
|
size: n
|
|
49
50
|
});
|
|
@@ -53,55 +54,55 @@ const ie = (t, e) => {
|
|
|
53
54
|
function z(r) {
|
|
54
55
|
return r.length ? r.map((n) => ({
|
|
55
56
|
...n,
|
|
56
|
-
columnState:
|
|
57
|
+
columnState: f(
|
|
57
58
|
i.value,
|
|
58
59
|
n.columnState,
|
|
59
60
|
!1
|
|
60
61
|
)
|
|
61
62
|
})) : [
|
|
62
63
|
{
|
|
63
|
-
label: "
|
|
64
|
-
key:
|
|
64
|
+
label: I("ap.apTable.setting.defaultTemplate"),
|
|
65
|
+
key: t.getActiveKey?.("DEFAULT_TEMPLATE") ?? A(),
|
|
65
66
|
size: o?.value,
|
|
66
|
-
columnState:
|
|
67
|
+
columnState: f(i?.value || [])
|
|
67
68
|
}
|
|
68
69
|
];
|
|
69
70
|
}
|
|
70
|
-
function
|
|
71
|
+
function f(r, n = {}, a = !0) {
|
|
71
72
|
const d = y(
|
|
72
73
|
{},
|
|
73
74
|
a ? t.defaultValue || {} : {},
|
|
74
75
|
n,
|
|
75
|
-
|
|
76
|
+
k
|
|
76
77
|
);
|
|
77
|
-
function
|
|
78
|
-
return
|
|
79
|
-
const
|
|
80
|
-
key:
|
|
81
|
-
label: j(
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
function T(B, F, w) {
|
|
79
|
+
return B.map((u) => {
|
|
80
|
+
const g = F?.[u.key] || {}, s = {
|
|
81
|
+
key: u.key,
|
|
82
|
+
label: j(u.title) ? R(
|
|
83
|
+
u,
|
|
84
|
+
E("table-header", "title"),
|
|
84
85
|
void 0,
|
|
85
86
|
N.value.colorTextTertiary
|
|
86
|
-
) :
|
|
87
|
+
) : u.title,
|
|
87
88
|
show: !0,
|
|
88
89
|
fixed: X(
|
|
89
|
-
|
|
90
|
+
u,
|
|
90
91
|
void 0,
|
|
91
|
-
a ? t.defaultValue?.[
|
|
92
|
-
|
|
92
|
+
a ? t.defaultValue?.[u.key] : void 0,
|
|
93
|
+
w
|
|
93
94
|
),
|
|
94
95
|
disabled: !1,
|
|
95
|
-
...
|
|
96
|
+
...M(g, ["children", "fixed"])
|
|
96
97
|
};
|
|
97
|
-
return s.children =
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
return s.children = u.children?.length ? T(
|
|
99
|
+
u.children,
|
|
100
|
+
g.children,
|
|
100
101
|
s
|
|
101
102
|
) : void 0, s;
|
|
102
|
-
}).sort(
|
|
103
|
+
}).sort(D);
|
|
103
104
|
}
|
|
104
|
-
return
|
|
105
|
+
return T(r || [], d);
|
|
105
106
|
}
|
|
106
107
|
function p(r) {
|
|
107
108
|
if (c(e)) {
|
|
@@ -112,39 +113,39 @@ const ie = (t, e) => {
|
|
|
112
113
|
localStorage.setItem(c(e), JSON.stringify(n));
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
|
-
function
|
|
116
|
-
|
|
116
|
+
function L(r) {
|
|
117
|
+
l.value.push(r);
|
|
117
118
|
}
|
|
118
119
|
function _(r) {
|
|
119
|
-
const n =
|
|
120
|
+
const n = l.value.findIndex(
|
|
120
121
|
(a) => a.key === r
|
|
121
122
|
);
|
|
122
|
-
|
|
123
|
+
l.value.splice(n, 1);
|
|
123
124
|
}
|
|
124
|
-
function
|
|
125
|
-
const a =
|
|
125
|
+
function O(r, n) {
|
|
126
|
+
const a = l.value.findIndex(
|
|
126
127
|
(d) => d.key === r
|
|
127
128
|
);
|
|
128
|
-
return
|
|
129
|
-
...
|
|
129
|
+
return l.value[a] = {
|
|
130
|
+
...l.value[a],
|
|
130
131
|
...n
|
|
131
|
-
},
|
|
132
|
+
}, l.value[a];
|
|
132
133
|
}
|
|
133
134
|
return h(
|
|
134
|
-
() =>
|
|
135
|
+
() => l.value,
|
|
135
136
|
(r) => {
|
|
136
137
|
p(r);
|
|
137
138
|
},
|
|
138
139
|
{ deep: !0, immediate: !0 }
|
|
139
140
|
), {
|
|
140
141
|
basicTemplate: m,
|
|
141
|
-
customizeTemplateList:
|
|
142
|
+
customizeTemplateList: l,
|
|
142
143
|
syncTemplateListToStorage: p,
|
|
143
|
-
addTemplate:
|
|
144
|
+
addTemplate: L,
|
|
144
145
|
deleteTemplate: _,
|
|
145
|
-
updateTemplate:
|
|
146
|
+
updateTemplate: O
|
|
146
147
|
};
|
|
147
148
|
};
|
|
148
149
|
export {
|
|
149
|
-
|
|
150
|
+
ae as useTableTemplateStorage
|
|
150
151
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { default as _ApTable } from './ap-table.vue';
|
|
2
|
-
import { default as ApTableSetting } from './components/setting
|
|
2
|
+
import { default as ApTableSetting } from './components/setting';
|
|
3
3
|
type ApTableMixedType = typeof _ApTable & {
|
|
4
4
|
Setting: typeof ApTableSetting;
|
|
5
5
|
};
|
|
6
6
|
declare const ApTable: ApTableMixedType;
|
|
7
|
-
export { ApTable };
|
|
7
|
+
export { ApTable, ApTableSetting };
|
|
8
8
|
export * from './interface';
|
|
9
9
|
export * from './hooks/use-table-paging';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import "./ap-table.vue.mjs";
|
|
2
|
-
import "./components/setting/
|
|
2
|
+
import "./components/setting/index.mjs";
|
|
3
3
|
import "./interface.mjs";
|
|
4
4
|
import { useTablePaging as s } from "./hooks/use-table-paging.mjs";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
|
|
5
|
+
import t from "./ap-table.vue2.mjs";
|
|
6
|
+
import o from "./components/setting/modal/index.vue.mjs";
|
|
7
|
+
const i = t;
|
|
8
|
+
i.Setting = o;
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
i as ApTable,
|
|
11
|
+
o as ApTableSetting,
|
|
11
12
|
s as useTablePaging
|
|
12
13
|
};
|
|
@@ -99,6 +99,22 @@ export type ApTableSettingType = {
|
|
|
99
99
|
* @returns
|
|
100
100
|
*/
|
|
101
101
|
onChange?: (val: ApColumnState[], template: ApColumnTemplate) => void;
|
|
102
|
+
/**
|
|
103
|
+
* 当前正在使用的模板变更回调
|
|
104
|
+
* @param key
|
|
105
|
+
* @returns
|
|
106
|
+
*/
|
|
107
|
+
onActiveChange?: (key: string) => void;
|
|
108
|
+
/**
|
|
109
|
+
* 默认应用的模板
|
|
110
|
+
*/
|
|
111
|
+
defaultActiveKey?: string;
|
|
112
|
+
/**
|
|
113
|
+
* 自定义模板key
|
|
114
|
+
* @param templateName 模板名称
|
|
115
|
+
* @returns
|
|
116
|
+
*/
|
|
117
|
+
getActiveKey?: (templateName: string) => string;
|
|
102
118
|
};
|
|
103
119
|
export type ApTableSettingDefaultValueType = Recordable<Omit<ApColumnState, 'label' | 'key' | 'children'> & {
|
|
104
120
|
children?: ApTableSettingDefaultValueType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as r, createBlock as i, openBlock as p, unref as e, normalizeProps as l, guardReactiveProps as t, withCtx as d, createVNode as n } from "vue";
|
|
2
2
|
import { omit as m } from "lodash-unified";
|
|
3
|
-
import { ApForm as
|
|
4
|
-
import
|
|
3
|
+
import { ApForm as u } from "../../ap-form/index.mjs";
|
|
4
|
+
import s from "./ApSizeInput.mjs";
|
|
5
5
|
const _ = /* @__PURE__ */ r({
|
|
6
6
|
name: "ApFormItemSizeInput",
|
|
7
7
|
__name: "form-item",
|
|
@@ -48,13 +48,14 @@ const _ = /* @__PURE__ */ r({
|
|
|
48
48
|
transform: {},
|
|
49
49
|
description: {},
|
|
50
50
|
customFilled: {},
|
|
51
|
-
disabled: { type: Boolean }
|
|
51
|
+
disabled: { type: Boolean },
|
|
52
|
+
autoFocus: { type: Boolean }
|
|
52
53
|
},
|
|
53
54
|
setup(a) {
|
|
54
55
|
const o = a;
|
|
55
|
-
return (f, c) => (p(), i(e(
|
|
56
|
+
return (f, c) => (p(), i(e(u).FormItem, l(t(e(m)(o, ["field"]))), {
|
|
56
57
|
default: d(() => [
|
|
57
|
-
n(e(
|
|
58
|
+
n(e(s), l(t(o.field || {})), null, 16)
|
|
58
59
|
]),
|
|
59
60
|
_: 1
|
|
60
61
|
}, 16));
|
|
@@ -111,6 +111,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
111
111
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
112
112
|
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
113
113
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
114
|
+
readonly autoFocusFirstInput?: boolean | undefined;
|
|
114
115
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
115
116
|
$attrs: {
|
|
116
117
|
[x: string]: unknown;
|
|
@@ -836,6 +837,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
836
837
|
}> & {} & ComponentCustomProperties & {} & {
|
|
837
838
|
$slots: {
|
|
838
839
|
default?(_: {}): any;
|
|
840
|
+
default?(_: {}): any;
|
|
839
841
|
};
|
|
840
842
|
}) | null;
|
|
841
843
|
}, any>;
|
|
@@ -112,6 +112,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
112
112
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
113
113
|
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
114
114
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
115
|
+
readonly autoFocusFirstInput?: boolean | undefined;
|
|
115
116
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
116
117
|
$attrs: {
|
|
117
118
|
[x: string]: unknown;
|
|
@@ -837,6 +838,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
837
838
|
}> & {} & ComponentCustomProperties & {} & {
|
|
838
839
|
$slots: {
|
|
839
840
|
default?(_: {}): any;
|
|
841
|
+
default?(_: {}): any;
|
|
840
842
|
};
|
|
841
843
|
}) | null;
|
|
842
844
|
}, any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as m, computed as a, createBlock as c, openBlock as v, mergeProps as o, unref as r, withCtx as y, createVNode as h } from "vue";
|
|
2
2
|
import { isValid as i } from "@aplus-frontend/utils";
|
|
3
3
|
import { omit as n } from "lodash-unified";
|
|
4
|
-
import { useInjectForm as
|
|
5
|
-
import { getModelValue as
|
|
4
|
+
import { useInjectForm as B } from "../../ap-form/context.mjs";
|
|
5
|
+
import { getModelValue as b } from "../../ap-form/utils/get.mjs";
|
|
6
6
|
import "../../ap-form/item/index.vue2.mjs";
|
|
7
7
|
import "./index.vue2.mjs";
|
|
8
8
|
import g from "../../ap-form/item/index.vue.mjs";
|
|
@@ -53,13 +53,14 @@ const P = /* @__PURE__ */ m({
|
|
|
53
53
|
description: {},
|
|
54
54
|
customFilled: {},
|
|
55
55
|
disabled: { type: Boolean, default: void 0 },
|
|
56
|
+
autoFocus: { type: Boolean },
|
|
56
57
|
field: { default: () => ({}) },
|
|
57
58
|
placeholer: {},
|
|
58
59
|
trim: { type: Boolean, default: !0 },
|
|
59
60
|
defaultSelectedAllKey: { type: Boolean }
|
|
60
61
|
},
|
|
61
|
-
setup(
|
|
62
|
-
const e =
|
|
62
|
+
setup(s) {
|
|
63
|
+
const e = s, { internalInstance: u } = B(), d = a(() => e?.transform || {
|
|
63
64
|
flat: !1,
|
|
64
65
|
transformer: (l) => {
|
|
65
66
|
if (l)
|
|
@@ -71,8 +72,8 @@ const P = /* @__PURE__ */ m({
|
|
|
71
72
|
}), f = a(() => e.field?.style || "width:auto"), p = a(() => {
|
|
72
73
|
if (e.initialValue)
|
|
73
74
|
return e.initialValue;
|
|
74
|
-
const l =
|
|
75
|
-
if (!
|
|
75
|
+
const l = u?.getInitialValues();
|
|
76
|
+
if (!b(l, e.name))
|
|
76
77
|
return e.field.hasAll === !1 ? {
|
|
77
78
|
key: [e?.field?.options?.[0]?.value]
|
|
78
79
|
} : {
|
|
@@ -89,7 +90,7 @@ const P = /* @__PURE__ */ m({
|
|
|
89
90
|
]),
|
|
90
91
|
{
|
|
91
92
|
"initial-value": p.value,
|
|
92
|
-
transform:
|
|
93
|
+
transform: d.value,
|
|
93
94
|
bordered: l.field?.options?.length ? !1 : l.bordered
|
|
94
95
|
}
|
|
95
96
|
), {
|