@done-coding/admin-core 0.0.1-alpha.0 → 0.0.1-alpha.2
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/components/display/TabsMain.vue.mjs +61 -0
- package/es/components/display/TabsMain.vue2.mjs +4 -0
- package/es/components/display/index.mjs +9 -7
- package/es/components/form/FormDateTimeRange.vue.mjs +46 -0
- package/es/components/form/FormDateTimeRange.vue2.mjs +4 -0
- package/es/components/form/FormMain.vue.mjs +65 -61
- package/es/components/form/FormRadio.vue.mjs +69 -0
- package/es/components/form/FormRadio.vue2.mjs +4 -0
- package/es/components/form/FormSearch.vue2.mjs +24 -23
- package/es/components/form/index.mjs +29 -23
- package/es/components/list-page/ListPage.vue.mjs +1 -1
- package/es/components/list-page/ListPage.vue2.mjs +107 -95
- package/es/components/misc/AutoRefresh.vue.mjs +7 -0
- package/es/components/misc/AutoRefresh.vue2.mjs +57 -0
- package/es/components/misc/index.mjs +7 -5
- package/es/components/modal/DetailModal.vue.mjs +31 -29
- package/es/components/table/TableMain.vue.mjs +2 -2
- package/es/components/table/TableMain.vue2.mjs +159 -118
- package/es/components/table/TableToolbar.vue.mjs +7 -0
- package/es/components/table/TableToolbar.vue2.mjs +75 -0
- package/es/config/route.mjs +3 -2
- package/es/helpers/list-helper.mjs +66 -0
- package/es/hooks/timeout.mjs +21 -0
- package/es/index.mjs +88 -73
- package/es/style.css +1 -1
- package/package.json +3 -3
- package/types/components/display/TabsMain.vue.d.ts +52 -0
- package/types/components/display/index.d.ts +2 -1
- package/types/components/form/FormDateTimeRange.vue.d.ts +18 -0
- package/types/components/form/FormMain.vue.d.ts +3 -0
- package/types/components/form/FormRadio.vue.d.ts +35 -0
- package/types/components/form/FormSearch.vue.d.ts +1 -1
- package/types/components/form/FormSelect.vue.d.ts +2 -6
- package/types/components/form/index.d.ts +3 -1
- package/types/components/form/types.d.ts +13 -0
- package/types/components/list-page/ListPage.vue.d.ts +18 -2
- package/types/components/misc/AutoRefresh.vue.d.ts +14 -0
- package/types/components/misc/index.d.ts +2 -1
- package/types/components/modal/ConfirmModal.vue.d.ts +1 -1
- package/types/components/modal/types.d.ts +2 -0
- package/types/components/table/TableMain.vue.d.ts +13 -1
- package/types/components/table/TableToolbar.vue.d.ts +43 -0
- package/types/components/table/types.d.ts +22 -2
- package/types/config/route.d.ts +2 -0
- package/types/helpers/index.d.ts +2 -0
- package/types/helpers/list-helper.d.ts +36 -0
- package/types/helpers/types.d.ts +15 -0
- package/types/hooks/index.d.ts +1 -0
- package/types/hooks/timeout.d.ts +7 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ElTabs as v, ElTabPane as b } from "element-plus/es";
|
|
2
|
+
import "element-plus/es/components/base/style/css";
|
|
3
|
+
import "element-plus/es/components/tabs/style/css";
|
|
4
|
+
import "element-plus/es/components/tab-pane/style/css";
|
|
5
|
+
import { defineComponent as y, useModel as V, computed as _, openBlock as n, createBlock as m, isRef as B, unref as i, withCtx as d, createElementBlock as M, Fragment as T, renderList as g, renderSlot as k, mergeModels as R } from "vue";
|
|
6
|
+
import { useRouter as E } from "vue-router";
|
|
7
|
+
import { TabsMainReplaceQueryKey as Q } from "../../config/route.mjs";
|
|
8
|
+
const F = /* @__PURE__ */ y({
|
|
9
|
+
__name: "TabsMain",
|
|
10
|
+
props: /* @__PURE__ */ R({
|
|
11
|
+
list: {},
|
|
12
|
+
replaceQuery: { type: Boolean, default: !1 },
|
|
13
|
+
notNull: { type: Boolean, default: !0 }
|
|
14
|
+
}, {
|
|
15
|
+
modelValue: {},
|
|
16
|
+
modelModifiers: {}
|
|
17
|
+
}),
|
|
18
|
+
emits: ["update:modelValue"],
|
|
19
|
+
setup(a) {
|
|
20
|
+
const t = a, o = V(a, "modelValue"), s = E(), c = (e) => e === void 0 || e === "" ? !1 : t.list.some((u) => u.value === e), r = _({
|
|
21
|
+
get() {
|
|
22
|
+
return c(o.value) ? o.value : t.notNull && t.list.length > 0 ? t.list[0].value : o.value;
|
|
23
|
+
},
|
|
24
|
+
set(e) {
|
|
25
|
+
o.value = e, t.replaceQuery && s.replace({
|
|
26
|
+
query: {
|
|
27
|
+
...s.currentRoute.value.query,
|
|
28
|
+
[Q]: e
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return (e, u) => {
|
|
34
|
+
const p = b, f = v;
|
|
35
|
+
return n(), m(f, {
|
|
36
|
+
modelValue: i(r),
|
|
37
|
+
"onUpdate:modelValue": u[0] || (u[0] = (l) => B(r) ? r.value = l : null)
|
|
38
|
+
}, {
|
|
39
|
+
default: d(() => [
|
|
40
|
+
(n(!0), M(T, null, g(a.list, (l) => (n(), m(p, {
|
|
41
|
+
key: l.value,
|
|
42
|
+
label: l.title,
|
|
43
|
+
name: l.value
|
|
44
|
+
}, {
|
|
45
|
+
default: d(() => [
|
|
46
|
+
k(e.$slots, `content-${l.value}`, {
|
|
47
|
+
item: l,
|
|
48
|
+
currentValue: i(r)
|
|
49
|
+
})
|
|
50
|
+
]),
|
|
51
|
+
_: 2
|
|
52
|
+
}, 1032, ["label", "name"]))), 128))
|
|
53
|
+
]),
|
|
54
|
+
_: 3
|
|
55
|
+
}, 8, ["modelValue"]);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
F as default
|
|
61
|
+
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import t from "./WatchSize.vue.mjs";
|
|
2
|
+
import o from "./TabsMain.vue.mjs";
|
|
3
|
+
const i = { WatchSize: t, TabsMain: o }, m = {
|
|
4
|
+
install(a) {
|
|
5
|
+
Object.entries(i).forEach(([n, s]) => {
|
|
6
|
+
a.component(n, s);
|
|
6
7
|
});
|
|
7
8
|
}
|
|
8
9
|
};
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
o as TabsMain,
|
|
12
|
+
t as WatchSize,
|
|
13
|
+
m as displayInstall
|
|
12
14
|
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ElDatePicker as d, ElButton as c } from "element-plus/es";
|
|
2
|
+
import "element-plus/es/components/base/style/css";
|
|
3
|
+
import "element-plus/es/components/button/style/css";
|
|
4
|
+
import "element-plus/es/components/date-picker/style/css";
|
|
5
|
+
import { defineComponent as p, useModel as f, useAttrs as k, openBlock as o, createElementBlock as r, createVNode as V, mergeProps as _, unref as g, Fragment as y, renderList as B, createBlock as C, withCtx as D, createTextVNode as E, toDisplayString as v, mergeModels as w } from "vue";
|
|
6
|
+
const x = { class: "form-date-time-range" }, N = /* @__PURE__ */ p({
|
|
7
|
+
name: "FormDateTimeRange",
|
|
8
|
+
inheritAttrs: !1,
|
|
9
|
+
__name: "FormDateTimeRange",
|
|
10
|
+
props: /* @__PURE__ */ w({
|
|
11
|
+
swiftOptions: { default: () => [] }
|
|
12
|
+
}, {
|
|
13
|
+
modelValue: { default: null },
|
|
14
|
+
modelModifiers: {}
|
|
15
|
+
}),
|
|
16
|
+
emits: ["update:modelValue"],
|
|
17
|
+
setup(l) {
|
|
18
|
+
const t = f(l, "modelValue"), m = k(), i = (n) => {
|
|
19
|
+
t.value = n.set();
|
|
20
|
+
};
|
|
21
|
+
return (n, a) => {
|
|
22
|
+
const s = d, u = c;
|
|
23
|
+
return o(), r("span", x, [
|
|
24
|
+
V(s, _({
|
|
25
|
+
modelValue: t.value,
|
|
26
|
+
"onUpdate:modelValue": a[0] || (a[0] = (e) => t.value = e),
|
|
27
|
+
type: "datetimerange"
|
|
28
|
+
}, g(m)), null, 16, ["modelValue"]),
|
|
29
|
+
(o(!0), r(y, null, B(l.swiftOptions, (e) => (o(), C(u, {
|
|
30
|
+
key: e.key,
|
|
31
|
+
type: "primary",
|
|
32
|
+
link: "",
|
|
33
|
+
onClick: (h) => i(e)
|
|
34
|
+
}, {
|
|
35
|
+
default: D(() => [
|
|
36
|
+
E(v(e.key), 1)
|
|
37
|
+
]),
|
|
38
|
+
_: 2
|
|
39
|
+
}, 1032, ["onClick"]))), 128))
|
|
40
|
+
]);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
N as default
|
|
46
|
+
};
|
|
@@ -1,94 +1,98 @@
|
|
|
1
|
-
import { ElForm as
|
|
1
|
+
import { ElForm as M, ElRow as A, ElCol as B } from "element-plus/es";
|
|
2
2
|
import "element-plus/es/components/base/style/css";
|
|
3
3
|
import "element-plus/es/components/form/style/css";
|
|
4
4
|
import "element-plus/es/components/row/style/css";
|
|
5
5
|
import "element-plus/es/components/col/style/css";
|
|
6
|
-
import { defineComponent as
|
|
6
|
+
import { defineComponent as H, shallowRef as N, ref as _, computed as i, provide as P, watch as h, openBlock as p, createBlock as L, unref as y, withCtx as m, createVNode as O, createElementBlock as D, Fragment as T, renderList as q, withDirectives as z, mergeProps as V, renderSlot as j, vShow as J } from "vue";
|
|
7
7
|
import Q from "./FormItem.vue.mjs";
|
|
8
8
|
import { FORM_ITEM_CHANGE_LOADING as U } from "./utils.mjs";
|
|
9
|
-
const ue = /* @__PURE__ */
|
|
9
|
+
const ue = /* @__PURE__ */ H({
|
|
10
10
|
name: "FormMain",
|
|
11
11
|
inheritAttrs: !0,
|
|
12
12
|
__name: "FormMain",
|
|
13
13
|
props: {
|
|
14
14
|
list: {},
|
|
15
15
|
data: {},
|
|
16
|
-
layout: {}
|
|
16
|
+
layout: {},
|
|
17
|
+
rowGutter: { default: 0 }
|
|
17
18
|
},
|
|
18
19
|
emits: ["loadingChange", "visibleChange", "submit"],
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
(e) =>
|
|
22
|
-
)), R = i(() =>
|
|
23
|
-
|
|
20
|
+
setup(f, { expose: S, emit: x }) {
|
|
21
|
+
const d = f, v = x, a = N(), c = _([]), u = _({}), b = i(() => !!c.value.length), w = i(() => Object.keys(u.value).filter(
|
|
22
|
+
(e) => u.value[e]
|
|
23
|
+
)), R = i(() => d.list.filter((e) => !w.value.includes(e.key))), $ = i(() => R.value.length > 0), G = (e) => e;
|
|
24
|
+
S({
|
|
24
25
|
validate: () => a.value ? new Promise((e, t) => {
|
|
25
|
-
var
|
|
26
|
-
(
|
|
27
|
-
if (
|
|
26
|
+
var l;
|
|
27
|
+
(l = a.value) == null || l.validate((r, s) => {
|
|
28
|
+
if (r)
|
|
28
29
|
e();
|
|
29
30
|
else {
|
|
30
|
-
const
|
|
31
|
-
Object.keys(
|
|
31
|
+
const o = { ...s || {} };
|
|
32
|
+
Object.keys(o).forEach((n) => {
|
|
32
33
|
var C;
|
|
33
|
-
|
|
34
|
-
}), Object.keys(
|
|
34
|
+
w.value.includes(n) && (console.log(`当前${n}被隐藏,移除校验`, o[n]), delete o[n], (C = a.value) == null || C.clearValidate(n));
|
|
35
|
+
}), Object.keys(o).length === 0 ? e() : t(s);
|
|
35
36
|
}
|
|
36
37
|
});
|
|
37
38
|
}) : Promise.reject(new Error("实例化未完成")),
|
|
38
39
|
resetFields: () => a.value ? a.value.resetFields() : console.error("实例化未完成"),
|
|
39
40
|
clearValidate: (e) => a.value ? a.value.clearValidate(e) : console.error("实例化未完成")
|
|
40
41
|
});
|
|
41
|
-
const g = i(() =>
|
|
42
|
-
data:
|
|
42
|
+
const g = i(() => d.list), k = i(() => g.value.reduce((e, t) => (t.rules && (typeof t.rules == "function" ? e[t.key] = t.rules({
|
|
43
|
+
data: d.data,
|
|
43
44
|
config: t
|
|
44
|
-
}) : e[t.key] = t.rules), e), {})),
|
|
45
|
+
}) : e[t.key] = t.rules), e), {})), F = i(() => c.value.reduce(
|
|
45
46
|
(e, t) => (e[t.key] = [
|
|
46
47
|
{
|
|
47
48
|
validator: () => [new Error(`${t.label}${t.message}`)]
|
|
48
49
|
}
|
|
49
50
|
], e),
|
|
50
51
|
{}
|
|
51
|
-
)),
|
|
52
|
-
const e = Object.keys(
|
|
53
|
-
return [...new Set(e.concat(t))].reduce((
|
|
54
|
-
...
|
|
55
|
-
...
|
|
56
|
-
],
|
|
52
|
+
)), I = i(() => {
|
|
53
|
+
const e = Object.keys(k.value), t = Object.keys(F.value);
|
|
54
|
+
return [...new Set(e.concat(t))].reduce((r, s) => (r[s] = [
|
|
55
|
+
...k.value[s] || [],
|
|
56
|
+
...F.value[s] || []
|
|
57
|
+
], r), {});
|
|
57
58
|
});
|
|
58
|
-
|
|
59
|
+
P(U, ({ key: e, message: t }) => {
|
|
59
60
|
if (!e)
|
|
60
61
|
return console.error("更新状态未传入key, 此处忽略");
|
|
61
|
-
const
|
|
62
|
-
|
|
62
|
+
const l = c.value.findIndex((r) => r.key === e);
|
|
63
|
+
l === -1 ? t && c.value.push({
|
|
63
64
|
key: e,
|
|
64
65
|
message: t,
|
|
65
|
-
label:
|
|
66
|
-
}) : t ?
|
|
66
|
+
label: d.list.find((r) => r.key === e).label
|
|
67
|
+
}) : t ? c.value.splice(l, 1, {
|
|
67
68
|
key: e,
|
|
68
69
|
message: t,
|
|
69
|
-
label:
|
|
70
|
-
}) :
|
|
70
|
+
label: d.list.find((r) => r.key === e).label
|
|
71
|
+
}) : c.value.splice(l, 1);
|
|
71
72
|
});
|
|
72
|
-
const
|
|
73
|
+
const K = ({
|
|
73
74
|
status: e,
|
|
74
75
|
config: { key: t }
|
|
75
76
|
}) => {
|
|
76
|
-
(
|
|
77
|
-
},
|
|
78
|
-
...
|
|
77
|
+
(u.value[t] || !1) !== e && (u.value[t] = e);
|
|
78
|
+
}, E = (e) => ({
|
|
79
|
+
...d.layout || {},
|
|
79
80
|
...e || {}
|
|
80
81
|
});
|
|
81
|
-
return
|
|
82
|
+
return h(
|
|
82
83
|
g,
|
|
83
|
-
() => {
|
|
84
|
-
|
|
84
|
+
(e) => {
|
|
85
|
+
const t = e.map((l) => l.key);
|
|
86
|
+
Object.keys(u.value).forEach((l) => {
|
|
87
|
+
t.includes(l) || delete u.value[l];
|
|
88
|
+
});
|
|
85
89
|
},
|
|
86
90
|
{
|
|
87
91
|
immediate: !0
|
|
88
92
|
}
|
|
89
|
-
),
|
|
93
|
+
), h(b, () => {
|
|
90
94
|
v("loadingChange", b.value);
|
|
91
|
-
}),
|
|
95
|
+
}), h(
|
|
92
96
|
$,
|
|
93
97
|
(e) => {
|
|
94
98
|
v("visibleChange", e);
|
|
@@ -97,40 +101,40 @@ const ue = /* @__PURE__ */ N({
|
|
|
97
101
|
immediate: !0
|
|
98
102
|
}
|
|
99
103
|
), (e, t) => {
|
|
100
|
-
const
|
|
101
|
-
return
|
|
104
|
+
const l = B, r = A, s = M;
|
|
105
|
+
return p(), L(s, {
|
|
102
106
|
ref_key: "elForm",
|
|
103
107
|
ref: a,
|
|
104
|
-
model:
|
|
105
|
-
rules: y(
|
|
108
|
+
model: f.data,
|
|
109
|
+
rules: y(I)
|
|
106
110
|
}, {
|
|
107
|
-
default:
|
|
108
|
-
|
|
109
|
-
default:
|
|
110
|
-
(
|
|
111
|
-
key:
|
|
112
|
-
}, { ref_for: !0 },
|
|
113
|
-
default:
|
|
114
|
-
|
|
115
|
-
data:
|
|
116
|
-
config:
|
|
117
|
-
onViewHideChange:
|
|
111
|
+
default: m(() => [
|
|
112
|
+
O(r, { gutter: f.rowGutter }, {
|
|
113
|
+
default: m(() => [
|
|
114
|
+
(p(!0), D(T, null, q(y(g), (o) => z((p(), L(l, V({
|
|
115
|
+
key: o.key
|
|
116
|
+
}, { ref_for: !0 }, E(o.layout)), {
|
|
117
|
+
default: m(() => [
|
|
118
|
+
O(Q, {
|
|
119
|
+
data: f.data,
|
|
120
|
+
config: G(o),
|
|
121
|
+
onViewHideChange: K,
|
|
118
122
|
onSubmit: t[0] || (t[0] = (n) => v("submit", n))
|
|
119
123
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
|
|
124
|
+
default: m((n) => [
|
|
125
|
+
j(e.$slots, o.key, V({ ref_for: !0 }, n))
|
|
122
126
|
]),
|
|
123
127
|
_: 2
|
|
124
128
|
}, 1032, ["data", "config"])
|
|
125
129
|
]),
|
|
126
130
|
_: 2
|
|
127
131
|
}, 1040)), [
|
|
128
|
-
[J, !(y(
|
|
132
|
+
[J, !(y(u)[o.key] ?? !1)]
|
|
129
133
|
])), 128)),
|
|
130
|
-
|
|
134
|
+
j(e.$slots, "default", { mergeLayout: E })
|
|
131
135
|
]),
|
|
132
136
|
_: 3
|
|
133
|
-
})
|
|
137
|
+
}, 8, ["gutter"])
|
|
134
138
|
]),
|
|
135
139
|
_: 3
|
|
136
140
|
}, 8, ["model", "rules"]);
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ElRadioGroup as h, ElRadioButton as y, ElRadio as B } from "element-plus/es";
|
|
2
|
+
import "element-plus/es/components/base/style/css";
|
|
3
|
+
import "element-plus/es/components/radio-group/style/css";
|
|
4
|
+
import "element-plus/es/components/radio/style/css";
|
|
5
|
+
import "element-plus/es/components/radio-button/style/css";
|
|
6
|
+
import { defineComponent as V, useModel as _, computed as b, watch as g, openBlock as a, createBlock as r, unref as x, withCtx as d, createElementBlock as m, Fragment as c, renderList as s, createTextVNode as v, toDisplayString as p, createCommentVNode as M, mergeModels as N } from "vue";
|
|
7
|
+
const D = /* @__PURE__ */ V({
|
|
8
|
+
name: "FormRadio",
|
|
9
|
+
inheritAttrs: !0,
|
|
10
|
+
__name: "FormRadio",
|
|
11
|
+
props: /* @__PURE__ */ N({
|
|
12
|
+
list: {},
|
|
13
|
+
mode: { default: "radio" },
|
|
14
|
+
notNull: { type: Boolean, default: !0 }
|
|
15
|
+
}, {
|
|
16
|
+
modelValue: {},
|
|
17
|
+
modelModifiers: {}
|
|
18
|
+
}),
|
|
19
|
+
emits: ["update:modelValue"],
|
|
20
|
+
setup(o) {
|
|
21
|
+
const u = o, l = _(o, "modelValue"), n = b(() => {
|
|
22
|
+
if (u.notNull && u.list.length > 0) {
|
|
23
|
+
const e = u.list.some((i) => i.value === l.value);
|
|
24
|
+
if (l.value === void 0 || !e)
|
|
25
|
+
return u.list[0].value;
|
|
26
|
+
}
|
|
27
|
+
return l.value;
|
|
28
|
+
}), f = (e) => {
|
|
29
|
+
l.value = e;
|
|
30
|
+
};
|
|
31
|
+
return g(
|
|
32
|
+
n,
|
|
33
|
+
(e) => {
|
|
34
|
+
e !== void 0 && e !== l.value && (l.value = e);
|
|
35
|
+
},
|
|
36
|
+
{ immediate: !0 }
|
|
37
|
+
), (e, i) => {
|
|
38
|
+
const R = y, k = B, E = h;
|
|
39
|
+
return a(), r(E, {
|
|
40
|
+
"model-value": x(n),
|
|
41
|
+
"onUpdate:modelValue": f
|
|
42
|
+
}, {
|
|
43
|
+
default: d(() => [
|
|
44
|
+
o.mode === "buttonGroup" ? (a(!0), m(c, { key: 0 }, s(o.list, (t) => (a(), r(R, {
|
|
45
|
+
key: t.value,
|
|
46
|
+
value: t.value
|
|
47
|
+
}, {
|
|
48
|
+
default: d(() => [
|
|
49
|
+
v(p(t.label), 1)
|
|
50
|
+
]),
|
|
51
|
+
_: 2
|
|
52
|
+
}, 1032, ["value"]))), 128)) : o.mode === "radio" ? (a(!0), m(c, { key: 1 }, s(o.list, (t) => (a(), r(k, {
|
|
53
|
+
key: t.value,
|
|
54
|
+
value: t.value
|
|
55
|
+
}, {
|
|
56
|
+
default: d(() => [
|
|
57
|
+
v(p(t.label), 1)
|
|
58
|
+
]),
|
|
59
|
+
_: 2
|
|
60
|
+
}, 1032, ["value"]))), 128)) : M("", !0)
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
}, 8, ["model-value"]);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
export {
|
|
68
|
+
D as default
|
|
69
|
+
};
|
|
@@ -3,7 +3,7 @@ import { ElCol as k, ElButton as M } from "element-plus/es";
|
|
|
3
3
|
import "element-plus/es/components/base/style/css";
|
|
4
4
|
import "element-plus/es/components/col/style/css";
|
|
5
5
|
import "element-plus/es/components/button/style/css";
|
|
6
|
-
import { defineComponent as B, useAttrs as R, ref as W, computed as $, shallowRef as D, openBlock as N, createBlock as Q, normalizeClass as z, unref as i, withCtx as r, withDirectives as A, createVNode as m, mergeProps as
|
|
6
|
+
import { defineComponent as B, useAttrs as R, ref as W, computed as $, shallowRef as D, openBlock as N, createBlock as Q, normalizeClass as z, unref as i, withCtx as r, withDirectives as A, createVNode as m, mergeProps as G, createSlots as H, normalizeProps as g, guardReactiveProps as v, createElementVNode as L, createTextVNode as y, renderList as T, renderSlot as j, vShow as q } from "vue";
|
|
7
7
|
import { stringifyFormData as I } from "./utils.mjs";
|
|
8
8
|
import J from "../display/WatchSize.vue.mjs";
|
|
9
9
|
const K = { class: "btn-box" }, re = /* @__PURE__ */ B({
|
|
@@ -22,21 +22,22 @@ const K = { class: "btn-box" }, re = /* @__PURE__ */ B({
|
|
|
22
22
|
md: 12,
|
|
23
23
|
lg: 8,
|
|
24
24
|
xl: 6
|
|
25
|
-
}) }
|
|
25
|
+
}) },
|
|
26
|
+
rowGutter: {}
|
|
26
27
|
},
|
|
27
28
|
emits: ["search", "heightChange", "visibleChange"],
|
|
28
|
-
setup(
|
|
29
|
-
const s =
|
|
29
|
+
setup(a, { expose: b, emit: w }) {
|
|
30
|
+
const s = a, l = w, C = R(), u = W(!1), x = $(() => s.data), S = (e) => {
|
|
30
31
|
l("heightChange", e);
|
|
31
|
-
},
|
|
32
|
+
}, o = D(), d = (e) => ({
|
|
32
33
|
...s.staticQuery || {},
|
|
33
34
|
...I(e, s.list)
|
|
34
35
|
}), h = () => {
|
|
35
36
|
var e;
|
|
36
|
-
(e =
|
|
37
|
+
(e = o.value) == null || e.resetFields(), l("search", d(s.data), "reset");
|
|
37
38
|
}, c = (e = "search") => {
|
|
38
39
|
var t;
|
|
39
|
-
(t =
|
|
40
|
+
(t = o.value) == null || t.validate().then(() => {
|
|
40
41
|
l("search", d(s.data), e);
|
|
41
42
|
});
|
|
42
43
|
}, F = (e) => {
|
|
@@ -44,17 +45,17 @@ const K = { class: "btn-box" }, re = /* @__PURE__ */ B({
|
|
|
44
45
|
};
|
|
45
46
|
b({
|
|
46
47
|
validate: () => {
|
|
47
|
-
if (
|
|
48
|
-
return
|
|
48
|
+
if (o.value)
|
|
49
|
+
return o.value.validate();
|
|
49
50
|
throw new Error("实例化未完成");
|
|
50
51
|
},
|
|
51
52
|
resetFields: () => {
|
|
52
53
|
var e;
|
|
53
|
-
return (e =
|
|
54
|
+
return (e = o.value) == null ? void 0 : e.resetFields();
|
|
54
55
|
},
|
|
55
56
|
clearValidate: (e) => {
|
|
56
57
|
var t;
|
|
57
|
-
return (t =
|
|
58
|
+
return (t = o.value) == null ? void 0 : t.clearValidate(e);
|
|
58
59
|
},
|
|
59
60
|
triggerReset: h,
|
|
60
61
|
triggerSearch: () => c()
|
|
@@ -71,22 +72,22 @@ const K = { class: "btn-box" }, re = /* @__PURE__ */ B({
|
|
|
71
72
|
onHeightChange: S
|
|
72
73
|
}, {
|
|
73
74
|
default: r(() => [
|
|
74
|
-
A(m(E,
|
|
75
|
+
A(m(E, G({
|
|
75
76
|
ref_key: "formMain",
|
|
76
|
-
ref:
|
|
77
|
-
list:
|
|
77
|
+
ref: o,
|
|
78
|
+
list: a.list,
|
|
78
79
|
data: i(x)
|
|
79
|
-
}, i(
|
|
80
|
-
layout:
|
|
81
|
-
labelPosition:
|
|
82
|
-
labelWidth:
|
|
80
|
+
}, i(C), {
|
|
81
|
+
layout: a.layout,
|
|
82
|
+
labelPosition: a.labelPosition,
|
|
83
|
+
labelWidth: a.labelWidth,
|
|
83
84
|
onSubmit: F,
|
|
84
85
|
onVisibleChange: _
|
|
85
|
-
}),
|
|
86
|
+
}), H({
|
|
86
87
|
default: r(({ mergeLayout: n }) => [
|
|
87
88
|
m(P, g(v(n())), {
|
|
88
89
|
default: r(() => [
|
|
89
|
-
|
|
90
|
+
L("div", K, [
|
|
90
91
|
m(f, {
|
|
91
92
|
type: "primary",
|
|
92
93
|
onMousedown: h
|
|
@@ -112,14 +113,14 @@ const K = { class: "btn-box" }, re = /* @__PURE__ */ B({
|
|
|
112
113
|
]),
|
|
113
114
|
_: 2
|
|
114
115
|
}, [
|
|
115
|
-
|
|
116
|
+
T(a.list, (n) => ({
|
|
116
117
|
name: n.key,
|
|
117
118
|
fn: r((p) => [
|
|
118
|
-
|
|
119
|
+
j(e.$slots, n.key, g(v(p)), void 0, !0)
|
|
119
120
|
])
|
|
120
121
|
}))
|
|
121
122
|
]), 1040, ["list", "data", "layout", "labelPosition", "labelWidth"]), [
|
|
122
|
-
[
|
|
123
|
+
[q, i(u)]
|
|
123
124
|
])
|
|
124
125
|
]),
|
|
125
126
|
_: 3
|
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./FormMain.vue.mjs";
|
|
2
2
|
import i from "./FormSelect.vue.mjs";
|
|
3
|
-
import
|
|
4
|
-
import t from "./
|
|
5
|
-
import f from "./
|
|
6
|
-
import n from "./
|
|
7
|
-
import s from "./
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import e from "./FormRadioGroup.vue.mjs";
|
|
4
|
+
import t from "./FormRadio.vue.mjs";
|
|
5
|
+
import f from "./FormTree.vue.mjs";
|
|
6
|
+
import n from "./FormSearch.vue.mjs";
|
|
7
|
+
import s from "./FormVerifyImage.vue.mjs";
|
|
8
|
+
import c from "./FormVerifyCode.vue.mjs";
|
|
9
|
+
import F from "./FormDateTimeRange.vue.mjs";
|
|
10
|
+
const p = {
|
|
11
|
+
FormMain: a,
|
|
10
12
|
FormSelect: i,
|
|
11
|
-
FormRadioGroup:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
FormRadioGroup: e,
|
|
14
|
+
FormRadio: t,
|
|
15
|
+
FormTree: f,
|
|
16
|
+
FormSearch: n,
|
|
17
|
+
FormVerifyImage: s,
|
|
18
|
+
FormVerifyCode: c,
|
|
19
|
+
FormDateTimeRange: F
|
|
20
|
+
}, V = {
|
|
17
21
|
install(o) {
|
|
18
|
-
Object.entries(
|
|
19
|
-
o.component(
|
|
22
|
+
Object.entries(p).forEach(([m, r]) => {
|
|
23
|
+
o.component(m, r);
|
|
20
24
|
});
|
|
21
25
|
}
|
|
22
26
|
};
|
|
23
27
|
export {
|
|
24
|
-
|
|
25
|
-
a as
|
|
26
|
-
|
|
28
|
+
F as FormDateTimeRange,
|
|
29
|
+
a as FormMain,
|
|
30
|
+
t as FormRadio,
|
|
31
|
+
e as FormRadioGroup,
|
|
32
|
+
n as FormSearch,
|
|
27
33
|
i as FormSelect,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
f as FormTree,
|
|
35
|
+
c as FormVerifyCode,
|
|
36
|
+
s as FormVerifyImage,
|
|
37
|
+
V as formInstall
|
|
32
38
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ListPage.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a578c778"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|