@aplus-frontend/ui 7.13.11 → 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/select/index.vue.d.ts +8 -18
- 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.d.ts +6 -6
- 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/constants.d.ts +3 -3
- 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/business/hooks/usePageListAgGrid.mjs +2 -2
- 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/splitter/SplitBar.vue2.mjs +7 -7
- package/es/src/splitter/hooks/sizeUtil.d.ts +3 -0
- package/es/src/splitter/hooks/sizeUtil.mjs +44 -0
- package/es/src/splitter/hooks/useSizes.mjs +38 -41
- 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/select/index.vue.d.ts +8 -18
- 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.d.ts +6 -6
- 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/constants.d.ts +3 -3
- 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/business/hooks/usePageListAgGrid.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/splitter/SplitBar.vue2.js +1 -1
- package/lib/src/splitter/hooks/sizeUtil.d.ts +3 -0
- package/lib/src/splitter/hooks/sizeUtil.js +1 -0
- package/lib/src/splitter/hooks/useSizes.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -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
|
), {
|
|
@@ -22,14 +22,14 @@ function O(l) {
|
|
|
22
22
|
afterActivated() {
|
|
23
23
|
(g(s) ? s() : s) && c();
|
|
24
24
|
},
|
|
25
|
-
afterDeactivated: c
|
|
25
|
+
afterDeactivated: () => f && c()
|
|
26
26
|
});
|
|
27
27
|
return [A(
|
|
28
28
|
{
|
|
29
29
|
// scroll,tableLayout,columnResizable设置表格可拖动
|
|
30
30
|
columnResizable: !0,
|
|
31
31
|
request: a ? async (e) => {
|
|
32
|
-
if (h()
|
|
32
|
+
if (h())
|
|
33
33
|
return {
|
|
34
34
|
data: [],
|
|
35
35
|
total: 0
|
package/es/src/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APConfigProvider as
|
|
1
|
+
import { APConfigProvider as g } from "./config-provider/index.mjs";
|
|
2
2
|
import { ApForm as S } from "./ap-form/index.mjs";
|
|
3
3
|
import { ApField as b, ApFieldRead as C } from "./ap-field/index.mjs";
|
|
4
4
|
import { adminToken as D, aplusToken as P } from "./design-token/index.mjs";
|
|
@@ -34,7 +34,7 @@ import { buildLocaleContext as te, buildTranslator as pe, localeContextKey as ae
|
|
|
34
34
|
import { defaultNamespace as de, namespaceContextKey as xe, useGetDerivedNamespace as ue, useNamespace as Ae } from "./config-provider/hooks/use-namespace.mjs";
|
|
35
35
|
import { ConfigProvider as ie, globalConfigCached as ne } from "./config-provider/config-provider.mjs";
|
|
36
36
|
import { ApFormItemText as Fe } from "./ap-form/items/text/index.mjs";
|
|
37
|
-
import { default as
|
|
37
|
+
import { default as Ie } from "./ap-form/items/text-area/index.vue.mjs";
|
|
38
38
|
import { default as Te } from "./ap-form/items/number/index.vue.mjs";
|
|
39
39
|
import { default as Ce } from "./ap-form/items/date/index.vue.mjs";
|
|
40
40
|
import { default as De } from "./ap-form/items/date-range/index.vue.mjs";
|
|
@@ -60,7 +60,7 @@ import { default as xo } from "./ap-field/checkbox/index.vue.mjs";
|
|
|
60
60
|
import { default as Ao } from "./ap-field/date/index.vue.mjs";
|
|
61
61
|
import { default as io } from "./ap-field/number/index.vue.mjs";
|
|
62
62
|
import { default as co } from "./ap-field/radio/index.vue.mjs";
|
|
63
|
-
import { default as
|
|
63
|
+
import { default as go } from "./ap-field/switch/index.vue.mjs";
|
|
64
64
|
import { default as So } from "./ap-field/text-area/index.vue.mjs";
|
|
65
65
|
import { default as bo } from "./ap-field/date-range/index.vue.mjs";
|
|
66
66
|
import { default as Go } from "./ap-field/select/index.vue.mjs";
|
|
@@ -87,7 +87,7 @@ import { ApTransformDataHelper as xr } from "./utils/ap-trans-data/index.mjs";
|
|
|
87
87
|
import { default as Ar } from "./business/ap-table-modal/index.mjs";
|
|
88
88
|
import { useTableModal as ir } from "./business/ap-table-modal/hooks/use-table-modal.mjs";
|
|
89
89
|
import { useTableSelectModal as cr } from "./business/ap-table-modal/hooks/use-table-select-modal.mjs";
|
|
90
|
-
import { ApAttachment as
|
|
90
|
+
import { ApAttachment as gr } from "./business/ap-attachment/index.mjs";
|
|
91
91
|
import { ApBatchAction as Sr } from "./business/ap-batch-action/index.mjs";
|
|
92
92
|
import { ApBatchActionGroup as br } from "./business/ap-batch-action-group/index.mjs";
|
|
93
93
|
import { ApButtonGroup as Gr } from "./business/ap-button-group/index.mjs";
|
|
@@ -112,7 +112,7 @@ import { computedRecords as lt, flattenColumns as dt, formatDataIndex as xt, for
|
|
|
112
112
|
import { ApSummary as st } from "./business/ap-summary/index.mjs";
|
|
113
113
|
import { ApNeedNameKeyDefault as nt } from "./business/ap-appendix/interface.mjs";
|
|
114
114
|
import { ApAppendix as Ft } from "./business/ap-appendix/index.mjs";
|
|
115
|
-
import { default as
|
|
115
|
+
import { default as It } from "./business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs";
|
|
116
116
|
import { default as Tt } from "./business/batch-input-group/index.vue.mjs";
|
|
117
117
|
import { default as Ct } from "./business/batch-input-group/form-item.vue.mjs";
|
|
118
118
|
import { ApSizeInput as Dt } from "./business/ap-size-input/index.mjs";
|
|
@@ -138,32 +138,33 @@ import { default as xp } from "./business/ap-upload/apUpload.vue.mjs";
|
|
|
138
138
|
import { ApDownLoadNeedNameKeyDefault as Ap } from "./business/ap-download/interface.mjs";
|
|
139
139
|
import { default as ip } from "./business/ap-download/ap-download.vue.mjs";
|
|
140
140
|
import { formatString as cp } from "./business/ap-descriptions/formatter/utils.mjs";
|
|
141
|
-
import { default as
|
|
141
|
+
import { default as gp } from "./business/ap-descriptions/ap-descriptions.vue.mjs";
|
|
142
142
|
import { ApFilePreview as Sp } from "./business/ap-file-preview/index.mjs";
|
|
143
143
|
import { useTablePaging as bp } from "./ap-table/hooks/use-table-paging.mjs";
|
|
144
|
-
import { default as Gp } from "./
|
|
145
|
-
import { default as Pp } from "./editable-table/
|
|
146
|
-
import {
|
|
147
|
-
import {
|
|
148
|
-
import { default as vp } from "./scroll-bar/
|
|
149
|
-
import { default as yp } from "./scroll-
|
|
150
|
-
import { default as Bp } from "./
|
|
151
|
-
import { default as Kp } from "./
|
|
152
|
-
import { default as Up } from "./
|
|
153
|
-
import {
|
|
154
|
-
import {
|
|
155
|
-
import {
|
|
156
|
-
import { default as Jp } from "./ap-grid/
|
|
157
|
-
import { default as Xp } from "./ap-grid/editable/
|
|
158
|
-
import { default as Zp } from "./
|
|
159
|
-
import { default as ea } from "./text/
|
|
160
|
-
import { default as ra } from "./
|
|
161
|
-
import { default as pa } from "./
|
|
162
|
-
import { default as ma } from "./ag-grid/
|
|
163
|
-
import { default as la } from "./ag-grid/editable/
|
|
144
|
+
import { default as Gp } from "./ap-table/components/setting/modal/index.vue.mjs";
|
|
145
|
+
import { default as Pp } from "./editable-table/index.vue.mjs";
|
|
146
|
+
import { default as Ep } from "./editable-table/form-item.vue.mjs";
|
|
147
|
+
import { ensureRangeValue as Np } from "./scroll-bar/utils/index.mjs";
|
|
148
|
+
import { default as vp } from "./scroll-bar/index.vue.mjs";
|
|
149
|
+
import { default as yp } from "./scroll-bar/internal.vue.mjs";
|
|
150
|
+
import { default as Bp } from "./scroll-view/index.vue.mjs";
|
|
151
|
+
import { default as Kp } from "./portal/index.vue.mjs";
|
|
152
|
+
import { default as Up } from "./full-screen/index.vue.mjs";
|
|
153
|
+
import { default as _p } from "./resize-observer/index.vue.mjs";
|
|
154
|
+
import { ROW_SELECTION_FIELD as Hp } from "./ap-grid/constants.mjs";
|
|
155
|
+
import { toTreeArray as Wp } from "./ap-grid/utils/to-tree-array.mjs";
|
|
156
|
+
import { default as Jp } from "./ap-grid/index.vue.mjs";
|
|
157
|
+
import { default as Xp } from "./ap-grid/editable/index.vue.mjs";
|
|
158
|
+
import { default as Zp } from "./ap-grid/editable/form-item.vue.mjs";
|
|
159
|
+
import { default as ea } from "./text/index.vue.mjs";
|
|
160
|
+
import { default as ra } from "./text/group.vue.mjs";
|
|
161
|
+
import { default as pa } from "./mask/index.vue.mjs";
|
|
162
|
+
import { default as ma } from "./ag-grid/index.vue.mjs";
|
|
163
|
+
import { default as la } from "./ag-grid/editable/index.vue.mjs";
|
|
164
|
+
import { default as xa } from "./ag-grid/editable/form-item.vue.mjs";
|
|
164
165
|
export {
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
g as APConfigProvider,
|
|
167
|
+
ma as AgGrid,
|
|
167
168
|
Zo as ApActionButton,
|
|
168
169
|
Ho as ApActionGroup,
|
|
169
170
|
E as ApActionItem,
|
|
@@ -171,7 +172,7 @@ export {
|
|
|
171
172
|
Ko as ApActionItemModal,
|
|
172
173
|
Uo as ApActionItemPopconfirm,
|
|
173
174
|
Ft as ApAppendix,
|
|
174
|
-
|
|
175
|
+
gr as ApAttachment,
|
|
175
176
|
Sr as ApBatchAction,
|
|
176
177
|
br as ApBatchActionGroup,
|
|
177
178
|
Xo as ApButton,
|
|
@@ -179,7 +180,7 @@ export {
|
|
|
179
180
|
Pr as ApCard,
|
|
180
181
|
er as ApConfirmButton,
|
|
181
182
|
Rt as ApCopy,
|
|
182
|
-
|
|
183
|
+
gp as ApDescriptions,
|
|
183
184
|
Ap as ApDownLoadNeedNameKeyDefault,
|
|
184
185
|
ip as ApDownload,
|
|
185
186
|
Jt as ApDraggableGrid,
|
|
@@ -200,7 +201,7 @@ export {
|
|
|
200
201
|
No as ApFieldSegmented,
|
|
201
202
|
Go as ApFieldSelect,
|
|
202
203
|
Eo as ApFieldSlider,
|
|
203
|
-
|
|
204
|
+
go as ApFieldSwitch,
|
|
204
205
|
fo as ApFieldText,
|
|
205
206
|
So as ApFieldTextArea,
|
|
206
207
|
yo as ApFieldTreeSelect,
|
|
@@ -222,7 +223,7 @@ export {
|
|
|
222
223
|
ht as ApFormItemSizeInput,
|
|
223
224
|
Re as ApFormItemSwitch,
|
|
224
225
|
Fe as ApFormItemText,
|
|
225
|
-
|
|
226
|
+
Ie as ApFormItemTextArea,
|
|
226
227
|
Me as ApFormItemTextPassword,
|
|
227
228
|
ke as ApFormItemTreeSelect,
|
|
228
229
|
ze as ApFormList,
|
|
@@ -230,7 +231,7 @@ export {
|
|
|
230
231
|
ao as ApFormProvider,
|
|
231
232
|
je as ApFormSearchForm,
|
|
232
233
|
Ye as ApFormSet,
|
|
233
|
-
|
|
234
|
+
Jp as ApGrid,
|
|
234
235
|
Kr as ApImage,
|
|
235
236
|
Ur as ApInputRadio,
|
|
236
237
|
Ut as ApKeepAlive,
|
|
@@ -254,14 +255,15 @@ export {
|
|
|
254
255
|
st as ApSummary,
|
|
255
256
|
V as ApTable,
|
|
256
257
|
Ar as ApTableModal,
|
|
258
|
+
Gp as ApTableSetting,
|
|
257
259
|
pp as ApTag,
|
|
258
260
|
mp as ApTagGroup,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
+
ea as ApText,
|
|
262
|
+
ra as ApTextGroup,
|
|
261
263
|
et as ApTitle,
|
|
262
264
|
xr as ApTransformDataHelper,
|
|
263
265
|
xp as ApUpload,
|
|
264
|
-
|
|
266
|
+
It as ApUploadSingle,
|
|
265
267
|
Xt as ApValueSelectCard,
|
|
266
268
|
wt as ApView,
|
|
267
269
|
Tt as BatchInputGroup,
|
|
@@ -270,25 +272,25 @@ export {
|
|
|
270
272
|
ie as ConfigProvider,
|
|
271
273
|
Q as DEFAULT_NAMESPACE,
|
|
272
274
|
X as DEFAULT_UIMODE,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
275
|
+
la as EditableAgGrid,
|
|
276
|
+
xa as EditableAgGridFormItem,
|
|
277
|
+
Xp as EditableGrid,
|
|
278
|
+
Zp as EditableGridFormItem,
|
|
279
|
+
Pp as EditableTable,
|
|
280
|
+
Ep as EditableTableFormItem,
|
|
281
|
+
Up as FullScreen,
|
|
280
282
|
lr as Highlight,
|
|
281
|
-
|
|
283
|
+
yp as InternalScrollBar,
|
|
282
284
|
O as LoadingBar,
|
|
283
285
|
_t as LruCacher,
|
|
284
|
-
|
|
286
|
+
pa as Mask,
|
|
285
287
|
lp as NeedNameKeyDefault,
|
|
286
|
-
|
|
287
|
-
|
|
288
|
+
Kp as Portal,
|
|
289
|
+
Hp as ROW_SELECTION_FIELD,
|
|
288
290
|
rr as Render,
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
291
|
+
_p as ResizeObserver,
|
|
292
|
+
vp as ScrollBar,
|
|
293
|
+
Bp as ScrollView,
|
|
292
294
|
z as Splitter,
|
|
293
295
|
pr as TimeAgo,
|
|
294
296
|
D as adminToken,
|
|
@@ -300,7 +302,7 @@ export {
|
|
|
300
302
|
q as configProviderProps,
|
|
301
303
|
Br as convertExportField,
|
|
302
304
|
de as defaultNamespace,
|
|
303
|
-
|
|
305
|
+
Np as ensureRangeValue,
|
|
304
306
|
dt as flattenColumns,
|
|
305
307
|
Kt as forceStopTags,
|
|
306
308
|
xt as formatDataIndex,
|
|
@@ -314,7 +316,7 @@ export {
|
|
|
314
316
|
jr as locales,
|
|
315
317
|
xe as namespaceContextKey,
|
|
316
318
|
ee as provideGlobalConfig,
|
|
317
|
-
|
|
319
|
+
Wp as toTreeArray,
|
|
318
320
|
me as translate,
|
|
319
321
|
Zt as useAgGridModal,
|
|
320
322
|
ep as useAgGridSelectModal,
|
|
@@ -69,6 +69,7 @@ const a = {
|
|
|
69
69
|
saveAndApply: "Save and Apply",
|
|
70
70
|
modifyNotification: "The current template has been modified. You can save it as a new template.",
|
|
71
71
|
templateSetting: "Column Configuration Template",
|
|
72
|
+
defaultTemplate: "Default template",
|
|
72
73
|
templateName: "Template Name",
|
|
73
74
|
newTemplateName: "New Template Name",
|
|
74
75
|
templateNamePlaceholder: "Please enter a template name"
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { ExtractPropTypes, PropType, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { ExtractPropTypes, PropType, VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
import { Recordable } from '../type';
|
|
3
3
|
export declare const renderProps: () => {
|
|
4
|
-
renderer: PropType<(params?: Recordable) => any>;
|
|
4
|
+
renderer: PropType<(children: VNode[], params?: Recordable) => any>;
|
|
5
|
+
node: PropType<VNode>;
|
|
5
6
|
data: PropType<Recordable>;
|
|
6
7
|
};
|
|
7
8
|
export type RenderProps = ExtractPropTypes<ReturnType<typeof renderProps>>;
|
|
8
9
|
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
9
|
-
renderer: PropType<(params?: Recordable) => any>;
|
|
10
|
+
renderer: PropType<(children: VNode[], params?: Recordable) => any>;
|
|
11
|
+
node: PropType<VNode>;
|
|
10
12
|
data: PropType<Recordable>;
|
|
11
13
|
}>, () => any, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{
|
|
12
|
-
renderer: PropType<(params?: Recordable) => any>;
|
|
14
|
+
renderer: PropType<(children: VNode[], params?: Recordable) => any>;
|
|
15
|
+
node: PropType<VNode>;
|
|
13
16
|
data: PropType<Recordable>;
|
|
14
17
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
15
18
|
export default _default;
|