@aplus-frontend/ui 0.0.1-beta.10 → 0.0.1-beta.11
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/item-dropdown/index.vue.mjs +34 -34
- package/es/src/ap-field/text/index.vue.d.ts +1 -1
- package/es/src/ap-field/text-area/index.vue.d.ts +1 -1
- package/es/src/ap-form/ap-form-item.vue.mjs +31 -29
- package/es/src/ap-form/ap-form-list.vue.d.ts +1 -2
- package/es/src/ap-form/ap-form-list.vue.mjs +4 -4
- package/es/src/description/description.vue.d.ts +1 -1
- package/es/src/description/index.d.ts +3 -3
- package/es/src/design-token/index.mjs +4 -2
- package/es/src/icon-picker/icon-picker.vue.d.ts +1 -1
- package/es/src/icon-picker/index.d.ts +19 -19
- package/es/src/pro-form/hooks/use-label-width.d.ts +3 -3
- package/es/src/pro-table/components/editable/editable-cell.vue.d.ts +1 -1
- package/es/src/pro-table/hooks/use-data-source.mjs +67 -66
- package/es/src/pro-table/pro-table.vue.d.ts +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.vue.d.ts +1 -1
- package/lib/src/ap-field/text-area/index.vue.d.ts +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/ap-form-list.vue.d.ts +1 -2
- package/lib/src/ap-form/ap-form-list.vue.js +1 -1
- package/lib/src/description/description.vue.d.ts +1 -1
- package/lib/src/description/index.d.ts +3 -3
- package/lib/src/design-token/index.js +1 -1
- package/lib/src/icon-picker/icon-picker.vue.d.ts +1 -1
- package/lib/src/icon-picker/index.d.ts +19 -19
- package/lib/src/pro-form/hooks/use-label-width.d.ts +3 -3
- package/lib/src/pro-table/components/editable/editable-cell.vue.d.ts +1 -1
- package/lib/src/pro-table/hooks/use-data-source.js +1 -1
- package/lib/src/pro-table/pro-table.vue.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as _, ref as
|
|
2
|
-
import { Dropdown 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 B, renderList as b, normalizeClass as m, mergeProps as i, createElementVNode as A, normalizeProps as C, guardReactiveProps as P, renderSlot as D, createCommentVNode as I } from "vue";
|
|
2
|
+
import { Dropdown as N, Menu as $, MenuItem as h } from "ant-design-vue";
|
|
3
3
|
import { DownOutlined as V } from "@ant-design/icons-vue";
|
|
4
4
|
import "../item/index.vue.mjs";
|
|
5
5
|
import "../item-modal/index.vue2.mjs";
|
|
6
6
|
import "../item-popconfirm/index.vue2.mjs";
|
|
7
7
|
import "../../config-provider/index.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { isUndefined as z, omit as E } from "lodash-unified";
|
|
9
9
|
import "../style/item-dropdown.css";
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
const
|
|
10
|
+
import { useNamespace as L } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
import M from "../item-modal/index.vue.mjs";
|
|
12
|
+
import U from "../item-popconfirm/index.vue.mjs";
|
|
13
|
+
import d from "../item/index.vue2.mjs";
|
|
14
|
+
const W = /* @__PURE__ */ _({
|
|
15
15
|
name: "ApActionItemDropDown",
|
|
16
16
|
__name: "index",
|
|
17
17
|
props: {
|
|
@@ -26,42 +26,42 @@ const T = /* @__PURE__ */ _({
|
|
|
26
26
|
onClick: {},
|
|
27
27
|
loading: { type: Boolean, default: !1 }
|
|
28
28
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
...
|
|
29
|
+
setup(c) {
|
|
30
|
+
const f = c, p = v(!1), { e: s } = L("action-item-dropdown"), g = k(() => f.actions.filter((e) => e.visible || z(e.visible)).map((e) => ({
|
|
31
|
+
...e,
|
|
32
32
|
onAction: async (a) => {
|
|
33
|
-
var
|
|
33
|
+
var o;
|
|
34
34
|
try {
|
|
35
|
-
await ((
|
|
35
|
+
await ((o = e.onAction) == null ? void 0 : o.call(e, a));
|
|
36
36
|
} finally {
|
|
37
|
-
|
|
37
|
+
p.value = !1;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
})));
|
|
41
|
-
return (
|
|
42
|
-
open:
|
|
43
|
-
"onUpdate:open": a[0] || (a[0] = (
|
|
44
|
-
trigger:
|
|
45
|
-
placement:
|
|
41
|
+
return (e, a) => (t(), l(r(N), {
|
|
42
|
+
open: p.value,
|
|
43
|
+
"onUpdate:open": a[0] || (a[0] = (o) => p.value = o),
|
|
44
|
+
trigger: e.trigger,
|
|
45
|
+
placement: e.placement
|
|
46
46
|
}, {
|
|
47
47
|
overlay: n(() => [
|
|
48
|
-
|
|
48
|
+
u(r($), null, {
|
|
49
49
|
default: n(() => [
|
|
50
|
-
(t(!0),
|
|
50
|
+
(t(!0), w(B, null, b(g.value, (o, y) => (t(), l(r(h), {
|
|
51
51
|
key: y,
|
|
52
|
-
class:
|
|
52
|
+
class: m(r(s)("item"))
|
|
53
53
|
}, {
|
|
54
54
|
default: n(() => [
|
|
55
|
-
|
|
55
|
+
o.modalProps ? (t(), l(M, i({
|
|
56
56
|
key: 0,
|
|
57
57
|
ref_for: !0
|
|
58
|
-
},
|
|
58
|
+
}, o), null, 16)) : o.popconfirmProps ? (t(), l(U, i({
|
|
59
59
|
key: 1,
|
|
60
60
|
ref_for: !0
|
|
61
|
-
},
|
|
61
|
+
}, o), null, 16)) : (t(), l(d, i({
|
|
62
62
|
key: 2,
|
|
63
63
|
ref_for: !0
|
|
64
|
-
},
|
|
64
|
+
}, o), null, 16))
|
|
65
65
|
]),
|
|
66
66
|
_: 2
|
|
67
67
|
}, 1032, ["class"]))), 128))
|
|
@@ -70,20 +70,20 @@ const T = /* @__PURE__ */ _({
|
|
|
70
70
|
})
|
|
71
71
|
]),
|
|
72
72
|
default: n(() => [
|
|
73
|
-
|
|
74
|
-
class:
|
|
73
|
+
A("span", {
|
|
74
|
+
class: m(r(s)("wrapper"))
|
|
75
75
|
}, [
|
|
76
|
-
|
|
76
|
+
u(d, C(P(r(E)(f, ["actions", "trigger", "placement"]))), {
|
|
77
77
|
default: n(() => [
|
|
78
|
-
|
|
78
|
+
D(e.$slots, "default")
|
|
79
79
|
]),
|
|
80
80
|
_: 3
|
|
81
81
|
}, 16),
|
|
82
|
-
|
|
82
|
+
e.showIcon ? (t(), l(r(V), {
|
|
83
83
|
key: 0,
|
|
84
|
-
class:
|
|
84
|
+
class: m(r(s)("icon")),
|
|
85
85
|
style: { color: "#0070ff" }
|
|
86
|
-
}, null, 8, ["class"])) :
|
|
86
|
+
}, null, 8, ["class"])) : I("", !0)
|
|
87
87
|
], 2)
|
|
88
88
|
]),
|
|
89
89
|
_: 3
|
|
@@ -91,5 +91,5 @@ const T = /* @__PURE__ */ _({
|
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
export {
|
|
94
|
-
|
|
94
|
+
W as default
|
|
95
95
|
};
|
|
@@ -34,7 +34,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
34
34
|
}>>> & {
|
|
35
35
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
36
36
|
}, {
|
|
37
|
-
type: "number" | "text" | "color" | "reset" | "submit" | "button" | "time" | "month" | "date" | "week" | "
|
|
37
|
+
type: "number" | "text" | "color" | "reset" | "submit" | "button" | "time" | "month" | "date" | "week" | "hidden" | "search" | "image" | "tel" | "url" | "email" | "checkbox" | "radio" | "range" | "datetime-local" | "file" | "password";
|
|
38
38
|
mode: FieldMode;
|
|
39
39
|
bordered: boolean;
|
|
40
40
|
allowClear: boolean;
|
|
@@ -23,7 +23,7 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
|
|
|
23
23
|
}>>> & {
|
|
24
24
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
25
25
|
}, {
|
|
26
|
-
type: "number" | "text" | "color" | "reset" | "submit" | "button" | "time" | "month" | "date" | "week" | "
|
|
26
|
+
type: "number" | "text" | "color" | "reset" | "submit" | "button" | "time" | "month" | "date" | "week" | "hidden" | "search" | "image" | "tel" | "url" | "email" | "checkbox" | "radio" | "range" | "datetime-local" | "file" | "password";
|
|
27
27
|
mode: FieldMode;
|
|
28
28
|
bordered: boolean;
|
|
29
29
|
lazy: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as z, useSlots as L, ref as
|
|
1
|
+
import { defineComponent as z, useSlots as L, ref as f, computed as B, unref as t, onBeforeUpdate as T, cloneVNode as U, openBlock as b, createBlock as C, mergeProps as $, createSlots as j, withCtx as s, resolveDynamicComponent as q, createCommentVNode as D, createElementVNode as E, normalizeClass as K, createVNode as h, renderList as O, renderSlot as Q, normalizeProps as G, guardReactiveProps as H } from "vue";
|
|
2
2
|
import { Form as J, Tooltip as W } from "ant-design-vue";
|
|
3
3
|
import { isArray as X, omit as V } from "lodash-unified";
|
|
4
4
|
import { apFormItemColPropKeys as Y } from "./constant.mjs";
|
|
@@ -49,28 +49,30 @@ const ie = /* @__PURE__ */ z({
|
|
|
49
49
|
valuePropName: { default: "value" }
|
|
50
50
|
},
|
|
51
51
|
setup(g, { expose: N }) {
|
|
52
|
-
var
|
|
53
|
-
const
|
|
52
|
+
var y;
|
|
53
|
+
const o = g, n = L(), { model: u, updateModel: d } = M(), { m } = ee("ap-form-item"), i = f(!1), l = f(), p = B(() => o.name ? X(o.name) ? o.name.reduce((e, r) => e == null ? void 0 : e[r], t(u)) : u == null ? void 0 : u.value[o.name] : null), c = f((y = n.default()) == null ? void 0 : y[0]);
|
|
54
54
|
T(() => {
|
|
55
55
|
var e;
|
|
56
|
-
|
|
56
|
+
c.value = (e = n.default()) == null ? void 0 : e[0];
|
|
57
57
|
});
|
|
58
58
|
function k(e) {
|
|
59
|
-
|
|
59
|
+
d == null || d(o.name, e);
|
|
60
60
|
}
|
|
61
61
|
function x() {
|
|
62
|
-
|
|
62
|
+
i.value = !0;
|
|
63
63
|
}
|
|
64
64
|
function P() {
|
|
65
|
-
|
|
65
|
+
i.value = !1;
|
|
66
66
|
}
|
|
67
|
-
const
|
|
68
|
-
var r;
|
|
69
|
-
|
|
67
|
+
const v = B(() => {
|
|
68
|
+
var r, a;
|
|
69
|
+
if (!o.name)
|
|
70
|
+
return (r = n.default()) == null ? void 0 : r[0];
|
|
71
|
+
const e = t(c);
|
|
70
72
|
return e ? U(e, {
|
|
71
|
-
[
|
|
72
|
-
[`onUpdate:${
|
|
73
|
-
bordered:
|
|
73
|
+
[o.valuePropName]: t(p),
|
|
74
|
+
[`onUpdate:${o.valuePropName}`]: k,
|
|
75
|
+
bordered: o.bordered ? !1 : (a = e == null ? void 0 : e.props) == null ? void 0 : a.bordered,
|
|
74
76
|
onFocus: x,
|
|
75
77
|
onBlur: P
|
|
76
78
|
}) : null;
|
|
@@ -92,7 +94,7 @@ const ie = /* @__PURE__ */ z({
|
|
|
92
94
|
(e = l.value) == null || e.resetField();
|
|
93
95
|
}
|
|
94
96
|
function A() {
|
|
95
|
-
return
|
|
97
|
+
return t(p);
|
|
96
98
|
}
|
|
97
99
|
return N({
|
|
98
100
|
onFieldBlur: I,
|
|
@@ -100,29 +102,29 @@ const ie = /* @__PURE__ */ z({
|
|
|
100
102
|
clearValidate: _,
|
|
101
103
|
resetField: w,
|
|
102
104
|
getFieldValue: A
|
|
103
|
-
}), (e, r) => (b(), C(
|
|
105
|
+
}), (e, r) => (b(), C(t(J).Item, $({
|
|
104
106
|
ref_key: "formItemRef",
|
|
105
107
|
ref: l
|
|
106
|
-
},
|
|
107
|
-
class: { [
|
|
108
|
-
colon: e.bordered ? !1 :
|
|
108
|
+
}, t(V)(o, [...t(Y), "tooltip"]), {
|
|
109
|
+
class: { [t(m)("bordered")]: e.bordered, [t(m)("focused")]: e.bordered && i.value },
|
|
110
|
+
colon: e.bordered ? !1 : o.colon
|
|
109
111
|
}), j({
|
|
110
|
-
default:
|
|
111
|
-
|
|
112
|
+
default: s(() => [
|
|
113
|
+
v.value ? (b(), C(q(v.value), { key: 0 })) : D("", !0)
|
|
112
114
|
]),
|
|
113
115
|
_: 2
|
|
114
116
|
}, [
|
|
115
|
-
|
|
117
|
+
o.tooltip ? {
|
|
116
118
|
name: "tooltip",
|
|
117
|
-
fn:
|
|
119
|
+
fn: s(({ class: a }) => [
|
|
118
120
|
E("span", {
|
|
119
|
-
class: K(
|
|
121
|
+
class: K(a)
|
|
120
122
|
}, [
|
|
121
|
-
h(
|
|
122
|
-
title:
|
|
123
|
+
h(t(W), {
|
|
124
|
+
title: o.tooltip
|
|
123
125
|
}, {
|
|
124
|
-
default:
|
|
125
|
-
h(
|
|
126
|
+
default: s(() => [
|
|
127
|
+
h(t(Z), { style: { color: "#0070ff" } })
|
|
126
128
|
]),
|
|
127
129
|
_: 1
|
|
128
130
|
}, 8, ["title"])
|
|
@@ -130,9 +132,9 @@ const ie = /* @__PURE__ */ z({
|
|
|
130
132
|
]),
|
|
131
133
|
key: "0"
|
|
132
134
|
} : void 0,
|
|
133
|
-
O(
|
|
135
|
+
O(t(V)(t(n), "default"), (a, F) => ({
|
|
134
136
|
name: F,
|
|
135
|
-
fn:
|
|
137
|
+
fn: s((R) => [
|
|
136
138
|
Q(e.$slots, F, G(H(R || {})))
|
|
137
139
|
])
|
|
138
140
|
}))
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ApFormListProps } from './interface';
|
|
2
|
-
import { NamePath } from 'ant-design-vue/es/form/interface';
|
|
3
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
4
3
|
|
|
5
4
|
type FormListField = {
|
|
6
5
|
key: number;
|
|
7
|
-
name:
|
|
6
|
+
name: (string | number)[];
|
|
8
7
|
value: any;
|
|
9
8
|
fieldName: number;
|
|
10
9
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as d, computed as f, unref as u, renderSlot as k } from "vue";
|
|
2
2
|
import { useInjectForm as F } from "./context.mjs";
|
|
3
3
|
import { isArray as h } from "lodash-unified";
|
|
4
|
-
const w = /* @__PURE__ */
|
|
4
|
+
const w = /* @__PURE__ */ d({
|
|
5
5
|
name: "ApFormList",
|
|
6
6
|
__name: "ap-form-list",
|
|
7
7
|
props: {
|
|
@@ -21,7 +21,7 @@ const w = /* @__PURE__ */ v({
|
|
|
21
21
|
const _ = {
|
|
22
22
|
add: p,
|
|
23
23
|
remove: y
|
|
24
|
-
},
|
|
24
|
+
}, v = f(() => (u(c) || []).map((n, m) => {
|
|
25
25
|
let i = o[m];
|
|
26
26
|
return typeof i > "u" && (o[m] = s, i = s, s += 1), {
|
|
27
27
|
key: i,
|
|
@@ -31,7 +31,7 @@ const w = /* @__PURE__ */ v({
|
|
|
31
31
|
};
|
|
32
32
|
}));
|
|
33
33
|
return (e, n) => k(e.$slots, "default", {
|
|
34
|
-
fields:
|
|
34
|
+
fields: v.value,
|
|
35
35
|
actions: _
|
|
36
36
|
});
|
|
37
37
|
}
|
|
@@ -87,8 +87,8 @@ declare const _default: DefineComponent<{
|
|
|
87
87
|
}, {
|
|
88
88
|
title: string;
|
|
89
89
|
size: string;
|
|
90
|
-
bordered: boolean;
|
|
91
90
|
column: number | Record<string, any>;
|
|
91
|
+
bordered: boolean;
|
|
92
92
|
schema: DescItem[];
|
|
93
93
|
useCollapse: boolean;
|
|
94
94
|
collapseOptions: CollapseContainerOptions;
|
|
@@ -91,8 +91,8 @@ export declare const Description: {
|
|
|
91
91
|
}, {
|
|
92
92
|
title: string;
|
|
93
93
|
size: string;
|
|
94
|
-
bordered: boolean;
|
|
95
94
|
column: number | Record<string, any>;
|
|
95
|
+
bordered: boolean;
|
|
96
96
|
schema: DescItem[];
|
|
97
97
|
useCollapse: boolean;
|
|
98
98
|
collapseOptions: CollapseContainerOptions;
|
|
@@ -148,8 +148,8 @@ export declare const Description: {
|
|
|
148
148
|
}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
149
149
|
title: string;
|
|
150
150
|
size: string;
|
|
151
|
-
bordered: boolean;
|
|
152
151
|
column: number | Record<string, any>;
|
|
152
|
+
bordered: boolean;
|
|
153
153
|
schema: DescItem[];
|
|
154
154
|
useCollapse: boolean;
|
|
155
155
|
collapseOptions: CollapseContainerOptions;
|
|
@@ -202,8 +202,8 @@ export declare const Description: {
|
|
|
202
202
|
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "register"[], "register", {
|
|
203
203
|
title: string;
|
|
204
204
|
size: string;
|
|
205
|
-
bordered: boolean;
|
|
206
205
|
column: number | Record<string, any>;
|
|
206
|
+
bordered: boolean;
|
|
207
207
|
schema: DescItem[];
|
|
208
208
|
useCollapse: boolean;
|
|
209
209
|
collapseOptions: CollapseContainerOptions;
|
|
@@ -25,7 +25,8 @@ const o = {
|
|
|
25
25
|
colorWarning: "#FFA940",
|
|
26
26
|
colorBgContainerDisabled: "#F9F9FA",
|
|
27
27
|
wireframe: !1,
|
|
28
|
-
colorBgLayout: "#F2F6F9"
|
|
28
|
+
colorBgLayout: "#F2F6F9",
|
|
29
|
+
colorBgSpotlight: "#00000080"
|
|
29
30
|
}, c = {
|
|
30
31
|
...o,
|
|
31
32
|
// 主色
|
|
@@ -51,7 +52,8 @@ const o = {
|
|
|
51
52
|
colorWarning: "#FAAD14",
|
|
52
53
|
colorLink: "#1890FF",
|
|
53
54
|
wireframe: !1,
|
|
54
|
-
colorBgLayout: "#FAFAFA"
|
|
55
|
+
colorBgLayout: "#FAFAFA",
|
|
56
|
+
colorBgSpotlight: "#00000080"
|
|
55
57
|
};
|
|
56
58
|
export {
|
|
57
59
|
c as adminToken,
|
|
@@ -26,9 +26,9 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
|
|
|
26
26
|
}, {
|
|
27
27
|
mode: "svg" | "iconify";
|
|
28
28
|
width: string;
|
|
29
|
+
copy: boolean;
|
|
29
30
|
value: string;
|
|
30
31
|
readonly: boolean;
|
|
31
|
-
copy: boolean;
|
|
32
32
|
allowClear: boolean;
|
|
33
33
|
pageSize: number;
|
|
34
34
|
}, {}>;
|
|
@@ -10,6 +10,10 @@ export declare const IconPicker: {
|
|
|
10
10
|
type: PropType<string>;
|
|
11
11
|
default: string;
|
|
12
12
|
};
|
|
13
|
+
copy: {
|
|
14
|
+
type: PropType<boolean>;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
13
17
|
value: {
|
|
14
18
|
type: PropType<string>;
|
|
15
19
|
default: string;
|
|
@@ -18,10 +22,6 @@ export declare const IconPicker: {
|
|
|
18
22
|
type: PropType<boolean>;
|
|
19
23
|
default: boolean;
|
|
20
24
|
};
|
|
21
|
-
copy: {
|
|
22
|
-
type: PropType<boolean>;
|
|
23
|
-
default: boolean;
|
|
24
|
-
};
|
|
25
25
|
allowClear: {
|
|
26
26
|
type: PropType<boolean>;
|
|
27
27
|
default: boolean;
|
|
@@ -48,6 +48,10 @@ export declare const IconPicker: {
|
|
|
48
48
|
type: PropType<string>;
|
|
49
49
|
default: string;
|
|
50
50
|
};
|
|
51
|
+
copy: {
|
|
52
|
+
type: PropType<boolean>;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
51
55
|
value: {
|
|
52
56
|
type: PropType<string>;
|
|
53
57
|
default: string;
|
|
@@ -56,10 +60,6 @@ export declare const IconPicker: {
|
|
|
56
60
|
type: PropType<boolean>;
|
|
57
61
|
default: boolean;
|
|
58
62
|
};
|
|
59
|
-
copy: {
|
|
60
|
-
type: PropType<boolean>;
|
|
61
|
-
default: boolean;
|
|
62
|
-
};
|
|
63
63
|
allowClear: {
|
|
64
64
|
type: PropType<boolean>;
|
|
65
65
|
default: boolean;
|
|
@@ -77,9 +77,9 @@ export declare const IconPicker: {
|
|
|
77
77
|
}, {
|
|
78
78
|
mode: "svg" | "iconify";
|
|
79
79
|
width: string;
|
|
80
|
+
copy: boolean;
|
|
80
81
|
value: string;
|
|
81
82
|
readonly: boolean;
|
|
82
|
-
copy: boolean;
|
|
83
83
|
allowClear: boolean;
|
|
84
84
|
pageSize: number;
|
|
85
85
|
}, true, {}, {}, {
|
|
@@ -98,6 +98,10 @@ export declare const IconPicker: {
|
|
|
98
98
|
type: PropType<string>;
|
|
99
99
|
default: string;
|
|
100
100
|
};
|
|
101
|
+
copy: {
|
|
102
|
+
type: PropType<boolean>;
|
|
103
|
+
default: boolean;
|
|
104
|
+
};
|
|
101
105
|
value: {
|
|
102
106
|
type: PropType<string>;
|
|
103
107
|
default: string;
|
|
@@ -106,10 +110,6 @@ export declare const IconPicker: {
|
|
|
106
110
|
type: PropType<boolean>;
|
|
107
111
|
default: boolean;
|
|
108
112
|
};
|
|
109
|
-
copy: {
|
|
110
|
-
type: PropType<boolean>;
|
|
111
|
-
default: boolean;
|
|
112
|
-
};
|
|
113
113
|
allowClear: {
|
|
114
114
|
type: PropType<boolean>;
|
|
115
115
|
default: boolean;
|
|
@@ -127,9 +127,9 @@ export declare const IconPicker: {
|
|
|
127
127
|
}, {}, {}, {}, {}, {
|
|
128
128
|
mode: "svg" | "iconify";
|
|
129
129
|
width: string;
|
|
130
|
+
copy: boolean;
|
|
130
131
|
value: string;
|
|
131
132
|
readonly: boolean;
|
|
132
|
-
copy: boolean;
|
|
133
133
|
allowClear: boolean;
|
|
134
134
|
pageSize: number;
|
|
135
135
|
}>;
|
|
@@ -145,6 +145,10 @@ export declare const IconPicker: {
|
|
|
145
145
|
type: PropType<string>;
|
|
146
146
|
default: string;
|
|
147
147
|
};
|
|
148
|
+
copy: {
|
|
149
|
+
type: PropType<boolean>;
|
|
150
|
+
default: boolean;
|
|
151
|
+
};
|
|
148
152
|
value: {
|
|
149
153
|
type: PropType<string>;
|
|
150
154
|
default: string;
|
|
@@ -153,10 +157,6 @@ export declare const IconPicker: {
|
|
|
153
157
|
type: PropType<boolean>;
|
|
154
158
|
default: boolean;
|
|
155
159
|
};
|
|
156
|
-
copy: {
|
|
157
|
-
type: PropType<boolean>;
|
|
158
|
-
default: boolean;
|
|
159
|
-
};
|
|
160
160
|
allowClear: {
|
|
161
161
|
type: PropType<boolean>;
|
|
162
162
|
default: boolean;
|
|
@@ -177,9 +177,9 @@ export declare const IconPicker: {
|
|
|
177
177
|
}, string, {
|
|
178
178
|
mode: "svg" | "iconify";
|
|
179
179
|
width: string;
|
|
180
|
+
copy: boolean;
|
|
180
181
|
value: string;
|
|
181
182
|
readonly: boolean;
|
|
182
|
-
copy: boolean;
|
|
183
183
|
allowClear: boolean;
|
|
184
184
|
pageSize: number;
|
|
185
185
|
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin<any[]> & (new (...args: any[]) => {
|
|
@@ -110,7 +110,7 @@ export declare function useItemLabelWidth(schemaItemRef: Ref<FormSchema>, propsR
|
|
|
110
110
|
contextmenu?: string | undefined;
|
|
111
111
|
dir?: string | undefined;
|
|
112
112
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
113
|
-
hidden?: "" | (boolean | "true" | "false") | "
|
|
113
|
+
hidden?: "" | "hidden" | (boolean | "true" | "false") | "until-found" | undefined;
|
|
114
114
|
id?: string | undefined;
|
|
115
115
|
inert?: (boolean | "true" | "false") | undefined;
|
|
116
116
|
lang?: string | undefined;
|
|
@@ -145,7 +145,7 @@ export declare function useItemLabelWidth(schemaItemRef: Ref<FormSchema>, propsR
|
|
|
145
145
|
is?: string | undefined;
|
|
146
146
|
'aria-activedescendant'?: string | undefined;
|
|
147
147
|
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
148
|
-
'aria-autocomplete'?: "
|
|
148
|
+
'aria-autocomplete'?: "none" | "inline" | "both" | "list" | undefined;
|
|
149
149
|
'aria-busy'?: (boolean | "true" | "false") | undefined;
|
|
150
150
|
'aria-checked'?: (boolean | "true" | "false") | "mixed" | undefined;
|
|
151
151
|
'aria-colcount'?: (string | number) | undefined;
|
|
@@ -156,7 +156,7 @@ export declare function useItemLabelWidth(schemaItemRef: Ref<FormSchema>, propsR
|
|
|
156
156
|
'aria-describedby'?: string | undefined;
|
|
157
157
|
'aria-details'?: string | undefined;
|
|
158
158
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
159
|
-
'aria-dropeffect'?: "link" | "
|
|
159
|
+
'aria-dropeffect'?: "link" | "copy" | "none" | "move" | "execute" | "popup" | undefined;
|
|
160
160
|
'aria-errormessage'?: string | undefined;
|
|
161
161
|
'aria-expanded'?: (boolean | "true" | "false") | undefined;
|
|
162
162
|
'aria-flowto'?: string | undefined;
|
|
@@ -77,8 +77,8 @@ declare const _default: DefineComponent<{
|
|
|
77
77
|
required: true;
|
|
78
78
|
};
|
|
79
79
|
}>>, {
|
|
80
|
-
value: string | number | boolean | Record<string, any>;
|
|
81
80
|
column: BasicColumn;
|
|
81
|
+
value: string | number | boolean | Record<string, any>;
|
|
82
82
|
record: any;
|
|
83
83
|
}, {}>;
|
|
84
84
|
export default _default;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { unref as r, reactive as
|
|
2
|
-
import { useTimeoutFn as
|
|
3
|
-
import { buildUUID as
|
|
4
|
-
import { isFunction as b, cloneDeep as
|
|
5
|
-
import { ROW_KEY as
|
|
6
|
-
import { parseRowKeyValue as
|
|
1
|
+
import { unref as r, reactive as ie, ref as Y, watchEffect as Z, watch as fe, computed as E, onMounted as se } from "vue";
|
|
2
|
+
import { useTimeoutFn as de } from "@vueuse/core";
|
|
3
|
+
import { buildUUID as q } from "../../utils/uuid.mjs";
|
|
4
|
+
import { isFunction as b, cloneDeep as he, isObject as ge, isBoolean as x, merge as me, get as J } from "lodash-unified";
|
|
5
|
+
import { ROW_KEY as h } from "../const.mjs";
|
|
6
|
+
import { parseRowKeyValue as Q } from "../helper.mjs";
|
|
7
7
|
import "../../config-provider/index.mjs";
|
|
8
|
-
import { useGlobalConfig as
|
|
8
|
+
import { useGlobalConfig as Se } from "../../config-provider/hooks/use-global-config.mjs";
|
|
9
9
|
function Ae(u, {
|
|
10
10
|
getPaginationInfo: R,
|
|
11
11
|
setPagination: g,
|
|
12
12
|
setLoading: O,
|
|
13
|
-
getFieldsValue:
|
|
14
|
-
clearSelectedRowKeys:
|
|
15
|
-
tableData:
|
|
13
|
+
getFieldsValue: V,
|
|
14
|
+
clearSelectedRowKeys: X,
|
|
15
|
+
tableData: $
|
|
16
16
|
}, _) {
|
|
17
|
-
const z =
|
|
17
|
+
const z = Se(), L = r(z).table.fetchSetting, P = r(z).table.defaultPageSize, A = ie({
|
|
18
18
|
sortInfo: {},
|
|
19
19
|
filterInfo: {}
|
|
20
20
|
}), n = Y([]), G = Y({});
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
Z(() => {
|
|
22
|
+
$.value = r(n);
|
|
23
23
|
}), fe(
|
|
24
24
|
() => r(u).dataSource,
|
|
25
25
|
() => {
|
|
@@ -30,9 +30,9 @@ function Ae(u, {
|
|
|
30
30
|
immediate: !0
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
|
-
function
|
|
33
|
+
function k(e, t, a) {
|
|
34
34
|
const { clearSelectOnPageChange: c, sortFn: o, filterFn: i } = r(u);
|
|
35
|
-
c &&
|
|
35
|
+
c && X(), g(e);
|
|
36
36
|
const l = {};
|
|
37
37
|
if (a && b(o)) {
|
|
38
38
|
const f = o(a);
|
|
@@ -46,31 +46,32 @@ function Ae(u, {
|
|
|
46
46
|
}
|
|
47
47
|
function N(e) {
|
|
48
48
|
!e || !Array.isArray(e) || e.forEach((t) => {
|
|
49
|
-
t[
|
|
49
|
+
t[h] || (t[h] = q()), t.children && t.children.length && N(t.children);
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
const K = E(() => r(u).autoCreateKey && !r(u).rowKey), C = E(() => {
|
|
53
53
|
const { rowKey: e } = r(u);
|
|
54
|
-
return r(K) ?
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
if (!e || e.length === 0)
|
|
58
|
-
return r(n);
|
|
54
|
+
return r(K) ? h : e;
|
|
55
|
+
});
|
|
56
|
+
Z(() => {
|
|
59
57
|
if (r(K)) {
|
|
60
|
-
const t = e[0], a = e[e.length - 1];
|
|
61
|
-
if (t && a && (!t[
|
|
62
|
-
const c =
|
|
58
|
+
const e = r(n), t = e[0], a = e[e.length - 1];
|
|
59
|
+
if (t && a && (!t[h] || !a[h])) {
|
|
60
|
+
const c = he(r(n));
|
|
63
61
|
c.forEach((o) => {
|
|
64
|
-
o[
|
|
62
|
+
o[h] || (o[h] = q()), o.children && o.children.length && N(o.children);
|
|
65
63
|
}), n.value = c;
|
|
66
64
|
}
|
|
67
65
|
}
|
|
68
|
-
return r(n);
|
|
69
66
|
});
|
|
70
|
-
|
|
67
|
+
const j = E(() => {
|
|
68
|
+
const e = r(n);
|
|
69
|
+
return !e || e.length === 0 ? r(n) : r(n);
|
|
70
|
+
});
|
|
71
|
+
async function p(e, t, a) {
|
|
71
72
|
return n.value[e] && (n.value[e][t] = a), n.value[e];
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
+
function ee(e, t) {
|
|
74
75
|
const a = M(e);
|
|
75
76
|
if (a) {
|
|
76
77
|
for (const c in a)
|
|
@@ -78,7 +79,7 @@ function Ae(u, {
|
|
|
78
79
|
return a;
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
+
function te(e) {
|
|
82
83
|
var c;
|
|
83
84
|
if (!n.value || n.value.length == 0)
|
|
84
85
|
return;
|
|
@@ -92,14 +93,14 @@ function Ae(u, {
|
|
|
92
93
|
var T;
|
|
93
94
|
if (s == null)
|
|
94
95
|
return null;
|
|
95
|
-
for (let
|
|
96
|
-
const y = s[
|
|
97
|
-
if (
|
|
98
|
-
return { index:
|
|
96
|
+
for (let S = 0; S < s.length; S++) {
|
|
97
|
+
const y = s[S];
|
|
98
|
+
if (Q(r(C), y) === m)
|
|
99
|
+
return { index: S, data: s };
|
|
99
100
|
if (((T = y.children) == null ? void 0 : T.length) > 0) {
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
102
|
-
return
|
|
101
|
+
const d = f(y.children, m);
|
|
102
|
+
if (d != null)
|
|
103
|
+
return d;
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
return null;
|
|
@@ -111,7 +112,7 @@ function Ae(u, {
|
|
|
111
112
|
total: (c = r(u).dataSource) == null ? void 0 : c.length
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
+
function re(e, t) {
|
|
115
116
|
var c;
|
|
116
117
|
t = t ?? ((c = n.value) == null ? void 0 : c.length);
|
|
117
118
|
const a = ge(e) ? [e] : e;
|
|
@@ -124,7 +125,7 @@ function Ae(u, {
|
|
|
124
125
|
return ((c) => {
|
|
125
126
|
let o;
|
|
126
127
|
return c.some(function i(l) {
|
|
127
|
-
return
|
|
128
|
+
return Q(r(C), l) === e ? (o = l, !0) : l[t] && l[t].some(i);
|
|
128
129
|
}), o;
|
|
129
130
|
})(n.value);
|
|
130
131
|
}
|
|
@@ -142,34 +143,34 @@ function Ae(u, {
|
|
|
142
143
|
if (!(!t || !b(t)))
|
|
143
144
|
try {
|
|
144
145
|
O(!0);
|
|
145
|
-
const { pageField: m, sizeField: T, listField:
|
|
146
|
+
const { pageField: m, sizeField: T, listField: S, totalField: y } = Object.assign(
|
|
146
147
|
{},
|
|
147
|
-
|
|
148
|
+
L,
|
|
148
149
|
o
|
|
149
150
|
);
|
|
150
|
-
let
|
|
151
|
-
const { current: U = 1, pageSize: B =
|
|
151
|
+
let d = {};
|
|
152
|
+
const { current: U = 1, pageSize: B = P } = r(
|
|
152
153
|
R
|
|
153
154
|
);
|
|
154
|
-
|
|
155
|
-
const { sortInfo:
|
|
155
|
+
x(s) && !s || x(R) ? d = {} : (d[m] = e && e.page || U, d[T] = B);
|
|
156
|
+
const { sortInfo: le = {}, filterInfo: ue } = A;
|
|
156
157
|
let D = me(
|
|
157
|
-
|
|
158
|
-
f ?
|
|
158
|
+
d,
|
|
159
|
+
f ? V() : {},
|
|
159
160
|
a,
|
|
160
161
|
(e == null ? void 0 : e.searchInfo) ?? {},
|
|
161
162
|
c,
|
|
162
|
-
oe,
|
|
163
163
|
le,
|
|
164
|
+
ue,
|
|
164
165
|
(e == null ? void 0 : e.sortInfo) ?? {},
|
|
165
166
|
(e == null ? void 0 : e.filterInfo) ?? {}
|
|
166
167
|
);
|
|
167
168
|
i && b(i) && (D = await i(D) || D);
|
|
168
|
-
const
|
|
169
|
-
G.value =
|
|
170
|
-
const H = Array.isArray(
|
|
171
|
-
let w = H ?
|
|
172
|
-
const F = H ?
|
|
169
|
+
const v = await t(D);
|
|
170
|
+
G.value = v;
|
|
171
|
+
const H = Array.isArray(v);
|
|
172
|
+
let w = H ? v : J(v, S);
|
|
173
|
+
const F = H ? v.length : J(v, y);
|
|
173
174
|
if (Number(F)) {
|
|
174
175
|
const W = Math.ceil(F / B);
|
|
175
176
|
if (U > W)
|
|
@@ -193,37 +194,37 @@ function Ae(u, {
|
|
|
193
194
|
O(!1);
|
|
194
195
|
}
|
|
195
196
|
}
|
|
196
|
-
function
|
|
197
|
+
function ne(e) {
|
|
197
198
|
n.value = e;
|
|
198
199
|
}
|
|
199
|
-
function
|
|
200
|
+
function ae() {
|
|
200
201
|
return j.value;
|
|
201
202
|
}
|
|
202
|
-
function
|
|
203
|
+
function ce() {
|
|
203
204
|
return G.value;
|
|
204
205
|
}
|
|
205
|
-
async function
|
|
206
|
+
async function oe(e) {
|
|
206
207
|
return await I(e);
|
|
207
208
|
}
|
|
208
209
|
return se(() => {
|
|
209
|
-
|
|
210
|
+
de(() => {
|
|
210
211
|
r(u).immediate && I();
|
|
211
212
|
}, 16);
|
|
212
213
|
}), {
|
|
213
214
|
getDataSourceRef: j,
|
|
214
|
-
getDataSource:
|
|
215
|
-
getRawDataSource:
|
|
215
|
+
getDataSource: ae,
|
|
216
|
+
getRawDataSource: ce,
|
|
216
217
|
getRowKey: C,
|
|
217
|
-
setTableData:
|
|
218
|
+
setTableData: ne,
|
|
218
219
|
getAutoCreateKey: K,
|
|
219
220
|
fetch: I,
|
|
220
|
-
reload:
|
|
221
|
-
updateTableData:
|
|
222
|
-
updateTableDataRecord:
|
|
223
|
-
deleteTableDataRecord:
|
|
224
|
-
insertTableDataRecord:
|
|
221
|
+
reload: oe,
|
|
222
|
+
updateTableData: p,
|
|
223
|
+
updateTableDataRecord: ee,
|
|
224
|
+
deleteTableDataRecord: te,
|
|
225
|
+
insertTableDataRecord: re,
|
|
225
226
|
findTableDataRecord: M,
|
|
226
|
-
handleTableChange:
|
|
227
|
+
handleTableChange: k
|
|
227
228
|
};
|
|
228
229
|
}
|
|
229
230
|
export {
|
|
@@ -116,10 +116,10 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
116
116
|
"onRow-mouseleave"?: ((...args: any[]) => any) | undefined;
|
|
117
117
|
"onExpanded-rows-change"?: ((...args: any[]) => any) | undefined;
|
|
118
118
|
}, {
|
|
119
|
+
ellipsis: boolean;
|
|
119
120
|
pagination: boolean | PaginationProps | null;
|
|
120
121
|
immediate: boolean;
|
|
121
122
|
columns: BasicColumn[];
|
|
122
|
-
ellipsis: boolean;
|
|
123
123
|
rowKey: string | GetRowKey<any>;
|
|
124
124
|
indentSize: number;
|
|
125
125
|
showIndexColumn: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("ant-design-vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("ant-design-vue"),d=require("@ant-design/icons-vue");require("../item/index.vue.js");require("../item-modal/index.vue2.js");require("../item-popconfirm/index.vue2.js");require("../../config-provider/index.js");const s=require("lodash-unified");require("../style/item-dropdown.css");const m=require("../../config-provider/hooks/use-namespace.js"),_=require("../item-modal/index.vue.js"),g=require("../item-popconfirm/index.vue.js"),i=require("../item/index.vue2.js"),k=e.defineComponent({name:"ApActionItemDropDown",__name:"index",props:{trigger:{default:()=>["hover"]},placement:{default:"bottomLeft"},actions:{default:()=>[]},showIcon:{type:Boolean,default:!0},text:{},color:{default:"primary"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},onClick:{},loading:{type:Boolean,default:!1}},setup(c){const a=c,l=e.ref(!1),{e:n}=m.useNamespace("action-item-dropdown"),p=e.computed(()=>a.actions.filter(r=>r.visible||s.isUndefined(r.visible)).map(r=>({...r,onAction:async o=>{var t;try{await((t=r.onAction)==null?void 0:t.call(r,o))}finally{l.value=!1}}})));return(r,o)=>(e.openBlock(),e.createBlock(e.unref(u.Dropdown),{open:l.value,"onUpdate:open":o[0]||(o[0]=t=>l.value=t),trigger:r.trigger,placement:r.placement},{overlay:e.withCtx(()=>[e.createVNode(e.unref(u.Menu),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(t,f)=>(e.openBlock(),e.createBlock(e.unref(u.MenuItem),{key:f,class:e.normalizeClass(e.unref(n)("item"))},{default:e.withCtx(()=>[t.modalProps?(e.openBlock(),e.createBlock(_.default,e.mergeProps({key:0,ref_for:!0},t),null,16)):t.popconfirmProps?(e.openBlock(),e.createBlock(g.default,e.mergeProps({key:1,ref_for:!0},t),null,16)):(e.openBlock(),e.createBlock(i.default,e.mergeProps({key:2,ref_for:!0},t),null,16))]),_:2},1032,["class"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n)("wrapper"))},[e.createVNode(i.default,e.normalizeProps(e.guardReactiveProps(e.unref(s.omit)(a,["actions","trigger","placement"]))),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3},16),r.showIcon?(e.openBlock(),e.createBlock(e.unref(d.DownOutlined),{key:0,class:e.normalizeClass(e.unref(n)("icon")),style:{color:"#0070ff"}},null,8,["class"])):e.createCommentVNode("",!0)],2)]),_:3},8,["open","trigger","placement"]))}});exports.default=k;
|
|
@@ -34,7 +34,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
34
34
|
}>>> & {
|
|
35
35
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
36
36
|
}, {
|
|
37
|
-
type: "number" | "text" | "color" | "reset" | "submit" | "button" | "time" | "month" | "date" | "week" | "
|
|
37
|
+
type: "number" | "text" | "color" | "reset" | "submit" | "button" | "time" | "month" | "date" | "week" | "hidden" | "search" | "image" | "tel" | "url" | "email" | "checkbox" | "radio" | "range" | "datetime-local" | "file" | "password";
|
|
38
38
|
mode: FieldMode;
|
|
39
39
|
bordered: boolean;
|
|
40
40
|
allowClear: boolean;
|
|
@@ -23,7 +23,7 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
|
|
|
23
23
|
}>>> & {
|
|
24
24
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
25
25
|
}, {
|
|
26
|
-
type: "number" | "text" | "color" | "reset" | "submit" | "button" | "time" | "month" | "date" | "week" | "
|
|
26
|
+
type: "number" | "text" | "color" | "reset" | "submit" | "button" | "time" | "month" | "date" | "week" | "hidden" | "search" | "image" | "tel" | "url" | "email" | "checkbox" | "radio" | "range" | "datetime-local" | "file" | "password";
|
|
27
27
|
mode: FieldMode;
|
|
28
28
|
bordered: boolean;
|
|
29
29
|
lazy: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B=require("ant-design-vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B=require("ant-design-vue"),d=require("lodash-unified"),S=require("./constant.js"),_=require("@ant-design/icons-vue");require("../config-provider/index.js");const w=require("./context.js");require("./style/ap-form-item.css");const I=require("../config-provider/hooks/use-namespace.js"),A=e.defineComponent({name:"ApFormItem",__name:"ap-form-item",props:{htmlFor:{},prefixCls:{},label:{},help:{},extra:{},labelCol:{},wrapperCol:{},hasFeedback:{type:Boolean,default:!1},colon:{type:Boolean,default:void 0},labelAlign:{},prop:{},name:{},rules:{},autoLink:{type:Boolean,default:!0},required:{type:Boolean,default:void 0},validateFirst:{type:Boolean,default:void 0},validateStatus:{},validateTrigger:{},messageVariables:{},hidden:{type:Boolean},noStyle:{type:Boolean},tooltip:{},span:{},order:{},offset:{},push:{},pull:{},xs:{},sm:{},md:{},lg:{},xl:{},xxl:{},flex:{},bordered:{type:Boolean,default:!1},valuePropName:{default:"value"}},setup(F,{expose:b}){var v;const t=F,a=e.useSlots(),{model:u,updateModel:s}=w.useInjectForm(),{m:f}=I.useNamespace("ap-form-item"),i=e.ref(!1),r=e.ref(),c=e.computed(()=>t.name?d.isArray(t.name)?t.name.reduce((o,l)=>o==null?void 0:o[l],e.unref(u)):u==null?void 0:u.value[t.name]:null),p=e.ref((v=a.default())==null?void 0:v[0]);e.onBeforeUpdate(()=>{var o;p.value=(o=a.default())==null?void 0:o[0]});function h(o){s==null||s(t.name,o)}function C(){i.value=!0}function V(){i.value=!1}const m=e.computed(()=>{var l,n;if(!t.name)return(l=a.default())==null?void 0:l[0];const o=e.unref(p);return o?e.cloneVNode(o,{[t.valuePropName]:e.unref(c),[`onUpdate:${t.valuePropName}`]:h,bordered:t.bordered?!1:(n=o==null?void 0:o.props)==null?void 0:n.bordered,onFocus:C,onBlur:V}):null});function g(){var o;(o=r.value)==null||o.onFieldBlur()}function N(){var o;(o=r.value)==null||o.onFieldChange()}function q(){var o;(o=r.value)==null||o.clearValidate()}function x(){var o;(o=r.value)==null||o.resetField()}function k(){return e.unref(c)}return b({onFieldBlur:g,onFieldChange:N,clearValidate:q,resetField:x,getFieldValue:k}),(o,l)=>(e.openBlock(),e.createBlock(e.unref(B.Form).Item,e.mergeProps({ref_key:"formItemRef",ref:r},e.unref(d.omit)(t,[...e.unref(S.apFormItemColPropKeys),"tooltip"]),{class:{[e.unref(f)("bordered")]:o.bordered,[e.unref(f)("focused")]:o.bordered&&i.value},colon:o.bordered?!1:t.colon}),e.createSlots({default:e.withCtx(()=>[m.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(m.value),{key:0})):e.createCommentVNode("",!0)]),_:2},[t.tooltip?{name:"tooltip",fn:e.withCtx(({class:n})=>[e.createElementVNode("span",{class:e.normalizeClass(n)},[e.createVNode(e.unref(B.Tooltip),{title:t.tooltip},{default:e.withCtx(()=>[e.createVNode(e.unref(_.QuestionCircleOutlined),{style:{color:"#0070ff"}})]),_:1},8,["title"])],2)]),key:"0"}:void 0,e.renderList(e.unref(d.omit)(e.unref(a),"default"),(n,y)=>({name:y,fn:e.withCtx(P=>[e.renderSlot(o.$slots,y,e.normalizeProps(e.guardReactiveProps(P||{})))])}))]),1040,["class","colon"]))}});exports.default=A;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ApFormListProps } from './interface';
|
|
2
|
-
import { NamePath } from 'ant-design-vue/es/form/interface';
|
|
3
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
4
3
|
|
|
5
4
|
type FormListField = {
|
|
6
5
|
key: number;
|
|
7
|
-
name:
|
|
6
|
+
name: (string | number)[];
|
|
8
7
|
value: any;
|
|
9
8
|
fieldName: number;
|
|
10
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),v=require("./context.js"),y=require("lodash-unified"),h=t.defineComponent({name:"ApFormList",__name:"ap-form-list",props:{name:{}},setup(f){let u=1;const o=[],r=f,{model:c,updateModel:s}=v.useInjectForm(),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),v=require("./context.js"),y=require("lodash-unified"),h=t.defineComponent({name:"ApFormList",__name:"ap-form-list",props:{name:{}},setup(f){let u=1;const o=[],r=f,{model:c,updateModel:s}=v.useInjectForm(),a=t.computed(()=>y.isArray(r.name)?r.name.reduce((e,n)=>e==null?void 0:e.value[n],c):c==null?void 0:c.value[r.name]);function m(e=void 0){const n=t.unref(a)?[...t.unref(a),e]:[e];o.push(u),u+=1,s==null||s(r.name,n)}function d(e){let n=t.unref(a)||[];n=[...n.slice(0,e),...n.slice(e+1)],o.splice(e,1),s==null||s(r.name,n)}const p={add:m,remove:d},_=t.computed(()=>(t.unref(a)||[]).map((n,i)=>{let l=o[i];return typeof l>"u"&&(o[i]=u,l=u,u+=1),{key:l,fieldName:i,name:[r.name,i],value:n}}));return(e,n)=>t.renderSlot(e.$slots,"default",{fields:_.value,actions:p})}});exports.default=h;
|
|
@@ -87,8 +87,8 @@ declare const _default: DefineComponent<{
|
|
|
87
87
|
}, {
|
|
88
88
|
title: string;
|
|
89
89
|
size: string;
|
|
90
|
-
bordered: boolean;
|
|
91
90
|
column: number | Record<string, any>;
|
|
91
|
+
bordered: boolean;
|
|
92
92
|
schema: DescItem[];
|
|
93
93
|
useCollapse: boolean;
|
|
94
94
|
collapseOptions: CollapseContainerOptions;
|
|
@@ -91,8 +91,8 @@ export declare const Description: {
|
|
|
91
91
|
}, {
|
|
92
92
|
title: string;
|
|
93
93
|
size: string;
|
|
94
|
-
bordered: boolean;
|
|
95
94
|
column: number | Record<string, any>;
|
|
95
|
+
bordered: boolean;
|
|
96
96
|
schema: DescItem[];
|
|
97
97
|
useCollapse: boolean;
|
|
98
98
|
collapseOptions: CollapseContainerOptions;
|
|
@@ -148,8 +148,8 @@ export declare const Description: {
|
|
|
148
148
|
}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
149
149
|
title: string;
|
|
150
150
|
size: string;
|
|
151
|
-
bordered: boolean;
|
|
152
151
|
column: number | Record<string, any>;
|
|
152
|
+
bordered: boolean;
|
|
153
153
|
schema: DescItem[];
|
|
154
154
|
useCollapse: boolean;
|
|
155
155
|
collapseOptions: CollapseContainerOptions;
|
|
@@ -202,8 +202,8 @@ export declare const Description: {
|
|
|
202
202
|
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "register"[], "register", {
|
|
203
203
|
title: string;
|
|
204
204
|
size: string;
|
|
205
|
-
bordered: boolean;
|
|
206
205
|
column: number | Record<string, any>;
|
|
206
|
+
bordered: boolean;
|
|
207
207
|
schema: DescItem[];
|
|
208
208
|
useCollapse: boolean;
|
|
209
209
|
collapseOptions: CollapseContainerOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={borderRadius:4},r={...o,colorPrimary:"#0070FF",colorPrimaryHover:"#66A9FF",colorPrimaryActive:"#338CFF",colorTextBase:"#182948",colorText:"#182948",colorTextSecondary:"#526A90",colorTextTertiary:"#8896B0",colorBorder:"#DEE4ED",colorSplit:"#E9EDF3",colorInfo:"#0070FF",colorSuccess:"#2ED1A3",colorError:"#FF4D4F",colorWarning:"#FFA940",colorBgContainerDisabled:"#F9F9FA",wireframe:!1,colorBgLayout:"#F2F6F9"},c={...o,colorPrimary:"#34B77C",colorPrimaryHover:"#85D4B0",colorPrimaryActive:"#5DC596",colorBgContainerDisabled:"#f5f5f5",colorText:"#333333",colorTextSecondary:"#666666",colorTextTertiary:"#999999",colorBorder:"#D9D9D9",colorSplit:"#E9E9E9",colorInfo:"#1890FF",colorSuccess:"#52C41A",colorError:"#FF4D4F",colorWarning:"#FAAD14",colorLink:"#1890FF",wireframe:!1,colorBgLayout:"#FAFAFA"};exports.adminToken=c;exports.aplusToken=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={borderRadius:4},r={...o,colorPrimary:"#0070FF",colorPrimaryHover:"#66A9FF",colorPrimaryActive:"#338CFF",colorTextBase:"#182948",colorText:"#182948",colorTextSecondary:"#526A90",colorTextTertiary:"#8896B0",colorBorder:"#DEE4ED",colorSplit:"#E9EDF3",colorInfo:"#0070FF",colorSuccess:"#2ED1A3",colorError:"#FF4D4F",colorWarning:"#FFA940",colorBgContainerDisabled:"#F9F9FA",wireframe:!1,colorBgLayout:"#F2F6F9",colorBgSpotlight:"#00000080"},c={...o,colorPrimary:"#34B77C",colorPrimaryHover:"#85D4B0",colorPrimaryActive:"#5DC596",colorBgContainerDisabled:"#f5f5f5",colorText:"#333333",colorTextSecondary:"#666666",colorTextTertiary:"#999999",colorBorder:"#D9D9D9",colorSplit:"#E9E9E9",colorInfo:"#1890FF",colorSuccess:"#52C41A",colorError:"#FF4D4F",colorWarning:"#FAAD14",colorLink:"#1890FF",wireframe:!1,colorBgLayout:"#FAFAFA",colorBgSpotlight:"#00000080"};exports.adminToken=c;exports.aplusToken=r;
|
|
@@ -26,9 +26,9 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
|
|
|
26
26
|
}, {
|
|
27
27
|
mode: "svg" | "iconify";
|
|
28
28
|
width: string;
|
|
29
|
+
copy: boolean;
|
|
29
30
|
value: string;
|
|
30
31
|
readonly: boolean;
|
|
31
|
-
copy: boolean;
|
|
32
32
|
allowClear: boolean;
|
|
33
33
|
pageSize: number;
|
|
34
34
|
}, {}>;
|
|
@@ -10,6 +10,10 @@ export declare const IconPicker: {
|
|
|
10
10
|
type: PropType<string>;
|
|
11
11
|
default: string;
|
|
12
12
|
};
|
|
13
|
+
copy: {
|
|
14
|
+
type: PropType<boolean>;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
13
17
|
value: {
|
|
14
18
|
type: PropType<string>;
|
|
15
19
|
default: string;
|
|
@@ -18,10 +22,6 @@ export declare const IconPicker: {
|
|
|
18
22
|
type: PropType<boolean>;
|
|
19
23
|
default: boolean;
|
|
20
24
|
};
|
|
21
|
-
copy: {
|
|
22
|
-
type: PropType<boolean>;
|
|
23
|
-
default: boolean;
|
|
24
|
-
};
|
|
25
25
|
allowClear: {
|
|
26
26
|
type: PropType<boolean>;
|
|
27
27
|
default: boolean;
|
|
@@ -48,6 +48,10 @@ export declare const IconPicker: {
|
|
|
48
48
|
type: PropType<string>;
|
|
49
49
|
default: string;
|
|
50
50
|
};
|
|
51
|
+
copy: {
|
|
52
|
+
type: PropType<boolean>;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
51
55
|
value: {
|
|
52
56
|
type: PropType<string>;
|
|
53
57
|
default: string;
|
|
@@ -56,10 +60,6 @@ export declare const IconPicker: {
|
|
|
56
60
|
type: PropType<boolean>;
|
|
57
61
|
default: boolean;
|
|
58
62
|
};
|
|
59
|
-
copy: {
|
|
60
|
-
type: PropType<boolean>;
|
|
61
|
-
default: boolean;
|
|
62
|
-
};
|
|
63
63
|
allowClear: {
|
|
64
64
|
type: PropType<boolean>;
|
|
65
65
|
default: boolean;
|
|
@@ -77,9 +77,9 @@ export declare const IconPicker: {
|
|
|
77
77
|
}, {
|
|
78
78
|
mode: "svg" | "iconify";
|
|
79
79
|
width: string;
|
|
80
|
+
copy: boolean;
|
|
80
81
|
value: string;
|
|
81
82
|
readonly: boolean;
|
|
82
|
-
copy: boolean;
|
|
83
83
|
allowClear: boolean;
|
|
84
84
|
pageSize: number;
|
|
85
85
|
}, true, {}, {}, {
|
|
@@ -98,6 +98,10 @@ export declare const IconPicker: {
|
|
|
98
98
|
type: PropType<string>;
|
|
99
99
|
default: string;
|
|
100
100
|
};
|
|
101
|
+
copy: {
|
|
102
|
+
type: PropType<boolean>;
|
|
103
|
+
default: boolean;
|
|
104
|
+
};
|
|
101
105
|
value: {
|
|
102
106
|
type: PropType<string>;
|
|
103
107
|
default: string;
|
|
@@ -106,10 +110,6 @@ export declare const IconPicker: {
|
|
|
106
110
|
type: PropType<boolean>;
|
|
107
111
|
default: boolean;
|
|
108
112
|
};
|
|
109
|
-
copy: {
|
|
110
|
-
type: PropType<boolean>;
|
|
111
|
-
default: boolean;
|
|
112
|
-
};
|
|
113
113
|
allowClear: {
|
|
114
114
|
type: PropType<boolean>;
|
|
115
115
|
default: boolean;
|
|
@@ -127,9 +127,9 @@ export declare const IconPicker: {
|
|
|
127
127
|
}, {}, {}, {}, {}, {
|
|
128
128
|
mode: "svg" | "iconify";
|
|
129
129
|
width: string;
|
|
130
|
+
copy: boolean;
|
|
130
131
|
value: string;
|
|
131
132
|
readonly: boolean;
|
|
132
|
-
copy: boolean;
|
|
133
133
|
allowClear: boolean;
|
|
134
134
|
pageSize: number;
|
|
135
135
|
}>;
|
|
@@ -145,6 +145,10 @@ export declare const IconPicker: {
|
|
|
145
145
|
type: PropType<string>;
|
|
146
146
|
default: string;
|
|
147
147
|
};
|
|
148
|
+
copy: {
|
|
149
|
+
type: PropType<boolean>;
|
|
150
|
+
default: boolean;
|
|
151
|
+
};
|
|
148
152
|
value: {
|
|
149
153
|
type: PropType<string>;
|
|
150
154
|
default: string;
|
|
@@ -153,10 +157,6 @@ export declare const IconPicker: {
|
|
|
153
157
|
type: PropType<boolean>;
|
|
154
158
|
default: boolean;
|
|
155
159
|
};
|
|
156
|
-
copy: {
|
|
157
|
-
type: PropType<boolean>;
|
|
158
|
-
default: boolean;
|
|
159
|
-
};
|
|
160
160
|
allowClear: {
|
|
161
161
|
type: PropType<boolean>;
|
|
162
162
|
default: boolean;
|
|
@@ -177,9 +177,9 @@ export declare const IconPicker: {
|
|
|
177
177
|
}, string, {
|
|
178
178
|
mode: "svg" | "iconify";
|
|
179
179
|
width: string;
|
|
180
|
+
copy: boolean;
|
|
180
181
|
value: string;
|
|
181
182
|
readonly: boolean;
|
|
182
|
-
copy: boolean;
|
|
183
183
|
allowClear: boolean;
|
|
184
184
|
pageSize: number;
|
|
185
185
|
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin<any[]> & (new (...args: any[]) => {
|
|
@@ -110,7 +110,7 @@ export declare function useItemLabelWidth(schemaItemRef: Ref<FormSchema>, propsR
|
|
|
110
110
|
contextmenu?: string | undefined;
|
|
111
111
|
dir?: string | undefined;
|
|
112
112
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
113
|
-
hidden?: "" | (boolean | "true" | "false") | "
|
|
113
|
+
hidden?: "" | "hidden" | (boolean | "true" | "false") | "until-found" | undefined;
|
|
114
114
|
id?: string | undefined;
|
|
115
115
|
inert?: (boolean | "true" | "false") | undefined;
|
|
116
116
|
lang?: string | undefined;
|
|
@@ -145,7 +145,7 @@ export declare function useItemLabelWidth(schemaItemRef: Ref<FormSchema>, propsR
|
|
|
145
145
|
is?: string | undefined;
|
|
146
146
|
'aria-activedescendant'?: string | undefined;
|
|
147
147
|
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
148
|
-
'aria-autocomplete'?: "
|
|
148
|
+
'aria-autocomplete'?: "none" | "inline" | "both" | "list" | undefined;
|
|
149
149
|
'aria-busy'?: (boolean | "true" | "false") | undefined;
|
|
150
150
|
'aria-checked'?: (boolean | "true" | "false") | "mixed" | undefined;
|
|
151
151
|
'aria-colcount'?: (string | number) | undefined;
|
|
@@ -156,7 +156,7 @@ export declare function useItemLabelWidth(schemaItemRef: Ref<FormSchema>, propsR
|
|
|
156
156
|
'aria-describedby'?: string | undefined;
|
|
157
157
|
'aria-details'?: string | undefined;
|
|
158
158
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
159
|
-
'aria-dropeffect'?: "link" | "
|
|
159
|
+
'aria-dropeffect'?: "link" | "copy" | "none" | "move" | "execute" | "popup" | undefined;
|
|
160
160
|
'aria-errormessage'?: string | undefined;
|
|
161
161
|
'aria-expanded'?: (boolean | "true" | "false") | undefined;
|
|
162
162
|
'aria-flowto'?: string | undefined;
|
|
@@ -77,8 +77,8 @@ declare const _default: DefineComponent<{
|
|
|
77
77
|
required: true;
|
|
78
78
|
};
|
|
79
79
|
}>>, {
|
|
80
|
-
value: string | number | boolean | Record<string, any>;
|
|
81
80
|
column: BasicColumn;
|
|
81
|
+
value: string | number | boolean | Record<string, any>;
|
|
82
82
|
record: any;
|
|
83
83
|
}, {}>;
|
|
84
84
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),ue=require("@vueuse/core"),N=require("../../utils/uuid.js"),l=require("lodash-unified"),g=require("../const.js"),B=require("../helper.js");require("../../config-provider/index.js");const ae=require("../../config-provider/hooks/use-global-config.js");function ce(f,{getPaginationInfo:O,setPagination:S,setLoading:_,getFieldsValue:H,clearSelectedRowKeys:V,tableData:Z},A){const C=ae.useGlobalConfig(),J=n.unref(C).table.fetchSetting,P=n.unref(C).table.defaultPageSize,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),ue=require("@vueuse/core"),N=require("../../utils/uuid.js"),l=require("lodash-unified"),g=require("../const.js"),B=require("../helper.js");require("../../config-provider/index.js");const ae=require("../../config-provider/hooks/use-global-config.js");function ce(f,{getPaginationInfo:O,setPagination:S,setLoading:_,getFieldsValue:H,clearSelectedRowKeys:V,tableData:Z},A){const C=ae.useGlobalConfig(),J=n.unref(C).table.fetchSetting,P=n.unref(C).table.defaultPageSize,T=n.reactive({sortInfo:{},filterInfo:{}}),t=n.ref([]),q=n.ref({});n.watchEffect(()=>{Z.value=n.unref(t)}),n.watch(()=>n.unref(f).dataSource,()=>{const{dataSource:e,api:r}=n.unref(f);!r&&e&&(t.value=e)},{immediate:!0});function Q(e,r,u){const{clearSelectOnPageChange:a,sortFn:c,filterFn:i}=n.unref(f);a&&V(),S(e);const o={};if(u&&l.isFunction(c)){const s=c(u);T.sortInfo=s,o.sortInfo=s}if(r&&l.isFunction(i)){const s=i(r);T.filterInfo=s,o.filterInfo=s}I(o)}function W(e){!e||!Array.isArray(e)||e.forEach(r=>{r[g.ROW_KEY]||(r[g.ROW_KEY]=N.buildUUID()),r.children&&r.children.length&&W(r.children)})}const R=n.computed(()=>n.unref(f).autoCreateKey&&!n.unref(f).rowKey),m=n.computed(()=>{const{rowKey:e}=n.unref(f);return n.unref(R)?g.ROW_KEY:e});n.watchEffect(()=>{if(n.unref(R)){const e=n.unref(t),r=e[0],u=e[e.length-1];if(r&&u&&(!r[g.ROW_KEY]||!u[g.ROW_KEY])){const a=l.cloneDeep(n.unref(t));a.forEach(c=>{c[g.ROW_KEY]||(c[g.ROW_KEY]=N.buildUUID()),c.children&&c.children.length&&W(c.children)}),t.value=a}}});const Y=n.computed(()=>{const e=n.unref(t);return!e||e.length===0,n.unref(t)});async function X(e,r,u){return t.value[e]&&(t.value[e][r]=u),t.value[e]}function $(e,r){const u=U(e);if(u){for(const a in u)Reflect.has(r,a)&&(u[a]=r[a]);return u}}function x(e){var a;if(!t.value||t.value.length==0)return;const r=Array.isArray(e)?e:[e];function u(c,i){const o=s(c,i);if(o===null||o.index===-1)return;o.data.splice(o.index,1);function s(d,v){var K;if(d==null)return null;for(let w=0;w<d.length;w++){const F=d[w];if(B.parseRowKeyValue(n.unref(m),F)===v)return{index:w,data:d};if(((K=F.children)==null?void 0:K.length)>0){const h=s(F.children,v);if(h!=null)return h}}return null}}for(const c of r)u(t.value,c),u(n.unref(f).dataSource,c);S({total:(a=n.unref(f).dataSource)==null?void 0:a.length})}function L(e,r){var a;r=r??((a=t.value)==null?void 0:a.length);const u=l.isObject(e)?[e]:e;return n.unref(t).splice(r,0,...u),n.unref(t)}function U(e){if(!t.value||t.value.length==0)return;const{childrenColumnName:r="children"}=n.unref(f);return(a=>{let c;return a.some(function i(o){return B.parseRowKeyValue(n.unref(m),o)===e?(c=o,!0):o[r]&&o[r].some(i)}),c})(t.value)}async function I(e){const{api:r,searchInfo:u,defSort:a,fetchSetting:c,beforeFetch:i,afterFetch:o,useSearchForm:s,pagination:d}=n.unref(f);if(!(!r||!l.isFunction(r)))try{_(!0);const{pageField:v,sizeField:K,listField:w,totalField:F}=Object.assign({},J,c);let h={};const{current:G=1,pageSize:j=P}=n.unref(O);l.isBoolean(d)&&!d||l.isBoolean(O)?h={}:(h[v]=e&&e.page||G,h[K]=j);const{sortInfo:re={},filterInfo:te}=T;let D=l.merge(h,s?H():{},u,(e==null?void 0:e.searchInfo)??{},a,re,te,(e==null?void 0:e.sortInfo)??{},(e==null?void 0:e.filterInfo)??{});i&&l.isFunction(i)&&(D=await i(D)||D);const b=await r(D);q.value=b;const z=Array.isArray(b);let y=z?b:l.get(b,w);const E=z?b.length:l.get(b,F);if(Number(E)){const M=Math.ceil(E/j);if(G>M)return S({current:M}),await I(e)}return o&&l.isFunction(o)&&(y=await o(y)||y),t.value=y,S({total:E||0}),e&&e.page&&S({current:e.page||1}),A("fetch-success",{items:n.unref(y),total:E}),y}catch(v){A("fetch-error",v),t.value=[],S({total:0})}finally{_(!1)}}function k(e){t.value=e}function p(){return Y.value}function ee(){return q.value}async function ne(e){return await I(e)}return n.onMounted(()=>{ue.useTimeoutFn(()=>{n.unref(f).immediate&&I()},16)}),{getDataSourceRef:Y,getDataSource:p,getRawDataSource:ee,getRowKey:m,setTableData:k,getAutoCreateKey:R,fetch:I,reload:ne,updateTableData:X,updateTableDataRecord:$,deleteTableDataRecord:x,insertTableDataRecord:L,findTableDataRecord:U,handleTableChange:Q}}exports.useDataSource=ce;
|
|
@@ -116,10 +116,10 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
116
116
|
"onRow-mouseleave"?: ((...args: any[]) => any) | undefined;
|
|
117
117
|
"onExpanded-rows-change"?: ((...args: any[]) => any) | undefined;
|
|
118
118
|
}, {
|
|
119
|
+
ellipsis: boolean;
|
|
119
120
|
pagination: boolean | PaginationProps | null;
|
|
120
121
|
immediate: boolean;
|
|
121
122
|
columns: BasicColumn[];
|
|
122
|
-
ellipsis: boolean;
|
|
123
123
|
rowKey: string | GetRowKey<any>;
|
|
124
124
|
indentSize: number;
|
|
125
125
|
showIndexColumn: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aplus-frontend/ui",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.11",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "es/index.mjs",
|
|
6
6
|
"files": [
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"dayjs": "^1.11.11",
|
|
52
52
|
"lodash-unified": "^1.0.3",
|
|
53
53
|
"sortablejs": "^1.15.2",
|
|
54
|
-
"@aplus-frontend/hooks": "1.0.
|
|
55
|
-
"@aplus-frontend/utils": "1.0.
|
|
54
|
+
"@aplus-frontend/hooks": "1.0.3",
|
|
55
|
+
"@aplus-frontend/utils": "1.0.17"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"ant-design-vue": "^4.2.1"
|