@done-coding/admin-core 0.1.1-alpha.7 → 0.1.1
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/form/index.mjs +5 -8
- package/es/components/form/utils.mjs +26 -26
- package/es/index.mjs +56 -58
- package/es/style.css +1 -1
- package/package.json +2 -2
- package/types/components/form/index.d.ts +1 -2
- package/types/components/form/types.d.ts +8 -4
- package/types/components/form/utils.d.ts +8 -3
- package/es/components/form/FormDatePicker.vue.mjs +0 -7
- package/es/components/form/FormDatePicker.vue2.mjs +0 -50
- package/types/components/form/FormDatePicker.vue.d.ts +0 -18
|
@@ -5,25 +5,22 @@ import t from "./FormTree.vue.mjs";
|
|
|
5
5
|
import f from "./FormSearch.vue.mjs";
|
|
6
6
|
import n from "./FormVerifyImage.vue.mjs";
|
|
7
7
|
import s from "./FormVerifyCode.vue.mjs";
|
|
8
|
-
|
|
9
|
-
const p = {
|
|
8
|
+
const c = {
|
|
10
9
|
FormMain: e,
|
|
11
10
|
FormSelect: i,
|
|
12
11
|
FormRadioGroup: a,
|
|
13
12
|
FormTree: t,
|
|
14
13
|
FormSearch: f,
|
|
15
14
|
FormVerifyImage: n,
|
|
16
|
-
FormVerifyCode: s
|
|
17
|
-
|
|
18
|
-
}, h = {
|
|
15
|
+
FormVerifyCode: s
|
|
16
|
+
}, S = {
|
|
19
17
|
install(o) {
|
|
20
|
-
Object.entries(
|
|
18
|
+
Object.entries(c).forEach(([r, m]) => {
|
|
21
19
|
o.component(r, m);
|
|
22
20
|
});
|
|
23
21
|
}
|
|
24
22
|
};
|
|
25
23
|
export {
|
|
26
|
-
c as FormDatePicker,
|
|
27
24
|
e as FormMain,
|
|
28
25
|
a as FormRadioGroup,
|
|
29
26
|
f as FormSearch,
|
|
@@ -31,5 +28,5 @@ export {
|
|
|
31
28
|
t as FormTree,
|
|
32
29
|
s as FormVerifyCode,
|
|
33
30
|
n as FormVerifyImage,
|
|
34
|
-
|
|
31
|
+
S as formInstall
|
|
35
32
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import f from "lodash/cloneDeep";
|
|
2
|
-
const
|
|
2
|
+
const m = ["xs", "sm", "md", "lg", "xl"], O = (t) => {
|
|
3
3
|
if (!t) return {};
|
|
4
4
|
const n = { ...t };
|
|
5
|
-
return t.span !== void 0 &&
|
|
5
|
+
return t.span !== void 0 && m.forEach((e) => {
|
|
6
6
|
t[e] === void 0 && (n[e] = t.span);
|
|
7
7
|
}), n;
|
|
8
|
-
},
|
|
8
|
+
}, S = () => {
|
|
9
9
|
const t = /* @__PURE__ */ new Date(), n = new Date(
|
|
10
10
|
t.getFullYear(),
|
|
11
11
|
t.getMonth(),
|
|
@@ -13,27 +13,27 @@ const y = ["xs", "sm", "md", "lg", "xl"], k = (t) => {
|
|
|
13
13
|
), e = new Date(n.getTime() + 864e5 - 1), s = new Date(n.getTime() - 864e5), r = new Date(n.getTime() - 1), i = new Date(n.getTime() - 6 * 864e5);
|
|
14
14
|
return [
|
|
15
15
|
{
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
text: "今日",
|
|
17
|
+
value: () => [n, e]
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
text: "昨日",
|
|
21
|
+
value: () => [s, r]
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
text: "近7日",
|
|
25
|
+
value: () => [i, e]
|
|
26
26
|
}
|
|
27
27
|
];
|
|
28
28
|
}, u = (t) => {
|
|
29
29
|
const { ignore: n, key: e } = t;
|
|
30
30
|
return n || e.startsWith("__") && e.toUpperCase() === e;
|
|
31
|
-
},
|
|
31
|
+
}, d = (t) => typeof t == "function", D = (t) => t.reduce(
|
|
32
32
|
(n, e) => (u(e) || (typeof e.init == "object" && console.error(
|
|
33
33
|
`表单项${e.label}的初始值不能为对象 请设置为返回值的形式`
|
|
34
|
-
), n[e.key] =
|
|
34
|
+
), n[e.key] = d(e.init) ? e.init() : e.init), n),
|
|
35
35
|
{}
|
|
36
|
-
),
|
|
36
|
+
), k = (t, n) => {
|
|
37
37
|
const e = f(t);
|
|
38
38
|
return n.reduce(
|
|
39
39
|
(s, r) => {
|
|
@@ -97,22 +97,22 @@ const y = ["xs", "sm", "md", "lg", "xl"], k = (t) => {
|
|
|
97
97
|
s.key === "Enter" && (n(), (i = (r = s.target) == null ? void 0 : r.blur) == null || i.call(r));
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
|
-
},
|
|
100
|
+
}, h = (t, n) => {
|
|
101
101
|
const { extra: e } = t;
|
|
102
102
|
if (e != null && e.isInput && ((e == null ? void 0 : e.blurSubmit) ?? !0))
|
|
103
103
|
return {
|
|
104
104
|
onBlur: n
|
|
105
105
|
};
|
|
106
|
-
},
|
|
106
|
+
}, T = (t, n) => {
|
|
107
107
|
const { extra: e } = t;
|
|
108
108
|
if (e != null && e.isSelect && ((e == null ? void 0 : e.changeSubmit) ?? !0))
|
|
109
109
|
return {
|
|
110
110
|
onChange: n
|
|
111
111
|
};
|
|
112
|
-
}, C = Symbol("FORM_ITEM_CHANGE_LOADING"),
|
|
112
|
+
}, C = Symbol("FORM_ITEM_CHANGE_LOADING"), y = (t) => t.required === !0, p = [], a = [], w = (t) => {
|
|
113
113
|
p.push(...t);
|
|
114
114
|
}, F = (t) => {
|
|
115
|
-
|
|
115
|
+
a.push(...t);
|
|
116
116
|
}, N = (t) => {
|
|
117
117
|
const { label: n, type: e, ...s } = t;
|
|
118
118
|
let r;
|
|
@@ -120,7 +120,7 @@ const y = ["xs", "sm", "md", "lg", "xl"], k = (t) => {
|
|
|
120
120
|
r = e;
|
|
121
121
|
else {
|
|
122
122
|
const { render: o } = t;
|
|
123
|
-
o && (p.includes(o) ? r = "input" :
|
|
123
|
+
o && (p.includes(o) ? r = "input" : a.includes(o) && (r = "select"));
|
|
124
124
|
}
|
|
125
125
|
let i;
|
|
126
126
|
r === "input" && (i = {
|
|
@@ -131,7 +131,7 @@ const y = ["xs", "sm", "md", "lg", "xl"], k = (t) => {
|
|
|
131
131
|
isSelect: !0
|
|
132
132
|
});
|
|
133
133
|
let l;
|
|
134
|
-
if (
|
|
134
|
+
if (y(t)) {
|
|
135
135
|
l = [
|
|
136
136
|
{
|
|
137
137
|
required: !0,
|
|
@@ -143,12 +143,12 @@ const y = ["xs", "sm", "md", "lg", "xl"], k = (t) => {
|
|
|
143
143
|
trigger: "blur"
|
|
144
144
|
}
|
|
145
145
|
];
|
|
146
|
-
const { required: o, ...
|
|
146
|
+
const { required: o, ...g } = s;
|
|
147
147
|
return {
|
|
148
148
|
label: n,
|
|
149
149
|
extra: i,
|
|
150
150
|
rules: l,
|
|
151
|
-
...
|
|
151
|
+
...g
|
|
152
152
|
};
|
|
153
153
|
} else
|
|
154
154
|
return {
|
|
@@ -159,15 +159,15 @@ const y = ["xs", "sm", "md", "lg", "xl"], k = (t) => {
|
|
|
159
159
|
};
|
|
160
160
|
export {
|
|
161
161
|
C as FORM_ITEM_CHANGE_LOADING,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
D as generateFormData,
|
|
163
|
+
h as getBlurSubmit,
|
|
164
|
+
T as getChangeSubmit,
|
|
165
|
+
S as getDatePickerShortcuts,
|
|
166
166
|
_ as getEnterSubmit,
|
|
167
167
|
E as getPlaceholder,
|
|
168
168
|
I as getVModelSugar,
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
k as parseFormData,
|
|
170
|
+
O as resolveFormLayout,
|
|
171
171
|
w as setInputComponent,
|
|
172
172
|
F as setSelectComponent,
|
|
173
173
|
b as stringifyFormData,
|
package/es/index.mjs
CHANGED
|
@@ -8,41 +8,40 @@ import { listPageInstall as s } from "./components/list-page/index.mjs";
|
|
|
8
8
|
import { default as E } from "./components/misc/ActionButton.vue.mjs";
|
|
9
9
|
import { default as M } from "./components/misc/ActionButtonDanger.vue.mjs";
|
|
10
10
|
import { default as A } from "./components/misc/ActionButtonWarn.vue.mjs";
|
|
11
|
-
import { default as
|
|
11
|
+
import { default as F } from "./components/modal/DetailModal.vue.mjs";
|
|
12
12
|
import { default as L } from "./components/form/FormMain.vue.mjs";
|
|
13
|
-
import { default as
|
|
13
|
+
import { default as O } from "./components/form/FormRadioGroup.vue.mjs";
|
|
14
14
|
import { default as D } from "./components/form/FormSelect.vue.mjs";
|
|
15
|
-
import { default as
|
|
15
|
+
import { default as y } from "./components/form/FormTree.vue.mjs";
|
|
16
16
|
import { default as N } from "./components/form/FormVerifyCode.vue.mjs";
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
17
|
+
import { default as V } from "./components/menu/MenuItemSub.vue.mjs";
|
|
18
|
+
import { default as w } from "./components/menu/MenuTree.vue.mjs";
|
|
19
19
|
import { default as U } from "./components/display/TabsMain.vue.mjs";
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
20
|
+
import { default as H } from "./components/misc/TriggerAutoImport.vue.mjs";
|
|
21
|
+
import { default as k } from "./components/display/WatchSize.vue.mjs";
|
|
22
22
|
import { APP_API_LIST_MODEL_KEY_CONFIG as X } from "./config/list-model.mjs";
|
|
23
23
|
import { default as Q } from "./components/misc/AutoRefresh.vue.mjs";
|
|
24
24
|
import { BODY_CONTENT_VIEWPORT_HEIGHT as q } from "./inject/key.mjs";
|
|
25
25
|
import { default as Z } from "./components/modal/ConfirmModal.vue.mjs";
|
|
26
26
|
import { EXPORT_MAX_LIMIT as ee, OPERATE_COLUMN_PROP as te, exportCSV as oe, pickExportColumns as re } from "./utils/export.mjs";
|
|
27
27
|
import { FORM_CONFIG_SELECT_ALL_VALUE as me, getConfirmPasswordRule as fe, passwordRule as se, setFormComponentType as le } from "./helpers/form.mjs";
|
|
28
|
-
import { FORM_ITEM_CHANGE_LOADING as
|
|
29
|
-
import { default as Re } from "./components/form/
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as Pe } from "./components/
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import { useTimeout as ut } from "./hooks/timeout.mjs";
|
|
28
|
+
import { FORM_ITEM_CHANGE_LOADING as pe, generateFormData as ie, getBlurSubmit as ne, getChangeSubmit as xe, getDatePickerShortcuts as de, getEnterSubmit as ce, getPlaceholder as Ie, getVModelSugar as ge, parseFormData as Ee, resolveFormLayout as _e, setInputComponent as Me, setSelectComponent as Te, stringifyFormData as Ae, swiftFormItemConfig as Ce } from "./components/form/utils.mjs";
|
|
29
|
+
import { default as Re } from "./components/form/FormSearch.vue.mjs";
|
|
30
|
+
import { default as Se } from "./components/form/FormVerifyImage.vue.mjs";
|
|
31
|
+
import { default as Pe } from "./components/list-page/ListPage.vue.mjs";
|
|
32
|
+
import { ROUTE_MODULE_LEVEL as he, TabsMainReplaceQueryKey as ye } from "./config/route.mjs";
|
|
33
|
+
import { default as Ne } from "./components/table/TableMain.vue.mjs";
|
|
34
|
+
import { countAll as Ve, createListApi as ve, fetchListAll as we } from "./helpers/list-helper.mjs";
|
|
35
|
+
import { createGenerateRouteMetaRawTree as Ue } from "./helpers/route.mjs";
|
|
36
|
+
import { createStorageWithNamespace as He } from "./helpers/storage.mjs";
|
|
37
|
+
import { createUseState as ke } from "./helpers/state.mjs";
|
|
38
|
+
import { flatRouteMetaResolveRaw as Xe, getRoutePermissionKey as Ye } from "./utils/router.mjs";
|
|
39
|
+
import { getId as je } from "./utils/id.mjs";
|
|
40
|
+
import { timeCountDown as Je } from "./utils/time.mjs";
|
|
41
|
+
import { useActivated as $e, useActivatedEvent as et, useActivatedExec as tt } from "./hooks/activated.mjs";
|
|
42
|
+
import { useFeelSize as rt } from "./hooks/feel-size.mjs";
|
|
43
|
+
import { useMenusDataDispatch as mt } from "./hooks/menus-dispatch.mjs";
|
|
44
|
+
import { useTimeout as st } from "./hooks/timeout.mjs";
|
|
46
45
|
const c = {
|
|
47
46
|
install(e) {
|
|
48
47
|
e.use(t), e.use(o), e.use(r), e.use(a), e.use(m), e.use(f), e.use(s);
|
|
@@ -56,47 +55,46 @@ export {
|
|
|
56
55
|
Q as AutoRefresh,
|
|
57
56
|
q as BODY_CONTENT_VIEWPORT_HEIGHT,
|
|
58
57
|
Z as ConfirmModal,
|
|
59
|
-
|
|
58
|
+
F as DetailModal,
|
|
60
59
|
ee as EXPORT_MAX_LIMIT,
|
|
61
60
|
me as FORM_CONFIG_SELECT_ALL_VALUE,
|
|
62
|
-
|
|
63
|
-
Re as FormDatePicker,
|
|
61
|
+
pe as FORM_ITEM_CHANGE_LOADING,
|
|
64
62
|
L as FormMain,
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
O as FormRadioGroup,
|
|
64
|
+
Re as FormSearch,
|
|
67
65
|
D as FormSelect,
|
|
68
|
-
|
|
66
|
+
y as FormTree,
|
|
69
67
|
N as FormVerifyCode,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
Se as FormVerifyImage,
|
|
69
|
+
Pe as ListPage,
|
|
70
|
+
V as MenuItemSub,
|
|
71
|
+
w as MenuTree,
|
|
74
72
|
te as OPERATE_COLUMN_PROP,
|
|
75
73
|
he as ROUTE_MODULE_LEVEL,
|
|
76
|
-
|
|
74
|
+
Ne as TableMain,
|
|
77
75
|
U as TabsMain,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
76
|
+
ye as TabsMainReplaceQueryKey,
|
|
77
|
+
H as TriggerAutoImport,
|
|
78
|
+
k as WatchSize,
|
|
79
|
+
Ve as countAll,
|
|
80
|
+
Ue as createGenerateRouteMetaRawTree,
|
|
81
|
+
ve as createListApi,
|
|
82
|
+
He as createStorageWithNamespace,
|
|
83
|
+
ke as createUseState,
|
|
86
84
|
r as displayInstall,
|
|
87
85
|
oe as exportCSV,
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
we as fetchListAll,
|
|
87
|
+
Xe as flatRouteMetaResolveRaw,
|
|
90
88
|
t as formInstall,
|
|
91
|
-
|
|
89
|
+
ie as generateFormData,
|
|
92
90
|
ne as getBlurSubmit,
|
|
93
91
|
xe as getChangeSubmit,
|
|
94
92
|
fe as getConfirmPasswordRule,
|
|
95
|
-
de as
|
|
93
|
+
de as getDatePickerShortcuts,
|
|
96
94
|
ce as getEnterSubmit,
|
|
97
|
-
|
|
95
|
+
je as getId,
|
|
98
96
|
Ie as getPlaceholder,
|
|
99
|
-
|
|
97
|
+
Ye as getRoutePermissionKey,
|
|
100
98
|
ge as getVModelSugar,
|
|
101
99
|
c as installComponents,
|
|
102
100
|
s as listPageInstall,
|
|
@@ -111,13 +109,13 @@ export {
|
|
|
111
109
|
Me as setInputComponent,
|
|
112
110
|
Te as setSelectComponent,
|
|
113
111
|
Ae as stringifyFormData,
|
|
114
|
-
|
|
112
|
+
Ce as swiftFormItemConfig,
|
|
115
113
|
f as tableInstall,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
114
|
+
Je as timeCountDown,
|
|
115
|
+
$e as useActivated,
|
|
116
|
+
et as useActivatedEvent,
|
|
117
|
+
tt as useActivatedExec,
|
|
118
|
+
rt as useFeelSize,
|
|
119
|
+
mt as useMenusDataDispatch,
|
|
120
|
+
st as useTimeout
|
|
123
121
|
};
|
package/es/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-item-tip[data-v-0dd66b41]{text-align:left;line-height:1.5;font-size:12px}.form-item-label-hide[data-v-0dd66b41] .el-form-item__label-wrap{display:none}.form-search_show[data-v-8896356d]{margin-bottom:10px}.form-search .btn-box[data-v-8896356d]{padding-left:20px}.form-search[data-v-8896356d] .el-col{padding-left:14px}.form-verify-image[data-v-a4baf877] .el-input__suffix-inner *{margin:0}.form-verify-image-suffix[data-v-a4baf877]{position:absolute;height:100%;border-radius:var(--el-input-border-radius, var(--el-border-radius-base));top:50%;transform:translateY(-50%);overflow:hidden;cursor:pointer}.form-verify-image-suffix-main[data-v-a4baf877]{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#f4f4f4}.
|
|
1
|
+
.form-item-tip[data-v-0dd66b41]{text-align:left;line-height:1.5;font-size:12px}.form-item-label-hide[data-v-0dd66b41] .el-form-item__label-wrap{display:none}.form-search_show[data-v-8896356d]{margin-bottom:10px}.form-search .btn-box[data-v-8896356d]{padding-left:20px}.form-search[data-v-8896356d] .el-col{padding-left:14px}.form-verify-image[data-v-a4baf877] .el-input__suffix-inner *{margin:0}.form-verify-image-suffix[data-v-a4baf877]{position:absolute;height:100%;border-radius:var(--el-input-border-radius, var(--el-border-radius-base));top:50%;transform:translateY(-50%);overflow:hidden;cursor:pointer}.form-verify-image-suffix-main[data-v-a4baf877]{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#f4f4f4}.auto-refresh[data-v-9d78ca06]{display:flex;align-items:center;gap:8px}.auto-refresh-label[data-v-9d78ca06]{font-size:13px;color:var(--el-text-color-regular)}.auto-refresh-interval[data-v-9d78ca06]{width:80px}.confirm-dialog .content[data-v-2f0c870e]{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 200px)}.confirm-dialog .btn[data-v-2f0c870e]{width:150px;height:40px;border-radius:4px}.confirm-dialog .main[data-v-2f0c870e]{position:relative;text-align:center}.confirm-dialog .main .close-box[data-v-2f0c870e]{position:absolute;top:0;right:0;cursor:pointer;z-index:2}.confirm-dialog .main .shim[data-v-2f0c870e]{position:relative;z-index:1}.confirm-dialog .main .shim .title[data-v-2f0c870e]{font-size:18px;font-weight:500}.confirm-dialog .main .shim .content[data-v-2f0c870e]{font-size:16px;margin-top:15px}.confirm-dialog .main .shim .footer[data-v-2f0c870e]{display:flex;justify-content:center;align-items:center;padding-top:5px}.confirm-dialog .main .shim .footer>.btn[data-v-2f0c870e]:not(:last-child){margin-right:30px}.confirm-dialog .main .shim .footer[reverse=true][data-v-2f0c870e]{flex-direction:row-reverse}.confirm-dialog .main .shim .footer[reverse=true]>.btn[data-v-2f0c870e]:not(:last-child){margin-right:0;margin-left:30px}.confirm-dialog .el-dialog__header,.confirm-dialog .el-dialog__body{padding:0;background-color:transparent}.table-toolbar[data-v-90cd7b54]{display:flex;justify-content:space-between;align-items:center;padding-bottom:8px;gap:20px}.table-toolbar-left[data-v-90cd7b54],.table-toolbar-right[data-v-90cd7b54]{display:flex;align-items:center;gap:10px}.table-toolbar-icon--rotating[data-v-90cd7b54]{animation:table-toolbar-rotating-90cd7b54 1s linear infinite}@keyframes table-toolbar-rotating-90cd7b54{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.table-main-table[data-v-135cf353]{--el-table-header-bg-color: var(--v4bebd1e5)}.table-main-pagination[data-v-135cf353]{margin-top:10px;display:flex;justify-content:flex-end}.list-page[data-v-010d0705]{min-height:var(--d5119b7c)}.list-page-header[data-v-010d0705],.list-page-operation[data-v-010d0705]{margin-bottom:10px}.list-page[data-v-010d0705] .el-loading-mask{left:-10px;top:-10px;right:-10px;bottom:-10px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@done-coding/admin-core",
|
|
3
|
-
"version": "0.1.1
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "后台管理核心",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "lib/index.cjs",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"node": ">=18.0.0",
|
|
78
78
|
"pnpm": ">=9.0.0"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "7edab69f769eacb6ab737e79aed6e9439f46b888"
|
|
81
81
|
}
|
|
@@ -6,9 +6,8 @@ import { default as FormTree } from './FormTree.vue';
|
|
|
6
6
|
import { default as FormSearch } from './FormSearch.vue';
|
|
7
7
|
import { default as FormVerifyImage } from './FormVerifyImage.vue';
|
|
8
8
|
import { default as FormVerifyCode } from './FormVerifyCode.vue';
|
|
9
|
-
import { default as FormDatePicker } from './FormDatePicker.vue';
|
|
10
9
|
|
|
11
10
|
export * from './types';
|
|
12
11
|
export * from './utils';
|
|
13
|
-
export { FormMain, FormSelect, FormSearch, FormRadioGroup, FormTree, FormVerifyImage, FormVerifyCode,
|
|
12
|
+
export { FormMain, FormSelect, FormSearch, FormRadioGroup, FormTree, FormVerifyImage, FormVerifyCode, };
|
|
14
13
|
export declare const formInstall: Plugin;
|
|
@@ -193,10 +193,14 @@ export interface FormTreeItem {
|
|
|
193
193
|
export type FormItemSubmitType = "blur" | "change" | "enter";
|
|
194
194
|
/** 表单搜索搜索类型 */
|
|
195
195
|
export type FormSearchSearchType = "search" | "reset" | FormItemSubmitType;
|
|
196
|
-
/**
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
196
|
+
/**
|
|
197
|
+
* ElDatePicker 原生 `shortcuts` 项(时间段快捷)。
|
|
198
|
+
* 直接传给 `<ElDatePicker :shortcuts="...">`,由 ElDatePicker 自身的
|
|
199
|
+
* pick 管线按其 value-format 归一化输出,无需额外格式化依赖。
|
|
200
|
+
*/
|
|
201
|
+
export interface DatePickerShortcut {
|
|
202
|
+
text: string;
|
|
203
|
+
value: () => [Date, Date];
|
|
200
204
|
}
|
|
201
205
|
export type FormItemConfigSwiftOptionsCommon<PO extends Record<string, any>,
|
|
202
206
|
/** 需要格式化的模型 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DatePickerShortcut, FormItemConfig, FormItemConfigList, ExtractFormStringifyFromObject, FormItemConfigSwiftOptions } from './types';
|
|
2
2
|
import { ColProps } from 'element-plus';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -7,8 +7,13 @@ import { ColProps } from 'element-plus';
|
|
|
7
7
|
* - 单独设置某个尺寸则该尺寸覆盖 span 推导值
|
|
8
8
|
*/
|
|
9
9
|
export declare const resolveFormLayout: (layout?: Partial<ColProps>) => Partial<ColProps>;
|
|
10
|
-
/**
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* 生成 ElDatePicker 原生 `shortcuts` 的默认时间段快捷值:今日、昨日、近7日。
|
|
12
|
+
* 直接用于 `<ElDatePicker :shortcuts="getDatePickerShortcuts()">`——
|
|
13
|
+
* 由 ElDatePicker 自身 pick 管线按其 value-format 归一化输出,
|
|
14
|
+
* 与手动选日期完全同源,无需任何额外格式化依赖。
|
|
15
|
+
*/
|
|
16
|
+
export declare const getDatePickerShortcuts: () => DatePickerShortcut[];
|
|
12
17
|
/**
|
|
13
18
|
* 生成表单数据
|
|
14
19
|
*/
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { ElDatePicker as d, ElButton as u } 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 a, createVNode as _, mergeProps as V, unref as y, createElementVNode as g, Fragment as w, renderList as D, createBlock as E, withCtx as P, createTextVNode as B, toDisplayString as C, mergeModels as h } from "vue";
|
|
6
|
-
import { getDatePickerSwiftOptions as v } from "./utils.mjs";
|
|
7
|
-
const x = { class: "form-date-picker" }, F = { class: "form-date-picker-swift" }, U = /* @__PURE__ */ p({
|
|
8
|
-
name: "FormDatePicker",
|
|
9
|
-
inheritAttrs: !1,
|
|
10
|
-
__name: "FormDatePicker",
|
|
11
|
-
props: /* @__PURE__ */ h({
|
|
12
|
-
swiftOptions: { default: () => v() }
|
|
13
|
-
}, {
|
|
14
|
-
modelValue: { default: null },
|
|
15
|
-
modelModifiers: {}
|
|
16
|
-
}),
|
|
17
|
-
emits: ["update:modelValue"],
|
|
18
|
-
setup(r) {
|
|
19
|
-
const t = f(r, "modelValue"), i = k(), s = (l) => {
|
|
20
|
-
t.value = l.set();
|
|
21
|
-
};
|
|
22
|
-
return (l, n) => {
|
|
23
|
-
const m = d, c = u;
|
|
24
|
-
return o(), a("span", x, [
|
|
25
|
-
_(m, V({
|
|
26
|
-
modelValue: t.value,
|
|
27
|
-
"onUpdate:modelValue": n[0] || (n[0] = (e) => t.value = e),
|
|
28
|
-
type: "datetimerange",
|
|
29
|
-
class: "form-date-picker-input"
|
|
30
|
-
}, y(i)), null, 16, ["modelValue"]),
|
|
31
|
-
g("span", F, [
|
|
32
|
-
(o(!0), a(w, null, D(r.swiftOptions, (e) => (o(), E(c, {
|
|
33
|
-
key: e.key,
|
|
34
|
-
type: "primary",
|
|
35
|
-
link: "",
|
|
36
|
-
onClick: (M) => s(e)
|
|
37
|
-
}, {
|
|
38
|
-
default: P(() => [
|
|
39
|
-
B(C(e.key), 1)
|
|
40
|
-
]),
|
|
41
|
-
_: 2
|
|
42
|
-
}, 1032, ["onClick"]))), 128))
|
|
43
|
-
])
|
|
44
|
-
]);
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
export {
|
|
49
|
-
U as default
|
|
50
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DateTimeRangeSwiftOption } from './types';
|
|
2
|
-
|
|
3
|
-
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
-
modelValue: import('vue').PropType<[Date, Date] | null>;
|
|
5
|
-
swiftOptions: {
|
|
6
|
-
type: globalThis.PropType<DateTimeRangeSwiftOption[]>;
|
|
7
|
-
default: () => DateTimeRangeSwiftOption[];
|
|
8
|
-
};
|
|
9
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
10
|
-
modelValue: import('vue').PropType<[Date, Date] | null>;
|
|
11
|
-
swiftOptions: {
|
|
12
|
-
type: globalThis.PropType<DateTimeRangeSwiftOption[]>;
|
|
13
|
-
default: () => DateTimeRangeSwiftOption[];
|
|
14
|
-
};
|
|
15
|
-
}>> & Readonly<{}>, {
|
|
16
|
-
swiftOptions: DateTimeRangeSwiftOption[];
|
|
17
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
18
|
-
export default _default;
|