@aplus-frontend/ui 0.2.7 → 0.2.9
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 +151 -147
- package/es/src/ap-field/switch/index.vue.mjs +38 -37
- package/es/src/ap-form/drawer-form/index.vue.mjs +104 -99
- package/es/src/ap-modal/utils/createModal.mjs +14 -13
- package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +53 -0
- package/es/src/business/ap-group-search/ap-group-search.vue.mjs +4 -0
- package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +191 -0
- package/es/src/business/ap-group-search/extension-select/index.vue.d.ts +355 -0
- package/es/src/business/ap-group-search/extension-select/index.vue.mjs +4 -0
- package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +124 -0
- package/es/src/business/ap-group-search/images/icon-down.vue.d.ts +3 -0
- package/es/src/business/ap-group-search/images/icon-down.vue.mjs +28 -0
- package/es/src/business/ap-group-search/images/icon-line-select.vue.d.ts +3 -0
- package/es/src/business/ap-group-search/images/icon-line-select.vue.mjs +45 -0
- package/es/src/business/ap-group-search/index.d.ts +2830 -0
- package/es/src/business/ap-group-search/index.mjs +14 -0
- package/es/src/business/ap-group-search/interface.d.ts +11 -0
- package/es/src/business/ap-group-search/interface.mjs +1 -0
- package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +357 -0
- package/es/src/business/ap-group-search/popover-select/index.vue.mjs +4 -0
- package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +192 -0
- package/es/src/business/ap-group-search/popover-select/style/css.d.ts +0 -0
- package/es/src/business/ap-group-search/popover-select/style/css.js +1 -0
- package/es/src/business/ap-group-search/popover-select/style/index.d.ts +0 -0
- package/es/src/business/ap-group-search/popover-select/style/index.js +1 -0
- package/es/src/business/ap-group-search/style/css.d.ts +0 -0
- package/es/src/business/ap-group-search/style/css.js +1 -0
- package/es/src/business/ap-group-search/style/index.d.ts +0 -0
- package/es/src/business/ap-group-search/style/index.js +1 -0
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.mjs +24 -23
- package/es/src/business/ap-table-modal/hooks/use-table-modal.mjs +17 -11
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +30 -26
- package/es/src/check-card/index.vue2.mjs +43 -43
- package/es/src/index.mjs +33 -29
- package/es/src/locale/lang/en.mjs +8 -0
- package/es/src/locale/lang/zh-cn.mjs +8 -0
- package/es/src/path-map.mjs +3 -1
- package/es/src/work-order-modal/createWorkOrder.mjs +13 -12
- package/lib/index.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +53 -0
- package/lib/src/business/ap-group-search/ap-group-search.vue.js +1 -0
- package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -0
- package/lib/src/business/ap-group-search/extension-select/index.vue.d.ts +355 -0
- package/lib/src/business/ap-group-search/extension-select/index.vue.js +1 -0
- package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -0
- package/lib/src/business/ap-group-search/images/icon-down.vue.d.ts +3 -0
- package/lib/src/business/ap-group-search/images/icon-down.vue.js +1 -0
- package/lib/src/business/ap-group-search/images/icon-line-select.vue.d.ts +3 -0
- package/lib/src/business/ap-group-search/images/icon-line-select.vue.js +1 -0
- package/lib/src/business/ap-group-search/index.d.ts +2830 -0
- package/lib/src/business/ap-group-search/index.js +1 -0
- package/lib/src/business/ap-group-search/interface.d.ts +11 -0
- package/lib/src/business/ap-group-search/interface.js +1 -0
- package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +357 -0
- package/lib/src/business/ap-group-search/popover-select/index.vue.js +1 -0
- package/lib/src/business/ap-group-search/popover-select/index.vue2.js +2 -0
- package/lib/src/business/ap-group-search/popover-select/style/css.d.ts +0 -0
- package/lib/src/business/ap-group-search/popover-select/style/css.js +1 -0
- package/lib/src/business/ap-group-search/popover-select/style/index.d.ts +0 -0
- package/lib/src/business/ap-group-search/popover-select/style/index.js +1 -0
- package/lib/src/business/ap-group-search/style/css.d.ts +0 -0
- package/lib/src/business/ap-group-search/style/css.js +1 -0
- package/lib/src/business/ap-group-search/style/index.d.ts +0 -0
- package/lib/src/business/ap-group-search/style/index.js +1 -0
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.js +1 -1
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.js +1 -1
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/check-card/index.vue2.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/path-map.js +1 -1
- package/lib/src/work-order-modal/createWorkOrder.js +1 -1
- package/package.json +6 -5
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { onUnmounted as
|
|
2
|
-
import {
|
|
1
|
+
import { onUnmounted as c } from "vue";
|
|
2
|
+
import { AsyncOpenResultError as f } from "../interface.mjs";
|
|
3
|
+
import { merge as i } from "lodash-unified";
|
|
3
4
|
import { useCreateTableModal as u } from "./use-create-table-modal.mjs";
|
|
4
|
-
function
|
|
5
|
-
const
|
|
5
|
+
function A(r) {
|
|
6
|
+
const t = i(r, {
|
|
6
7
|
...{
|
|
7
8
|
footer: null
|
|
8
9
|
},
|
|
@@ -11,20 +12,25 @@ function T(t) {
|
|
|
11
12
|
},
|
|
12
13
|
destroyOnUnmounted: !1,
|
|
13
14
|
isRenderModalTitleSuffix: !1
|
|
14
|
-
}), { destroy: o, openModal:
|
|
15
|
-
|
|
15
|
+
}), { destroy: o, openModal: l, closeModal: a, ...n } = u(t), s = async (d) => {
|
|
16
|
+
try {
|
|
17
|
+
await l([], d);
|
|
18
|
+
} catch (p) {
|
|
19
|
+
if (p !== f.ModalCancel)
|
|
20
|
+
throw Error;
|
|
21
|
+
}
|
|
16
22
|
}, e = () => {
|
|
17
|
-
|
|
23
|
+
a();
|
|
18
24
|
};
|
|
19
|
-
return
|
|
25
|
+
return c(() => {
|
|
20
26
|
e(), o();
|
|
21
27
|
}), {
|
|
22
|
-
open:
|
|
28
|
+
open: s,
|
|
23
29
|
destroy: o,
|
|
24
30
|
close: e,
|
|
25
|
-
...
|
|
31
|
+
...n
|
|
26
32
|
};
|
|
27
33
|
}
|
|
28
34
|
export {
|
|
29
|
-
|
|
35
|
+
A as useTableModal
|
|
30
36
|
};
|
|
@@ -1,41 +1,45 @@
|
|
|
1
1
|
import { default as t } from "./ap-table-modal/index.mjs";
|
|
2
2
|
import { ApAttachment as A } from "./ap-attachment/index.mjs";
|
|
3
|
-
import { ApBatchAction as
|
|
3
|
+
import { ApBatchAction as x } from "./ap-batch-action/index.mjs";
|
|
4
4
|
import { ApBatchActionGroup as f } from "./ap-batch-action-group/index.mjs";
|
|
5
5
|
import { ApButtonGroup as l } from "./ap-button-group/index.mjs";
|
|
6
|
-
import { ApCard as
|
|
6
|
+
import { ApCard as c } from "./ap-card/index.mjs";
|
|
7
7
|
import { ApExpandAlert as i } from "./ap-expand-alert/index.mjs";
|
|
8
|
-
import { ApExportGroup as
|
|
9
|
-
import { ApImage as
|
|
10
|
-
import { ApInputRadio as
|
|
11
|
-
import { ApLabel as
|
|
8
|
+
import { ApExportGroup as G } from "./ap-export-group/index.mjs";
|
|
9
|
+
import { ApImage as h } from "./ap-image/index.mjs";
|
|
10
|
+
import { ApInputRadio as b } from "./ap-input-radio/index.mjs";
|
|
11
|
+
import { ApLabel as E, ApLabelGroup as T } from "./ap-label/index.mjs";
|
|
12
12
|
import { ApLadder as I } from "./ap-ladder/index.mjs";
|
|
13
|
-
import { ApSelectLayout as
|
|
14
|
-
import { ApStatus as
|
|
15
|
-
import { ApTitle as
|
|
13
|
+
import { ApSelectLayout as v } from "./ap-select-layout/index.mjs";
|
|
14
|
+
import { ApStatus as D, ApStatusGroup as H } from "./ap-status/index.mjs";
|
|
15
|
+
import { ApTitle as P } from "./ap-title/index.mjs";
|
|
16
16
|
import "./hooks/index.mjs";
|
|
17
|
-
import { ApSummary as
|
|
18
|
-
import { ApAppendix as
|
|
19
|
-
import {
|
|
17
|
+
import { ApSummary as j } from "./ap-summary/index.mjs";
|
|
18
|
+
import { ApAppendix as q } from "./ap-appendix/index.mjs";
|
|
19
|
+
import { ApExtensionSelect as z, ApGroupSearch as F, ApPopoverSelect as J } from "./ap-group-search/index.mjs";
|
|
20
|
+
import { ApTransformDataHelper as N } from "../utils/ap-trans-data/index.mjs";
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
q as ApAppendix,
|
|
22
23
|
A as ApAttachment,
|
|
23
|
-
|
|
24
|
+
x as ApBatchAction,
|
|
24
25
|
f as ApBatchActionGroup,
|
|
25
26
|
l as ApButtonGroup,
|
|
26
|
-
|
|
27
|
+
c as ApCard,
|
|
27
28
|
i as ApExpandAlert,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
G as ApExportGroup,
|
|
30
|
+
z as ApExtensionSelect,
|
|
31
|
+
F as ApGroupSearch,
|
|
32
|
+
h as ApImage,
|
|
33
|
+
b as ApInputRadio,
|
|
34
|
+
E as ApLabel,
|
|
35
|
+
T as ApLabelGroup,
|
|
33
36
|
I as ApLadder,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
J as ApPopoverSelect,
|
|
38
|
+
v as ApSelectLayout,
|
|
39
|
+
D as ApStatus,
|
|
40
|
+
H as ApStatusGroup,
|
|
41
|
+
j as ApSummary,
|
|
38
42
|
t as ApTableModal,
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
P as ApTitle,
|
|
44
|
+
N as ApTransformDataHelper
|
|
41
45
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as I, computed as d, unref as o, createVNode as m,
|
|
2
|
-
import { Skeleton as
|
|
1
|
+
import { defineComponent as I, computed as d, unref as o, createVNode as m, Fragment as W, watch as $, watchEffect as j, openBlock as c, createElementBlock as C, normalizeStyle as D, normalizeClass as z, withModifiers as M, createBlock as f, renderSlot as O, resolveDynamicComponent as S, createCommentVNode as g, createElementVNode as U } from "vue";
|
|
2
|
+
import { Skeleton as q } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../config-provider/index.mjs";
|
|
4
4
|
import "../hooks/index.mjs";
|
|
5
|
-
import { isFunction as
|
|
6
|
-
import { useInjectCheckCard as
|
|
7
|
-
import
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
import { useControllableValue as
|
|
10
|
-
const
|
|
5
|
+
import { isFunction as B } from "lodash-unified";
|
|
6
|
+
import { useInjectCheckCard as A } from "./context.mjs";
|
|
7
|
+
import G from "./checked.svg.mjs";
|
|
8
|
+
import { useNamespace as H } from "../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { useControllableValue as J } from "../hooks/useControllableValue.mjs";
|
|
10
|
+
const K = ["src"], oe = /* @__PURE__ */ I({
|
|
11
11
|
name: "CheckCard",
|
|
12
12
|
__name: "index",
|
|
13
13
|
props: {
|
|
@@ -49,18 +49,18 @@ const J = ["src"], te = /* @__PURE__ */ I({
|
|
|
49
49
|
content: {}
|
|
50
50
|
},
|
|
51
51
|
emits: ["update:checked"],
|
|
52
|
-
setup(
|
|
53
|
-
emit:
|
|
52
|
+
setup(N, {
|
|
53
|
+
emit: P
|
|
54
54
|
}) {
|
|
55
|
-
const a =
|
|
56
|
-
b:
|
|
55
|
+
const a = N, {
|
|
56
|
+
b: V,
|
|
57
57
|
m: s,
|
|
58
58
|
e: p,
|
|
59
|
-
em:
|
|
60
|
-
} =
|
|
59
|
+
em: v
|
|
60
|
+
} = H("check-card"), _ = P, l = A(), {
|
|
61
61
|
value: r,
|
|
62
|
-
updateValue:
|
|
63
|
-
} =
|
|
62
|
+
updateValue: k
|
|
63
|
+
} = J(a, _, {
|
|
64
64
|
valuePropName: "checked",
|
|
65
65
|
defaultValuePropName: "defaultChecked"
|
|
66
66
|
}), n = d(() => {
|
|
@@ -70,27 +70,27 @@ const J = ["src"], te = /* @__PURE__ */ I({
|
|
|
70
70
|
return t && (e.disabled = e.disabled || t.disabled, e.bordered = e.bordered || t.bordered, e.loading = e.loading || t.loading, e.size = e.size || t.size, e.indicatorSize = e.indicatorSize || t.indicatorSize, e.stopPropagation = e.stopPropagation || t.stopPropagation, e.style = e.style ? e.style : t.style), e;
|
|
71
71
|
}), w = d(() => {
|
|
72
72
|
const e = o(n);
|
|
73
|
-
return [
|
|
73
|
+
return [V(), s(e.size), o(r) ? s("checked") : null, e.bordered ? s("bordered") : null, e.disabled ? s("disabled") : null];
|
|
74
74
|
}), T = d(() => {
|
|
75
75
|
const e = o(n);
|
|
76
76
|
return {
|
|
77
77
|
...e.style || {},
|
|
78
78
|
"--check-card-indicator-size": `${e.indicatorSize || 16}px`
|
|
79
79
|
};
|
|
80
|
-
}),
|
|
80
|
+
}), h = d(() => {
|
|
81
81
|
const e = a.title;
|
|
82
82
|
if (!e)
|
|
83
83
|
return;
|
|
84
|
-
const t =
|
|
84
|
+
const t = B(e) ? e(o(r)) : m(W, null, [e]);
|
|
85
85
|
return m("div", {
|
|
86
|
-
class: [p("title"), n.value.disabled ?
|
|
86
|
+
class: [p("title"), n.value.disabled ? v("title", "disabled") : null]
|
|
87
87
|
}, [t]);
|
|
88
|
-
}),
|
|
88
|
+
}), y = d(() => {
|
|
89
89
|
if (!a.content)
|
|
90
90
|
return;
|
|
91
|
-
const e =
|
|
91
|
+
const e = B(a.content) ? a.content(o(r)) : a.content;
|
|
92
92
|
return m("div", {
|
|
93
|
-
class: [p("content"), n.value.disabled ?
|
|
93
|
+
class: [p("content"), n.value.disabled ? v("content", "disabled") : null]
|
|
94
94
|
}, [e]);
|
|
95
95
|
});
|
|
96
96
|
function E(e) {
|
|
@@ -99,43 +99,43 @@ const J = ["src"], te = /* @__PURE__ */ I({
|
|
|
99
99
|
}
|
|
100
100
|
function F(e) {
|
|
101
101
|
var t, i;
|
|
102
|
-
E(e) || n.value.loading || n.value.disabled || (l.value ? (i = (t = l.value) == null ? void 0 : t.toggleOption) == null || i.call(t, a.value) :
|
|
102
|
+
E(e) || n.value.loading || n.value.disabled || (l.value ? (i = (t = l.value) == null ? void 0 : t.toggleOption) == null || i.call(t, a.value) : k(!o(r)));
|
|
103
103
|
}
|
|
104
|
-
return
|
|
104
|
+
return $(() => l.value, (e) => {
|
|
105
105
|
if (!e)
|
|
106
106
|
return;
|
|
107
107
|
const t = e.multiple ? (e.value || []).includes(a.value) : e.value === a.value;
|
|
108
|
-
|
|
108
|
+
k(t);
|
|
109
109
|
}, {
|
|
110
110
|
immediate: !0
|
|
111
|
-
}),
|
|
111
|
+
}), j((e) => {
|
|
112
112
|
var t, i;
|
|
113
113
|
(i = (t = l.value) == null ? void 0 : t.registerValue) == null || i.call(t, a.value), e(() => {
|
|
114
|
-
var u,
|
|
115
|
-
return (
|
|
114
|
+
var u, b;
|
|
115
|
+
return (b = (u = l.value) == null ? void 0 : u.cancelValue) == null ? void 0 : b.call(u, a.value);
|
|
116
116
|
});
|
|
117
|
-
}), (e, t) => (c(),
|
|
118
|
-
style:
|
|
119
|
-
class:
|
|
120
|
-
onClick:
|
|
121
|
-
}, [n.value.loading ? (c(), f(o(
|
|
117
|
+
}), (e, t) => (c(), C("div", {
|
|
118
|
+
style: D(T.value),
|
|
119
|
+
class: z(w.value),
|
|
120
|
+
onClick: M(F, ["stop"])
|
|
121
|
+
}, [n.value.loading ? (c(), f(o(q), {
|
|
122
122
|
key: 0,
|
|
123
123
|
active: ""
|
|
124
|
-
})) :
|
|
124
|
+
})) : O(e.$slots, "default", {
|
|
125
125
|
key: 1,
|
|
126
126
|
checked: o(r)
|
|
127
|
-
}, () => [
|
|
127
|
+
}, () => [h.value ? (c(), f(S(h.value), {
|
|
128
128
|
key: 0
|
|
129
|
-
})) : g("", !0),
|
|
129
|
+
})) : g("", !0), y.value ? (c(), f(S(y.value), {
|
|
130
130
|
key: 1
|
|
131
|
-
})) : g("", !0)]), o(r) ? (c(),
|
|
131
|
+
})) : g("", !0)]), o(r) ? (c(), C("div", {
|
|
132
132
|
key: 2,
|
|
133
|
-
class:
|
|
134
|
-
}, [
|
|
135
|
-
src: o(
|
|
136
|
-
}, null, 8,
|
|
133
|
+
class: z(o(p)("checked-icon"))
|
|
134
|
+
}, [U("img", {
|
|
135
|
+
src: o(G)
|
|
136
|
+
}, null, 8, K)], 2)) : g("", !0)], 6));
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
139
|
export {
|
|
140
|
-
|
|
140
|
+
oe as default
|
|
141
141
|
};
|
package/es/src/index.mjs
CHANGED
|
@@ -16,10 +16,10 @@ import "./business/index.mjs";
|
|
|
16
16
|
import { ApTable as y } from "./ap-table/index.mjs";
|
|
17
17
|
import "./editable-table/index.mjs";
|
|
18
18
|
import "./ap-descriptions/index.mjs";
|
|
19
|
-
import { ApScrollBar as
|
|
19
|
+
import { ApScrollBar as P } from "./ap-scroll-bar/index.mjs";
|
|
20
20
|
import { configProviderProps as k } from "./config-provider/config-provider-props.mjs";
|
|
21
21
|
import { configProviderContextKey as M } from "./config-provider/constants.mjs";
|
|
22
|
-
import { keysOf as v, provideGlobalConfig as
|
|
22
|
+
import { keysOf as v, provideGlobalConfig as E, useGlobalConfig as B } from "./config-provider/hooks/use-global-config.mjs";
|
|
23
23
|
import { buildLocaleContext as O, buildTranslator as W, localeContextKey as H, translate as U, useLocale as j } from "./config-provider/hooks/use-locale.mjs";
|
|
24
24
|
import { defaultNamespace as z, namespaceContextKey as J, useGetDerivedNamespace as Q, useNamespace as V } from "./config-provider/hooks/use-namespace.mjs";
|
|
25
25
|
import { ConfigProvider as Y, globalConfigCached as Z } from "./config-provider/config-provider.mjs";
|
|
@@ -38,10 +38,10 @@ import { default as go } from "./ap-form/item-group/index.vue.mjs";
|
|
|
38
38
|
import { default as So } from "./ap-form/list/index.vue.mjs";
|
|
39
39
|
import { default as Go } from "./ap-form/search-form/index.vue.mjs";
|
|
40
40
|
import { default as No } from "./ap-form/modal-form/index.vue.mjs";
|
|
41
|
-
import { default as
|
|
41
|
+
import { default as Lo } from "./ap-form/dependency/index.vue.mjs";
|
|
42
42
|
import { default as wo } from "./ap-form/set/index.vue.mjs";
|
|
43
43
|
import { default as Ro } from "./ap-form/drawer-form/index.vue.mjs";
|
|
44
|
-
import { ApFieldText as
|
|
44
|
+
import { ApFieldText as Eo } from "./ap-field/text/index.mjs";
|
|
45
45
|
import { default as Ko } from "./ap-field/checkbox/index.vue.mjs";
|
|
46
46
|
import { default as Wo } from "./ap-field/date/index.vue.mjs";
|
|
47
47
|
import { default as Uo } from "./ap-field/number/index.vue.mjs";
|
|
@@ -55,7 +55,7 @@ import { default as re } from "./ap-field/slider/index.vue.mjs";
|
|
|
55
55
|
import { default as pe } from "./ap-field/segmented/index.vue.mjs";
|
|
56
56
|
import { default as me } from "./ap-field/rate/index.vue.mjs";
|
|
57
57
|
import { default as le } from "./ap-action/item-modal/index.vue.mjs";
|
|
58
|
-
import { default as
|
|
58
|
+
import { default as de } from "./ap-action/item-popconfirm/index.vue.mjs";
|
|
59
59
|
import { default as ue } from "./ap-action/item-dropdown/index.vue.mjs";
|
|
60
60
|
import { default as ie } from "./ap-action/group/index.vue.mjs";
|
|
61
61
|
import { DictCode as ce, langMap as Fe } from "./work-order-modal/interfaces.mjs";
|
|
@@ -64,11 +64,11 @@ import { default as Ce } from "./work-order-modal/work-order-modal.vue.mjs";
|
|
|
64
64
|
import { default as De } from "./ap-tag/ap-tag.vue.mjs";
|
|
65
65
|
import { default as he } from "./ap-tag/ap-tag-group.vue.mjs";
|
|
66
66
|
import { default as ye } from "./ap-info-layout/ApInfoLayout.vue.mjs";
|
|
67
|
-
import { NeedNameKeyDefault as
|
|
67
|
+
import { NeedNameKeyDefault as Pe } from "./ap-upload/apUploadTypes.mjs";
|
|
68
68
|
import { default as ke } from "./ap-upload/apUpload.vue.mjs";
|
|
69
69
|
import { ApDownLoadNeedNameKeyDefault as Me } from "./ap-download/interface.mjs";
|
|
70
70
|
import { default as ve } from "./ap-download/ap-download.vue.mjs";
|
|
71
|
-
import { default as
|
|
71
|
+
import { default as Be } from "./check-card/group.vue.mjs";
|
|
72
72
|
import { default as Oe } from "./ap-list/index.vue.mjs";
|
|
73
73
|
import { default as He } from "./ap-button/ap-button.vue.mjs";
|
|
74
74
|
import { default as je } from "./ap-button/ap-action-button.vue.mjs";
|
|
@@ -81,7 +81,7 @@ import { ApBatchAction as er } from "./business/ap-batch-action/index.mjs";
|
|
|
81
81
|
import { ApBatchActionGroup as tr } from "./business/ap-batch-action-group/index.mjs";
|
|
82
82
|
import { ApButtonGroup as ar } from "./business/ap-button-group/index.mjs";
|
|
83
83
|
import { ApCard as fr } from "./business/ap-card/index.mjs";
|
|
84
|
-
import { ApExpandAlert as
|
|
84
|
+
import { ApExpandAlert as xr } from "./business/ap-expand-alert/index.mjs";
|
|
85
85
|
import { ApExportGroupActionType as Ar } from "./business/ap-export-group/interface.mjs";
|
|
86
86
|
import { ApExportGroup as sr } from "./business/ap-export-group/index.mjs";
|
|
87
87
|
import { handleExportDownload as nr } from "./business/ap-export-group/handleExportDownload.mjs";
|
|
@@ -91,18 +91,19 @@ import { ApLabel as Cr, ApLabelGroup as gr } from "./business/ap-label/index.mjs
|
|
|
91
91
|
import { locales as Sr } from "./business/ap-ladder/interface.mjs";
|
|
92
92
|
import { ApLadder as Gr } from "./business/ap-ladder/index.mjs";
|
|
93
93
|
import { ApSelectLayout as Nr } from "./business/ap-select-layout/index.mjs";
|
|
94
|
-
import { ApStatus as
|
|
94
|
+
import { ApStatus as Lr, ApStatusGroup as kr } from "./business/ap-status/index.mjs";
|
|
95
95
|
import { ApTitle as Mr } from "./business/ap-title/index.mjs";
|
|
96
96
|
import { usePageListApTable as vr } from "./business/hooks/usePageListApTable.mjs";
|
|
97
|
-
import { useTableRefresh as
|
|
97
|
+
import { useTableRefresh as Br } from "./business/hooks/useTableRefresh.mjs";
|
|
98
98
|
import { computedRecords as Or, flattenColumns as Wr, formatDataIndex as Hr, formatNumber as Ur } from "./business/ap-summary/utils.mjs";
|
|
99
99
|
import { ApSummary as qr } from "./business/ap-summary/index.mjs";
|
|
100
100
|
import { ApNeedNameKeyDefault as Jr } from "./business/ap-appendix/interface.mjs";
|
|
101
101
|
import { ApAppendix as Vr } from "./business/ap-appendix/index.mjs";
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import { default as
|
|
105
|
-
import { default as
|
|
102
|
+
import { ApExtensionSelect as Yr, ApGroupSearch as Zr, ApPopoverSelect as _r } from "./business/ap-group-search/index.mjs";
|
|
103
|
+
import { useTablePaging as ot } from "./ap-table/hooks/use-table-paging.mjs";
|
|
104
|
+
import { default as rt } from "./editable-table/index.vue.mjs";
|
|
105
|
+
import { default as pt } from "./editable-table/form-item.vue.mjs";
|
|
106
|
+
import { default as mt } from "./ap-descriptions/ap-descriptions.vue.mjs";
|
|
106
107
|
export {
|
|
107
108
|
u as APConfigProvider,
|
|
108
109
|
je as ApActionButton,
|
|
@@ -110,7 +111,7 @@ export {
|
|
|
110
111
|
C as ApActionItem,
|
|
111
112
|
ue as ApActionItemDropdown,
|
|
112
113
|
le as ApActionItemModal,
|
|
113
|
-
|
|
114
|
+
de as ApActionItemPopconfirm,
|
|
114
115
|
Vr as ApAppendix,
|
|
115
116
|
$e as ApAttachment,
|
|
116
117
|
er as ApBatchAction,
|
|
@@ -118,12 +119,13 @@ export {
|
|
|
118
119
|
He as ApButton,
|
|
119
120
|
ar as ApButtonGroup,
|
|
120
121
|
fr as ApCard,
|
|
121
|
-
|
|
122
|
+
mt as ApDescriptions,
|
|
122
123
|
Me as ApDownLoadNeedNameKeyDefault,
|
|
123
124
|
ve as ApDownload,
|
|
124
|
-
|
|
125
|
+
xr as ApExpandAlert,
|
|
125
126
|
sr as ApExportGroup,
|
|
126
127
|
Ar as ApExportGroupActionType,
|
|
128
|
+
Yr as ApExtensionSelect,
|
|
127
129
|
c as ApField,
|
|
128
130
|
Ko as ApFieldCheckbox,
|
|
129
131
|
Wo as ApFieldDate,
|
|
@@ -136,10 +138,10 @@ export {
|
|
|
136
138
|
_o as ApFieldSelect,
|
|
137
139
|
re as ApFieldSlider,
|
|
138
140
|
Jo as ApFieldSwitch,
|
|
139
|
-
|
|
141
|
+
Eo as ApFieldText,
|
|
140
142
|
Vo as ApFieldTextArea,
|
|
141
143
|
i as ApForm,
|
|
142
|
-
|
|
144
|
+
Lo as ApFormDependency,
|
|
143
145
|
Ro as ApFormDrawerForm,
|
|
144
146
|
Io as ApFormItem,
|
|
145
147
|
co as ApFormItemCheckbox,
|
|
@@ -157,6 +159,7 @@ export {
|
|
|
157
159
|
No as ApFormModalForm,
|
|
158
160
|
Go as ApFormSearchForm,
|
|
159
161
|
wo as ApFormSet,
|
|
162
|
+
Zr as ApGroupSearch,
|
|
160
163
|
Fr as ApImage,
|
|
161
164
|
ye as ApInfoLayout,
|
|
162
165
|
Tr as ApInputRadio,
|
|
@@ -166,9 +169,10 @@ export {
|
|
|
166
169
|
Oe as ApList,
|
|
167
170
|
h as ApModal,
|
|
168
171
|
Jr as ApNeedNameKeyDefault,
|
|
169
|
-
|
|
172
|
+
_r as ApPopoverSelect,
|
|
173
|
+
P as ApScrollBar,
|
|
170
174
|
Nr as ApSelectLayout,
|
|
171
|
-
|
|
175
|
+
Lr as ApStatus,
|
|
172
176
|
kr as ApStatusGroup,
|
|
173
177
|
qr as ApSummary,
|
|
174
178
|
y as ApTable,
|
|
@@ -179,12 +183,12 @@ export {
|
|
|
179
183
|
ze as ApTransformDataHelper,
|
|
180
184
|
ke as ApUpload,
|
|
181
185
|
D as CheckCard,
|
|
182
|
-
|
|
186
|
+
Be as CheckCardGroup,
|
|
183
187
|
Y as ConfigProvider,
|
|
184
188
|
ce as DictCode,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
189
|
+
rt as EditableTable,
|
|
190
|
+
pt as EditableTableFormItem,
|
|
191
|
+
Pe as NeedNameKeyDefault,
|
|
188
192
|
Ce as WorkOrderModal,
|
|
189
193
|
b as adminToken,
|
|
190
194
|
T as aplusToken,
|
|
@@ -205,15 +209,15 @@ export {
|
|
|
205
209
|
H as localeContextKey,
|
|
206
210
|
Sr as locales,
|
|
207
211
|
J as namespaceContextKey,
|
|
208
|
-
|
|
212
|
+
E as provideGlobalConfig,
|
|
209
213
|
U as translate,
|
|
210
214
|
Q as useGetDerivedNamespace,
|
|
211
|
-
|
|
215
|
+
B as useGlobalConfig,
|
|
212
216
|
j as useLocale,
|
|
213
217
|
V as useNamespace,
|
|
214
218
|
vr as usePageListApTable,
|
|
215
219
|
Xe as useTableModal,
|
|
216
|
-
|
|
217
|
-
|
|
220
|
+
ot as useTablePaging,
|
|
221
|
+
Br as useTableRefresh,
|
|
218
222
|
Ze as useTableSelectModal
|
|
219
223
|
};
|
|
@@ -118,6 +118,14 @@ const e = {
|
|
|
118
118
|
downloadAll: "Download All",
|
|
119
119
|
downloadFile: "Download file",
|
|
120
120
|
appendix: "Appendix"
|
|
121
|
+
},
|
|
122
|
+
apGroupSearch: {
|
|
123
|
+
defaultPlaceholder: "Please input",
|
|
124
|
+
all: "All",
|
|
125
|
+
close: "Close",
|
|
126
|
+
clear: "Clear",
|
|
127
|
+
confirm: "Confirm",
|
|
128
|
+
tokenSeparatorsPlaceholder: "Supports batch input and can be separated by commas and newline symbols"
|
|
121
129
|
}
|
|
122
130
|
}
|
|
123
131
|
};
|
|
@@ -127,6 +127,14 @@ const e = {
|
|
|
127
127
|
downloadAll: "下载全部",
|
|
128
128
|
downloadFile: "下载文件",
|
|
129
129
|
appendix: "附件"
|
|
130
|
+
},
|
|
131
|
+
apGroupSearch: {
|
|
132
|
+
defaultPlaceholder: "请输入",
|
|
133
|
+
all: "全部",
|
|
134
|
+
close: "关闭",
|
|
135
|
+
clear: "清空",
|
|
136
|
+
confirm: "确定",
|
|
137
|
+
tokenSeparatorsPlaceholder: "支持批量输入,可用逗号、换行符号分割"
|
|
130
138
|
}
|
|
131
139
|
}
|
|
132
140
|
};
|
package/es/src/path-map.mjs
CHANGED
|
@@ -76,7 +76,9 @@ const e = {
|
|
|
76
76
|
ApTitle: ["business", "ap-title"],
|
|
77
77
|
ApSummary: ["business", "ap-summary"],
|
|
78
78
|
ApScrollBar: ["ap-scroll-bar"],
|
|
79
|
-
ApAppendix: ["business", "ap-appendix"]
|
|
79
|
+
ApAppendix: ["business", "ap-appendix"],
|
|
80
|
+
ApGroupSearch: ["business", "ap-group-search"],
|
|
81
|
+
ApPopoverSelect: ["business", "ap-group-search", "popover-select"]
|
|
80
82
|
};
|
|
81
83
|
export {
|
|
82
84
|
e as default
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as m, createVNode as n, render as r, h as i } from "vue";
|
|
2
2
|
import "./work-order-modal.vue2.mjs";
|
|
3
3
|
import "../config-provider/index.mjs";
|
|
4
|
-
import { ConfigProvider as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
|
|
4
|
+
import { ConfigProvider as c, globalConfigCached as p } from "../config-provider/config-provider.mjs";
|
|
5
|
+
import s from "./work-order-modal.vue.mjs";
|
|
6
|
+
function b(t, d) {
|
|
7
|
+
const a = document.getElementsByTagName("body")[0], e = document.createElement("div");
|
|
8
|
+
a.appendChild(e), r(i(/* @__PURE__ */ m({
|
|
9
9
|
render() {
|
|
10
|
-
return
|
|
11
|
-
default: () => [
|
|
10
|
+
return n(c, p.value, {
|
|
11
|
+
default: () => [n(s, {
|
|
12
12
|
api: t,
|
|
13
13
|
getOssAccess: d,
|
|
14
|
-
onModalClose:
|
|
14
|
+
onModalClose: l,
|
|
15
15
|
open: !0
|
|
16
16
|
}, null)]
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
})), e);
|
|
20
|
-
function
|
|
20
|
+
function l() {
|
|
21
21
|
setTimeout(() => {
|
|
22
|
-
|
|
22
|
+
var o;
|
|
23
|
+
r(null, e), (o = e.parentElement) == null || o.removeChild(e);
|
|
23
24
|
}, 500);
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
+
b as createWorkOrderModal
|
|
28
29
|
};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("./src/index.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("./src/index.js"),A=require("./src/path-map.js");require("./src/hooks/index.js");const v=require("./src/config-provider/config-provider-props.js"),q=require("./src/config-provider/constants.js"),u=require("./src/config-provider/hooks/use-global-config.js"),e=require("./src/config-provider/hooks/use-locale.js"),t=require("./src/config-provider/hooks/use-namespace.js"),a=require("./src/config-provider/config-provider.js"),f=require("./src/config-provider/index.js"),x=require("./src/ap-form/items/text/index.js"),g=require("./src/ap-form/items/text-area/index.vue.js"),m=require("./src/ap-form/items/number/index.vue.js"),y=require("./src/ap-form/items/date/index.vue.js"),$=require("./src/ap-form/items/date-range/index.vue.js"),b=require("./src/ap-form/items/radio/index.vue.js"),T=require("./src/ap-form/items/select/index.vue.js"),F=require("./src/ap-form/items/switch/index.vue.js"),C=require("./src/ap-form/items/checkbox/index.vue.js"),D=require("./src/ap-form/items/text/password.vue.js"),S=require("./src/ap-form/index.js"),h=require("./src/ap-form/item/index.vue.js"),I=require("./src/ap-form/item-group/index.vue.js"),P=require("./src/ap-form/list/index.vue.js"),G=require("./src/ap-form/search-form/index.vue.js"),M=require("./src/ap-form/modal-form/index.vue.js"),N=require("./src/ap-form/dependency/index.vue.js"),L=require("./src/ap-form/set/index.vue.js"),k=require("./src/ap-form/drawer-form/index.vue.js"),w=require("./src/ap-field/index.js"),E=require("./src/ap-field/text/index.js"),B=require("./src/ap-field/checkbox/index.vue.js"),K=require("./src/ap-field/date/index.vue.js"),R=require("./src/ap-field/number/index.vue.js"),O=require("./src/ap-field/radio/index.vue.js"),W=require("./src/ap-field/switch/index.vue.js"),j=require("./src/ap-field/text-area/index.vue.js"),U=require("./src/ap-field/date-range/index.vue.js"),V=require("./src/ap-field/select/index.vue.js"),H=require("./src/ap-field/text/password.vue.js"),z=require("./src/ap-field/slider/index.vue.js"),J=require("./src/ap-field/segmented/index.vue.js"),Q=require("./src/ap-field/rate/index.vue.js"),_=require("./src/design-token/index.js"),X=require("./src/ap-action/index.js"),Y=require("./src/ap-action/item-modal/index.vue.js"),Z=require("./src/ap-action/item-popconfirm/index.vue.js"),ee=require("./src/ap-action/item-dropdown/index.vue.js"),te=require("./src/ap-action/group/index.vue.js"),i=require("./src/work-order-modal/interfaces.js"),re=require("./src/work-order-modal/createWorkOrder.js"),ue=require("./src/work-order-modal/work-order-modal.vue.js"),pe=require("./src/ap-tag/ap-tag.vue.js"),oe=require("./src/ap-tag/ap-tag-group.vue.js"),ne=require("./src/ap-info-layout/ApInfoLayout.vue.js"),ae=require("./src/ap-upload/apUploadTypes.js"),_e=require("./src/ap-upload/apUpload.vue.js"),ie=require("./src/ap-download/interface.js"),se=require("./src/ap-download/ap-download.vue.js"),le=require("./src/check-card/index.js"),ce=require("./src/check-card/group.vue.js"),de=require("./src/ap-modal/index.js"),Ae=require("./src/ap-list/index.vue.js"),ve=require("./src/ap-button/ap-button.vue.js"),qe=require("./src/ap-button/ap-action-button.vue.js"),fe=require("./src/utils/ap-trans-data/index.js"),xe=require("./src/business/ap-table-modal/index.js"),ge=require("./src/business/ap-table-modal/hooks/use-table-modal.js"),me=require("./src/business/ap-table-modal/hooks/use-table-select-modal.js"),ye=require("./src/business/ap-attachment/index.js"),$e=require("./src/business/ap-batch-action/index.js"),be=require("./src/business/ap-batch-action-group/index.js"),Te=require("./src/business/ap-button-group/index.js"),Fe=require("./src/business/ap-card/index.js"),Ce=require("./src/business/ap-expand-alert/index.js"),De=require("./src/business/ap-export-group/interface.js"),Se=require("./src/business/ap-export-group/index.js"),he=require("./src/business/ap-export-group/handleExportDownload.js"),Ie=require("./src/business/ap-image/index.js"),Pe=require("./src/business/ap-input-radio/index.js"),s=require("./src/business/ap-label/index.js"),Ge=require("./src/business/ap-ladder/interface.js"),Me=require("./src/business/ap-ladder/index.js"),Ne=require("./src/business/ap-select-layout/index.js"),l=require("./src/business/ap-status/index.js"),Le=require("./src/business/ap-title/index.js"),ke=require("./src/business/hooks/usePageListApTable.js"),we=require("./src/business/hooks/useTableRefresh.js"),r=require("./src/business/ap-summary/utils.js"),Ee=require("./src/business/ap-summary/index.js"),Be=require("./src/business/ap-appendix/interface.js"),Ke=require("./src/business/ap-appendix/index.js"),p=require("./src/business/ap-group-search/index.js"),Re=require("./src/ap-table/hooks/use-table-paging.js"),Oe=require("./src/ap-table/index.js"),We=require("./src/editable-table/index.vue.js"),je=require("./src/editable-table/form-item.vue.js"),Ue=require("./src/ap-descriptions/ap-descriptions.vue.js"),Ve=require("./src/ap-scroll-bar/index.js"),He=require("./src/hooks/useMessage.js"),ze=require("./src/hooks/useControllableValue.js"),Je={install:c=>{for(const d in n){const o=n[d];o.install&&c.use(o)}}};exports.pathMap=A.default;exports.configProviderProps=v.configProviderProps;exports.configProviderContextKey=q.configProviderContextKey;exports.keysOf=u.keysOf;exports.provideGlobalConfig=u.provideGlobalConfig;exports.useGlobalConfig=u.useGlobalConfig;exports.buildLocaleContext=e.buildLocaleContext;exports.buildTranslator=e.buildTranslator;exports.localeContextKey=e.localeContextKey;exports.translate=e.translate;exports.useLocale=e.useLocale;exports.defaultNamespace=t.defaultNamespace;exports.namespaceContextKey=t.namespaceContextKey;exports.useGetDerivedNamespace=t.useGetDerivedNamespace;exports.useNamespace=t.useNamespace;exports.ConfigProvider=a.ConfigProvider;exports.globalConfigCached=a.globalConfigCached;exports.APConfigProvider=f.APConfigProvider;exports.ApFormItemText=x.ApFormItemText;exports.ApFormItemTextArea=g.default;exports.ApFormItemNumber=m.default;exports.ApFormItemDate=y.default;exports.ApFormItemDateRange=$.default;exports.ApFormItemRadio=b.default;exports.ApFormItemSelect=T.default;exports.ApFormItemSwitch=F.default;exports.ApFormItemCheckbox=C.default;exports.ApFormItemTextPassword=D.default;exports.ApForm=S.ApForm;exports.ApFormItem=h.default;exports.ApFormItemGroup=I.default;exports.ApFormList=P.default;exports.ApFormSearchForm=G.default;exports.ApFormModalForm=M.default;exports.ApFormDependency=N.default;exports.ApFormSet=L.default;exports.ApFormDrawerForm=k.default;exports.ApField=w.ApField;exports.ApFieldText=E.ApFieldText;exports.ApFieldCheckbox=B.default;exports.ApFieldDate=K.default;exports.ApFieldNumber=R.default;exports.ApFieldRadio=O.default;exports.ApFieldSwitch=W.default;exports.ApFieldTextArea=j.default;exports.ApFieldDateRange=U.default;exports.ApFieldSelect=V.default;exports.ApFieldPassword=H.default;exports.ApFieldSlider=z.default;exports.ApFieldSegmented=J.default;exports.ApFieldRate=Q.default;exports.adminToken=_.adminToken;exports.aplusToken=_.aplusToken;exports.ApActionItem=X.ApActionItem;exports.ApActionItemModal=Y.default;exports.ApActionItemPopconfirm=Z.default;exports.ApActionItemDropdown=ee.default;exports.ApActionGroup=te.default;exports.DictCode=i.DictCode;exports.langMap=i.langMap;exports.createWorkOrderModal=re.createWorkOrderModal;exports.WorkOrderModal=ue.default;exports.ApTag=pe.default;exports.ApTagGroup=oe.default;exports.ApInfoLayout=ne.default;exports.NeedNameKeyDefault=ae.NeedNameKeyDefault;exports.ApUpload=_e.default;exports.ApDownLoadNeedNameKeyDefault=ie.ApDownLoadNeedNameKeyDefault;exports.ApDownload=se.default;exports.CheckCard=le.CheckCard;exports.CheckCardGroup=ce.default;exports.ApModal=de.ApModal;exports.ApList=Ae.default;exports.ApButton=ve.default;exports.ApActionButton=qe.default;exports.ApTransformDataHelper=fe.ApTransformDataHelper;exports.ApTableModal=xe.default;exports.useTableModal=ge.useTableModal;exports.useTableSelectModal=me.useTableSelectModal;exports.ApAttachment=ye.ApAttachment;exports.ApBatchAction=$e.ApBatchAction;exports.ApBatchActionGroup=be.ApBatchActionGroup;exports.ApButtonGroup=Te.ApButtonGroup;exports.ApCard=Fe.ApCard;exports.ApExpandAlert=Ce.ApExpandAlert;exports.ApExportGroupActionType=De.ApExportGroupActionType;exports.ApExportGroup=Se.ApExportGroup;exports.handleExportDownload=he.handleExportDownload;exports.ApImage=Ie.ApImage;exports.ApInputRadio=Pe.ApInputRadio;exports.ApLabel=s.ApLabel;exports.ApLabelGroup=s.ApLabelGroup;exports.locales=Ge.locales;exports.ApLadder=Me.ApLadder;exports.ApSelectLayout=Ne.ApSelectLayout;exports.ApStatus=l.ApStatus;exports.ApStatusGroup=l.ApStatusGroup;exports.ApTitle=Le.ApTitle;exports.usePageListApTable=ke.usePageListApTable;exports.useTableRefresh=we.useTableRefresh;exports.computedRecords=r.computedRecords;exports.flattenColumns=r.flattenColumns;exports.formatDataIndex=r.formatDataIndex;exports.formatNumber=r.formatNumber;exports.ApSummary=Ee.ApSummary;exports.ApNeedNameKeyDefault=Be.ApNeedNameKeyDefault;exports.ApAppendix=Ke.ApAppendix;exports.ApExtensionSelect=p.ApExtensionSelect;exports.ApGroupSearch=p.ApGroupSearch;exports.ApPopoverSelect=p.ApPopoverSelect;exports.useTablePaging=Re.useTablePaging;exports.ApTable=Oe.ApTable;exports.EditableTable=We.default;exports.EditableTableFormItem=je.default;exports.ApDescriptions=Ue.default;exports.ApScrollBar=Ve.ApScrollBar;exports.useMessage=He.useMessage;exports.useControllableValue=ze.useControllableValue;exports.default=Je;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("@aplus-frontend/antdv");require("../../hooks/index.js");const s=require("lodash-unified"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("@aplus-frontend/antdv");require("../../hooks/index.js");const s=require("lodash-unified"),i=require("@fruits-chain/utils"),V=require("../../hooks/useControllableValue.js"),B=e.defineComponent({name:"ApFieldSwitch",__name:"index",props:{mode:{},class:{},style:{},id:{},prefixCls:{},size:{default:"default"},disabled:{type:Boolean},checkedChildren:{},unCheckedChildren:{},tabindex:{},autofocus:{type:Boolean},loading:{type:Boolean,default:void 0},checked:{},checkedValue:{default:!0},unCheckedValue:{default:!1},onChange:{},onKeydown:{},onMouseup:{},"onUpdate:checked":{},onBlur:{},onFocus:{},emptyText:{default:"--"},onAction:{},confirm:{}},emits:["update:checked"],setup(m,{emit:p}){const r=e.useSlots(),n=m,C=p,{value:c,updateValue:a}=V.useControllableValue(n,C,{valuePropName:"checked"}),u=e.ref(!1);async function k(o,d){if(!i.isDef(n.confirm)){if(!i.isDef(n.onAction)){a(o);return}u.value=!0;try{await n.onAction(o,d)&&a(o)}finally{u.value=!1}}}async function g(){const o=e.unref(c)===n.checkedValue?n.unCheckedValue:n.checkedValue;if(!i.isDef(n.onAction)){a(o);return}await n.onAction(o)&&a(o)}const y=e.computed(()=>{var l,t;const o=e.unref(c);return s.isNil(o)?e.createVNode(e.Fragment,null,[n.emptyText]):o===n.checkedValue?e.createVNode(e.Fragment,null,[n.checkedChildren||((l=r.checkedChildren)==null?void 0:l.call(r))||`${n.checkedValue}`]):e.createVNode(e.Fragment,null,[n.unCheckedChildren||((t=r.unCheckedChildren)==null?void 0:t.call(r))||`${n.unCheckedValue}`])}),v=e.computed(()=>i.isDef(n.confirm)?s.isFunction(n.confirm)?n.confirm(e.unref(c)):n.confirm:{});return(o,d)=>o.mode==="read"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.value),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[!e.unref(i.isDef)(o.confirm)||o.disabled?(e.openBlock(),e.createBlock(e.unref(h.Switch),e.mergeProps({key:0},e.unref(s.omit)(n,"onUpdate:checked"),{checked:e.unref(c),onClick:k,loading:o.loading??u.value}),e.createSlots({_:2},[e.renderList(r,(l,t)=>({name:t,fn:e.withCtx(f=>[e.renderSlot(o.$slots,t,e.normalizeProps(e.guardReactiveProps(f||{})))])}))]),1040,["checked","loading"])):(e.openBlock(),e.createBlock(e.unref(h.Popconfirm),e.mergeProps({key:1,disabled:u.value},v.value,{onConfirm:g}),{default:e.withCtx(()=>[e.createVNode(e.unref(h.Switch),e.mergeProps(e.unref(s.omit)(n,"onUpdate:checked"),{checked:e.unref(c),onClick:k,loading:o.loading??u.value}),e.createSlots({_:2},[e.renderList(r,(l,t)=>({name:t,fn:e.withCtx(f=>[e.renderSlot(o.$slots,t,e.normalizeProps(e.guardReactiveProps(f||{})))])}))]),1040,["checked","loading"])]),_:3},16,["disabled"]))],64))}});exports.default=B;
|