@aplus-frontend/ui 0.2.20 → 0.2.22
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 +95 -93
- package/es/src/ap-descriptions/help-message/index.vue2.mjs +18 -18
- package/es/src/ap-drawer/index.d.ts +8 -0
- package/es/src/ap-drawer/index.mjs +10 -0
- package/es/src/ap-drawer/interface.d.ts +16 -0
- package/es/src/ap-drawer/interface.mjs +1 -0
- package/es/src/ap-drawer/style/css.d.ts +1 -0
- package/es/src/ap-drawer/style/css.js +1 -0
- package/es/src/ap-drawer/style/index.d.ts +1 -0
- package/es/src/ap-drawer/style/index.js +1 -0
- package/es/src/ap-drawer/utils/createDrawer.d.ts +2 -0
- package/es/src/ap-drawer/utils/createDrawer.mjs +83 -0
- package/es/src/ap-drawer/utils/index.d.ts +1 -0
- package/es/src/ap-drawer/utils/index.mjs +4 -0
- package/es/src/ap-form/interface.d.ts +1 -1
- package/es/src/ap-form/item/index.vue.mjs +48 -51
- package/es/src/ap-form/items/number/index.vue.d.ts +10 -10
- package/es/src/ap-form/items/text/index.vue.d.ts +10 -10
- package/es/src/ap-form/items/text/password.vue.d.ts +10 -10
- package/es/src/ap-form/items/text-area/index.vue.d.ts +9 -9
- package/es/src/ap-form/render/control.vue.mjs +7 -7
- package/es/src/ap-form/render/item.vue.d.ts +6 -5
- package/es/src/ap-form/render/item.vue.mjs +20 -12
- package/es/src/ap-form/render/style/css.d.ts +1 -0
- package/es/src/ap-form/render/style/css.js +1 -0
- package/es/src/ap-form/render/style/style.d.ts +1 -0
- package/es/src/ap-list/index.vue.d.ts +10 -2
- package/es/src/ap-list/index.vue.mjs +135 -85
- package/es/src/ap-list/interface.d.ts +22 -3
- package/es/src/ap-modal/interface.d.ts +3 -0
- package/es/src/ap-modal/utils/createModal.mjs +46 -36
- package/es/src/ap-table/constants.d.ts +42 -42
- package/es/src/ap-tag/ap-tag.vue.mjs +16 -13
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +206 -204
- package/es/src/path-map.mjs +4 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-descriptions/help-message/index.vue2.js +1 -1
- package/lib/src/ap-drawer/index.d.ts +8 -0
- package/lib/src/ap-drawer/index.js +1 -0
- package/lib/src/ap-drawer/interface.d.ts +16 -0
- package/lib/src/ap-drawer/interface.js +1 -0
- package/lib/src/ap-drawer/style/css.d.ts +1 -0
- package/lib/src/ap-drawer/style/css.js +1 -0
- package/lib/src/ap-drawer/style/index.d.ts +1 -0
- package/lib/src/ap-drawer/style/index.js +1 -0
- package/lib/src/ap-drawer/utils/createDrawer.d.ts +2 -0
- package/lib/src/ap-drawer/utils/createDrawer.js +1 -0
- package/lib/src/ap-drawer/utils/index.d.ts +1 -0
- package/lib/src/ap-drawer/utils/index.js +1 -0
- package/lib/src/ap-form/interface.d.ts +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +10 -10
- package/lib/src/ap-form/items/text/index.vue.d.ts +10 -10
- package/lib/src/ap-form/items/text/password.vue.d.ts +10 -10
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +9 -9
- package/lib/src/ap-form/render/control.vue.js +1 -1
- package/lib/src/ap-form/render/item.vue.d.ts +6 -5
- package/lib/src/ap-form/render/item.vue.js +1 -1
- package/lib/src/ap-form/render/style/css.d.ts +1 -0
- package/lib/src/ap-form/render/style/css.js +1 -0
- package/lib/src/ap-form/render/style/style.d.ts +1 -0
- package/lib/src/ap-list/index.vue.d.ts +10 -2
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-list/interface.d.ts +22 -3
- package/lib/src/ap-modal/interface.d.ts +3 -0
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-table/constants.d.ts +42 -42
- package/lib/src/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/package.json +4 -3
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Empty as
|
|
1
|
+
import { defineComponent as H, ref as J, unref as t, computed as c, watch as Q, openBlock as i, createBlock as y, normalizeClass as u, withCtx as f, createElementVNode as X, normalizeStyle as v, renderSlot as l, createVNode as h, createElementBlock as p, Fragment as B, renderList as Y, mergeProps as Z, createCommentVNode as _ } from "vue";
|
|
2
|
+
import { Empty as E, Spin as x, Pagination as ee } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../ap-table/index.mjs";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
5
|
-
import { isUndefined as
|
|
6
|
-
import { useOfflineList as
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
5
|
+
import { isUndefined as O, isNumber as te, omit as ae } from "lodash-unified";
|
|
6
|
+
import { useOfflineList as ne } from "./hooks/use-offline-list.mjs";
|
|
7
|
+
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
|
8
|
+
import { RecycleScroller as re, DynamicScroller as oe, DynamicScrollerItem as ie } from "vue-virtual-scroller";
|
|
9
|
+
import { useNamespace as le } from "../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
import { useTablePaging as se } from "../ap-table/hooks/use-table-paging.mjs";
|
|
11
|
+
const he = /* @__PURE__ */ H({
|
|
10
12
|
__name: "index",
|
|
11
13
|
props: {
|
|
12
14
|
dataSource: {},
|
|
@@ -19,26 +21,29 @@ const fe = /* @__PURE__ */ M({
|
|
|
19
21
|
beforeSearchSubmit: {},
|
|
20
22
|
pagination: { type: [Boolean, Object], default: void 0 },
|
|
21
23
|
manual: { type: Boolean },
|
|
22
|
-
containerStyle: {},
|
|
23
|
-
|
|
24
|
+
containerStyle: { type: [Boolean, null, String, Object, Array] },
|
|
25
|
+
contentStyle: { type: [Boolean, null, String, Object, Array] },
|
|
26
|
+
footerWarpperStyle: { type: [Boolean, null, String, Object, Array] },
|
|
27
|
+
virtual: { default: void 0 },
|
|
28
|
+
rowKey: {}
|
|
24
29
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
27
|
-
formRef:
|
|
28
|
-
submit:
|
|
29
|
-
reset:
|
|
30
|
-
handleTableChange:
|
|
31
|
-
data:
|
|
30
|
+
setup(V, { expose: F }) {
|
|
31
|
+
const L = E.PRESENTED_IMAGE_SIMPLE, n = V, { b: d, e: N } = le("ap-list"), b = J(), {
|
|
32
|
+
formRef: k,
|
|
33
|
+
submit: D,
|
|
34
|
+
reset: z,
|
|
35
|
+
handleTableChange: R,
|
|
36
|
+
data: g,
|
|
32
37
|
refresh: T,
|
|
33
|
-
refreshByDelete:
|
|
38
|
+
refreshByDelete: $,
|
|
34
39
|
tableProps: C
|
|
35
|
-
} =
|
|
36
|
-
async request(
|
|
37
|
-
var
|
|
38
|
-
const
|
|
40
|
+
} = se({
|
|
41
|
+
async request(e) {
|
|
42
|
+
var r;
|
|
43
|
+
const a = await ((r = n.request) == null ? void 0 : r.call(n, e));
|
|
39
44
|
return {
|
|
40
|
-
data: (
|
|
41
|
-
total: (
|
|
45
|
+
data: (a == null ? void 0 : a.data) || [],
|
|
46
|
+
total: (a == null ? void 0 : a.total) || 0
|
|
42
47
|
};
|
|
43
48
|
},
|
|
44
49
|
defaultParams: n.params,
|
|
@@ -47,92 +52,137 @@ const fe = /* @__PURE__ */ M({
|
|
|
47
52
|
defaultCurrent: n.pagination ? n.pagination.defaultCurrent : void 0,
|
|
48
53
|
defaultPageSize: n.pagination ? n.pagination.defaultPageSize : void 0,
|
|
49
54
|
formatParams: n.beforeSearchSubmit
|
|
50
|
-
}),
|
|
51
|
-
pagination:
|
|
52
|
-
dataSource:
|
|
53
|
-
onChange:
|
|
54
|
-
} =
|
|
55
|
-
function
|
|
56
|
-
if (t(
|
|
57
|
-
|
|
55
|
+
}), j = { form: k }, {
|
|
56
|
+
pagination: I,
|
|
57
|
+
dataSource: q,
|
|
58
|
+
onChange: A
|
|
59
|
+
} = ne(n);
|
|
60
|
+
function K(e, a) {
|
|
61
|
+
if (t(m)) {
|
|
62
|
+
A(e, a);
|
|
58
63
|
return;
|
|
59
64
|
}
|
|
60
|
-
|
|
61
|
-
{ current:
|
|
65
|
+
R(
|
|
66
|
+
{ current: e, pageSize: a },
|
|
62
67
|
{},
|
|
63
68
|
{},
|
|
64
69
|
{ currentDataSource: [], action: "paginate" }
|
|
65
70
|
);
|
|
66
71
|
}
|
|
67
|
-
const
|
|
68
|
-
var
|
|
69
|
-
return n.pagination === !1 ? !1 : ((
|
|
70
|
-
}),
|
|
71
|
-
|
|
72
|
-
() => t(
|
|
73
|
-
(
|
|
74
|
-
var
|
|
75
|
-
(
|
|
72
|
+
const s = c(() => t(m) ? t(q) : t(g).records), S = c(() => O(n.loading) ? t(g).loading : n.loading), M = c(() => {
|
|
73
|
+
var e, a;
|
|
74
|
+
return n.pagination === !1 || n.virtual ? !1 : ((e = n.pagination) == null ? void 0 : e.hideOnSinglePage) !== !0 ? !0 : t(m) ? (((a = n.dataSource) == null ? void 0 : a.length) || 0) > t(I).pageSize : t(g).total > t(C).pagination.pageSize;
|
|
75
|
+
}), m = c(() => !O(n.dataSource));
|
|
76
|
+
Q(
|
|
77
|
+
() => t(S),
|
|
78
|
+
(e) => {
|
|
79
|
+
var a;
|
|
80
|
+
(a = n.onLoadingChange) == null || a.call(n, e);
|
|
76
81
|
}
|
|
77
82
|
);
|
|
78
|
-
function
|
|
79
|
-
var
|
|
80
|
-
(
|
|
83
|
+
function W(e) {
|
|
84
|
+
var a, r;
|
|
85
|
+
(r = (a = b.value) == null ? void 0 : a.querySelector(e || ":first-child")) == null || r.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
81
86
|
}
|
|
82
|
-
function
|
|
83
|
-
var
|
|
84
|
-
const
|
|
85
|
-
return (
|
|
87
|
+
function G(e = !1) {
|
|
88
|
+
var o;
|
|
89
|
+
const a = (o = k.value) == null ? void 0 : o.apForm, r = e ? a == null ? void 0 : a.getFieldsValueTransformed : a == null ? void 0 : a.getFieldsValue;
|
|
90
|
+
return (r == null ? void 0 : r()) || {};
|
|
86
91
|
}
|
|
87
|
-
return
|
|
88
|
-
submit: () =>
|
|
89
|
-
reset: () =>
|
|
92
|
+
return F({
|
|
93
|
+
submit: () => D(),
|
|
94
|
+
reset: () => z(),
|
|
90
95
|
refresh: () => T(),
|
|
91
|
-
refreshByDelete: (
|
|
92
|
-
scrollToFirstRow:
|
|
93
|
-
getSearchFormValuesIfSetted:
|
|
94
|
-
}), (
|
|
95
|
-
spinning:
|
|
96
|
-
class: u(t(
|
|
96
|
+
refreshByDelete: (e) => $(e),
|
|
97
|
+
scrollToFirstRow: W,
|
|
98
|
+
getSearchFormValuesIfSetted: G
|
|
99
|
+
}), (e, a) => (i(), y(t(x), {
|
|
100
|
+
spinning: S.value,
|
|
101
|
+
class: u(t(d)("spin"))
|
|
97
102
|
}, {
|
|
98
|
-
default:
|
|
99
|
-
|
|
100
|
-
class: u(t(
|
|
101
|
-
style:
|
|
103
|
+
default: f(() => [
|
|
104
|
+
X("div", {
|
|
105
|
+
class: u(t(d)()),
|
|
106
|
+
style: v(e.containerStyle)
|
|
102
107
|
}, [
|
|
103
|
-
|
|
104
|
-
formIns:
|
|
105
|
-
submit: t(
|
|
106
|
-
reset: t(
|
|
108
|
+
l(e.$slots, "header", {
|
|
109
|
+
formIns: j,
|
|
110
|
+
submit: t(D),
|
|
111
|
+
reset: t(z)
|
|
107
112
|
}),
|
|
108
|
-
|
|
113
|
+
s.value.length === 0 ? l(e.$slots, "empty", {
|
|
109
114
|
key: 0,
|
|
110
|
-
loading:
|
|
115
|
+
loading: S.value
|
|
111
116
|
}, () => [
|
|
112
|
-
|
|
113
|
-
]) : (
|
|
117
|
+
h(t(E), { image: t(L) }, null, 8, ["image"])
|
|
118
|
+
]) : (i(), p("div", {
|
|
114
119
|
key: 1,
|
|
115
120
|
ref_key: "contentRef",
|
|
116
|
-
ref:
|
|
117
|
-
|
|
121
|
+
ref: b,
|
|
122
|
+
style: v(e.contentStyle)
|
|
118
123
|
}, [
|
|
119
|
-
|
|
120
|
-
(
|
|
121
|
-
|
|
122
|
-
|
|
124
|
+
e.virtual ? (i(), p(B, { key: 0 }, [
|
|
125
|
+
t(te)(e.virtual) ? (i(), y(t(re), {
|
|
126
|
+
key: 0,
|
|
127
|
+
class: u(t(d)("scroll-wrapper")),
|
|
128
|
+
items: s.value,
|
|
129
|
+
itemSize: e.virtual,
|
|
130
|
+
"key-field": n.rowKey || "id"
|
|
131
|
+
}, {
|
|
132
|
+
default: f(({ item: r, index: o }) => [
|
|
133
|
+
l(e.$slots, "renderItem", {
|
|
134
|
+
item: r,
|
|
135
|
+
index: o
|
|
136
|
+
})
|
|
137
|
+
]),
|
|
138
|
+
_: 3
|
|
139
|
+
}, 8, ["class", "items", "itemSize", "key-field"])) : (i(), y(t(oe), {
|
|
140
|
+
key: 1,
|
|
141
|
+
items: s.value,
|
|
142
|
+
minItemSize: e.virtual.minItemSize,
|
|
143
|
+
class: u(t(d)("scroll-wrapper"))
|
|
144
|
+
}, {
|
|
145
|
+
default: f(({ item: r, index: o, active: U }) => {
|
|
146
|
+
var P, w;
|
|
147
|
+
return [
|
|
148
|
+
h(t(ie), {
|
|
149
|
+
item: r,
|
|
150
|
+
active: U,
|
|
151
|
+
dataIndex: o,
|
|
152
|
+
sizeDependencies: (w = (P = e.virtual).sizeDependencies) == null ? void 0 : w.call(P, r)
|
|
153
|
+
}, {
|
|
154
|
+
default: f(() => [
|
|
155
|
+
l(e.$slots, "renderItem", {
|
|
156
|
+
item: r,
|
|
157
|
+
index: o
|
|
158
|
+
})
|
|
159
|
+
]),
|
|
160
|
+
_: 2
|
|
161
|
+
}, 1032, ["item", "active", "dataIndex", "sizeDependencies"])
|
|
162
|
+
];
|
|
163
|
+
}),
|
|
164
|
+
_: 3
|
|
165
|
+
}, 8, ["items", "minItemSize", "class"]))
|
|
166
|
+
], 64)) : l(e.$slots, "renderContent", {
|
|
167
|
+
key: 1,
|
|
168
|
+
dataSource: s.value
|
|
169
|
+
}, () => [
|
|
170
|
+
(i(!0), p(B, null, Y(s.value, (r, o) => l(e.$slots, "renderItem", {
|
|
171
|
+
item: r,
|
|
172
|
+
index: o
|
|
123
173
|
})), 256))
|
|
124
174
|
])
|
|
125
|
-
],
|
|
126
|
-
|
|
175
|
+
], 4)),
|
|
176
|
+
M.value ? (i(), p("div", {
|
|
127
177
|
key: 2,
|
|
128
|
-
class: u(t(
|
|
129
|
-
style:
|
|
178
|
+
class: u(t(N)("footer")),
|
|
179
|
+
style: v(e.footerWarpperStyle)
|
|
130
180
|
}, [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
{ onChange:
|
|
181
|
+
h(t(ee), Z(
|
|
182
|
+
m.value ? t(I) : t(ae)(t(C).pagination, ["showTotal"]),
|
|
183
|
+
{ onChange: K }
|
|
134
184
|
), null, 16)
|
|
135
|
-
], 6)) :
|
|
185
|
+
], 6)) : _("", !0)
|
|
136
186
|
], 6)
|
|
137
187
|
]),
|
|
138
188
|
_: 3
|
|
@@ -140,5 +190,5 @@ const fe = /* @__PURE__ */ M({
|
|
|
140
190
|
}
|
|
141
191
|
});
|
|
142
192
|
export {
|
|
143
|
-
|
|
193
|
+
he as default
|
|
144
194
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyleValue } from 'vue';
|
|
2
2
|
import { RequestData } from '../ap-table';
|
|
3
3
|
import { Recordable } from '../type';
|
|
4
4
|
export type ApListProps<RecordType = any, ParamsType = Recordable> = {
|
|
@@ -62,11 +62,30 @@ export type ApListProps<RecordType = any, ParamsType = Recordable> = {
|
|
|
62
62
|
/**
|
|
63
63
|
* List容器的自定义样式
|
|
64
64
|
*/
|
|
65
|
-
containerStyle?:
|
|
65
|
+
containerStyle?: StyleValue;
|
|
66
|
+
/**
|
|
67
|
+
* List内容区域自定义样式
|
|
68
|
+
*/
|
|
69
|
+
contentStyle?: StyleValue;
|
|
66
70
|
/**
|
|
67
71
|
* 底部分页器容器的样式
|
|
68
72
|
*/
|
|
69
|
-
footerWarpperStyle?:
|
|
73
|
+
footerWarpperStyle?: StyleValue;
|
|
74
|
+
/**
|
|
75
|
+
* 列表是否开启虚拟滚动
|
|
76
|
+
* @description 设置此属性后,将不会展示分页器,同样`renderContent`插槽将不再可用;
|
|
77
|
+
* 如果值为`number`类型,则表示每个元素的尺寸,在尺寸不固定的情况下,则可以设置`minItemSize`和`sizeDependencies`两个属性
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
virtual?: number | {
|
|
81
|
+
minItemSize: number;
|
|
82
|
+
sizeDependencies?: (item: RecordType) => any[];
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* 列表数据的key
|
|
86
|
+
* @default "id"
|
|
87
|
+
*/
|
|
88
|
+
rowKey?: string;
|
|
70
89
|
};
|
|
71
90
|
export type ApListExpose = {
|
|
72
91
|
/**
|
|
@@ -4,9 +4,12 @@ export type CreateModalFuncProps<ContentRecord = any> = Omit<ModalProps, 'open'
|
|
|
4
4
|
onOk: (params: ContentRecord) => any | Promise<any>;
|
|
5
5
|
getContainer: HTMLElement;
|
|
6
6
|
content: any;
|
|
7
|
+
destroyOnClose: boolean;
|
|
7
8
|
}>;
|
|
8
9
|
export type CreateModalFuncReturn = {
|
|
9
10
|
destroy: () => void;
|
|
10
11
|
update: (newConfig: CreateModalFuncProps) => void;
|
|
12
|
+
open: () => void;
|
|
13
|
+
close: () => void;
|
|
11
14
|
};
|
|
12
15
|
export type CreateModalFunc = (props: CreateModalFuncProps) => CreateModalFuncReturn;
|
|
@@ -1,56 +1,66 @@
|
|
|
1
|
-
import { render as
|
|
2
|
-
import { Modal as
|
|
3
|
-
import { ConfigProvider as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { render as m, defineComponent as y, createVNode as f, mergeProps as k, h as v } from "vue";
|
|
2
|
+
import { Modal as x } from "@aplus-frontend/antdv";
|
|
3
|
+
import { ConfigProvider as P, globalConfigCached as L } from "../../config-provider/config-provider.mjs";
|
|
4
|
+
import { omit as b } from "lodash-unified";
|
|
5
|
+
const T = (p) => {
|
|
6
|
+
let n, t;
|
|
7
|
+
const {
|
|
8
|
+
destroyOnClose: d = !0
|
|
9
|
+
} = p;
|
|
10
|
+
function c() {
|
|
11
|
+
n && n(!1), setTimeout(() => {
|
|
8
12
|
var e;
|
|
9
|
-
|
|
13
|
+
m(null, s), (e = s.parentElement) == null || e.removeChild(s);
|
|
10
14
|
}, 500);
|
|
11
15
|
}
|
|
12
|
-
function h(
|
|
13
|
-
n && n(
|
|
16
|
+
function h() {
|
|
17
|
+
n && n(!0);
|
|
14
18
|
}
|
|
15
|
-
|
|
19
|
+
function l() {
|
|
20
|
+
n && n(!1);
|
|
21
|
+
}
|
|
22
|
+
function u(e) {
|
|
23
|
+
t && t(e);
|
|
24
|
+
}
|
|
25
|
+
const C = /* @__PURE__ */ y({
|
|
16
26
|
data() {
|
|
17
27
|
return {
|
|
18
|
-
open:
|
|
19
|
-
props:
|
|
28
|
+
open: d,
|
|
29
|
+
props: p
|
|
20
30
|
};
|
|
21
31
|
},
|
|
22
32
|
methods: {
|
|
23
33
|
async handleCancel() {
|
|
24
|
-
var e, o, r,
|
|
34
|
+
var e, o, r, a, i;
|
|
25
35
|
if ((e = this.props) != null && e.onCancel) {
|
|
26
|
-
const
|
|
27
|
-
await ((
|
|
36
|
+
const O = ((a = (r = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : r.component) == null ? void 0 : a.exposed) ?? void 0;
|
|
37
|
+
await ((i = this.props) == null ? void 0 : i.onCancel(O));
|
|
28
38
|
}
|
|
29
|
-
d();
|
|
39
|
+
d ? c() : l();
|
|
30
40
|
},
|
|
31
41
|
async handleOk() {
|
|
32
|
-
var e, o, r,
|
|
42
|
+
var e, o, r, a;
|
|
33
43
|
try {
|
|
34
|
-
if (
|
|
44
|
+
if (t({
|
|
35
45
|
confirmLoading: !0
|
|
36
46
|
}), (e = this.props) != null && e.onOk) {
|
|
37
|
-
const
|
|
38
|
-
await this.props.onOk(
|
|
47
|
+
const i = ((a = (r = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : r.component) == null ? void 0 : a.exposed) ?? void 0;
|
|
48
|
+
await this.props.onOk(i);
|
|
39
49
|
}
|
|
40
|
-
|
|
50
|
+
t({
|
|
41
51
|
confirmLoading: !1
|
|
42
|
-
}), d();
|
|
52
|
+
}), d ? c() : l();
|
|
43
53
|
} catch {
|
|
44
|
-
|
|
54
|
+
t({
|
|
45
55
|
confirmLoading: !1
|
|
46
56
|
});
|
|
47
57
|
}
|
|
48
58
|
}
|
|
49
59
|
},
|
|
50
60
|
created() {
|
|
51
|
-
|
|
61
|
+
n = (e) => {
|
|
52
62
|
this.open = e;
|
|
53
|
-
},
|
|
63
|
+
}, t = (e) => {
|
|
54
64
|
this.props = {
|
|
55
65
|
...this.props,
|
|
56
66
|
...e
|
|
@@ -58,11 +68,9 @@ const b = (i) => {
|
|
|
58
68
|
};
|
|
59
69
|
},
|
|
60
70
|
render() {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return delete e.onCancel, delete e.onOk, l(y, v.value, {
|
|
65
|
-
default: () => [l(k, g({
|
|
71
|
+
const e = b(this.props, ["onCancel", "onOk"]);
|
|
72
|
+
return f(P, L.value, {
|
|
73
|
+
default: () => [f(x, k({
|
|
66
74
|
open: this.open,
|
|
67
75
|
destroyOnClose: !0,
|
|
68
76
|
onCancel: this.handleCancel,
|
|
@@ -75,12 +83,14 @@ const b = (i) => {
|
|
|
75
83
|
})]
|
|
76
84
|
});
|
|
77
85
|
}
|
|
78
|
-
}),
|
|
79
|
-
return
|
|
80
|
-
destroy:
|
|
81
|
-
update:
|
|
86
|
+
}), g = p.getContainer || document.body, s = document.createElement("div");
|
|
87
|
+
return g.appendChild(s), m(v(C), s), {
|
|
88
|
+
destroy: c,
|
|
89
|
+
update: u,
|
|
90
|
+
open: h,
|
|
91
|
+
close: l
|
|
82
92
|
};
|
|
83
93
|
};
|
|
84
94
|
export {
|
|
85
|
-
|
|
95
|
+
T as createModal
|
|
86
96
|
};
|