@done-coding/admin-core 0.1.1-alpha.5 → 0.1.1-alpha.7
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/FormItem.vue.mjs +2 -2
- package/es/components/form/FormItem.vue2.mjs +10 -7
- package/es/components/form/FormMain.vue.mjs +32 -32
- package/es/components/form/FormRadioGroup.vue.mjs +57 -20
- package/es/components/form/index.mjs +23 -26
- package/es/components/form/utils.mjs +79 -72
- package/es/components/list-page/ListPage.vue.mjs +2 -2
- package/es/components/list-page/ListPage.vue2.mjs +88 -90
- package/es/components/modal/DetailModal.vue.mjs +33 -32
- package/es/components/table/TableMain.vue.mjs +2 -2
- package/es/components/table/TableMain.vue2.mjs +91 -90
- package/es/components/table/TableToolbar.vue.mjs +2 -2
- package/es/components/table/TableToolbar.vue2.mjs +55 -56
- package/es/index.mjs +95 -96
- package/es/style.css +1 -1
- package/package.json +2 -2
- package/types/components/form/FormRadioGroup.vue.d.ts +31 -19
- package/types/components/form/index.d.ts +1 -2
- package/types/components/form/types.d.ts +5 -0
- package/types/components/form/utils.d.ts +7 -0
- package/types/components/list-page/ListPage.vue.d.ts +0 -2
- package/types/components/list-page/types.d.ts +0 -4
- package/types/components/modal/types.d.ts +2 -0
- package/es/components/form/FormRadio.vue.mjs +0 -69
- package/es/components/form/FormRadio.vue2.mjs +0 -4
- package/types/components/form/FormRadio.vue.d.ts +0 -35
package/es/index.mjs
CHANGED
|
@@ -8,117 +8,116 @@ 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
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as D } from "./components/form/
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as N } from "./components/form/
|
|
17
|
-
import { default as G } from "./components/
|
|
18
|
-
import { default as v } from "./components/menu/
|
|
19
|
-
import { default as U } from "./components/
|
|
20
|
-
import { default as k } from "./components/
|
|
21
|
-
import { default as K } from "./components/
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import { default as Oe } from "./components/form/
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
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 {
|
|
46
|
-
import { useTimeout as it } from "./hooks/timeout.mjs";
|
|
11
|
+
import { default as C } from "./components/modal/DetailModal.vue.mjs";
|
|
12
|
+
import { default as L } from "./components/form/FormMain.vue.mjs";
|
|
13
|
+
import { default as S } from "./components/form/FormRadioGroup.vue.mjs";
|
|
14
|
+
import { default as D } from "./components/form/FormSelect.vue.mjs";
|
|
15
|
+
import { default as b } from "./components/form/FormTree.vue.mjs";
|
|
16
|
+
import { default as N } from "./components/form/FormVerifyCode.vue.mjs";
|
|
17
|
+
import { default as G } from "./components/menu/MenuItemSub.vue.mjs";
|
|
18
|
+
import { default as v } from "./components/menu/MenuTree.vue.mjs";
|
|
19
|
+
import { default as U } from "./components/display/TabsMain.vue.mjs";
|
|
20
|
+
import { default as k } from "./components/misc/TriggerAutoImport.vue.mjs";
|
|
21
|
+
import { default as K } from "./components/display/WatchSize.vue.mjs";
|
|
22
|
+
import { APP_API_LIST_MODEL_KEY_CONFIG as X } from "./config/list-model.mjs";
|
|
23
|
+
import { default as Q } from "./components/misc/AutoRefresh.vue.mjs";
|
|
24
|
+
import { BODY_CONTENT_VIEWPORT_HEIGHT as q } from "./inject/key.mjs";
|
|
25
|
+
import { default as Z } from "./components/modal/ConfirmModal.vue.mjs";
|
|
26
|
+
import { EXPORT_MAX_LIMIT as ee, OPERATE_COLUMN_PROP as te, exportCSV as oe, pickExportColumns as re } from "./utils/export.mjs";
|
|
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 ie, generateFormData as pe, getBlurSubmit as ne, getChangeSubmit as xe, getDatePickerSwiftOptions 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 Fe } from "./components/form/utils.mjs";
|
|
29
|
+
import { default as Re } from "./components/form/FormDatePicker.vue.mjs";
|
|
30
|
+
import { default as Oe } from "./components/form/FormSearch.vue.mjs";
|
|
31
|
+
import { default as Pe } from "./components/form/FormVerifyImage.vue.mjs";
|
|
32
|
+
import { default as ye } from "./components/list-page/ListPage.vue.mjs";
|
|
33
|
+
import { ROUTE_MODULE_LEVEL as he, TabsMainReplaceQueryKey as Ne } from "./config/route.mjs";
|
|
34
|
+
import { default as Ge } from "./components/table/TableMain.vue.mjs";
|
|
35
|
+
import { countAll as ve, createListApi as Be, fetchListAll as Ue } from "./helpers/list-helper.mjs";
|
|
36
|
+
import { createGenerateRouteMetaRawTree as ke } from "./helpers/route.mjs";
|
|
37
|
+
import { createStorageWithNamespace as Ke } from "./helpers/storage.mjs";
|
|
38
|
+
import { createUseState as Xe } from "./helpers/state.mjs";
|
|
39
|
+
import { flatRouteMetaResolveRaw as Qe, getRoutePermissionKey as je } from "./utils/router.mjs";
|
|
40
|
+
import { getId as Je } from "./utils/id.mjs";
|
|
41
|
+
import { timeCountDown as $e } from "./utils/time.mjs";
|
|
42
|
+
import { useActivated as tt, useActivatedEvent as ot, useActivatedExec as rt } from "./hooks/activated.mjs";
|
|
43
|
+
import { useFeelSize as mt } from "./hooks/feel-size.mjs";
|
|
44
|
+
import { useMenusDataDispatch as st } from "./hooks/menus-dispatch.mjs";
|
|
45
|
+
import { useTimeout as ut } from "./hooks/timeout.mjs";
|
|
47
46
|
const c = {
|
|
48
47
|
install(e) {
|
|
49
48
|
e.use(t), e.use(o), e.use(r), e.use(a), e.use(m), e.use(f), e.use(s);
|
|
50
49
|
}
|
|
51
50
|
};
|
|
52
51
|
export {
|
|
53
|
-
|
|
52
|
+
X as APP_API_LIST_MODEL_KEY_CONFIG,
|
|
54
53
|
E as ActionButton,
|
|
55
54
|
M as ActionButtonDanger,
|
|
56
55
|
A as ActionButtonWarn,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
N as
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
v as
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
K as
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
Ye as createUseState,
|
|
56
|
+
Q as AutoRefresh,
|
|
57
|
+
q as BODY_CONTENT_VIEWPORT_HEIGHT,
|
|
58
|
+
Z as ConfirmModal,
|
|
59
|
+
C as DetailModal,
|
|
60
|
+
ee as EXPORT_MAX_LIMIT,
|
|
61
|
+
me as FORM_CONFIG_SELECT_ALL_VALUE,
|
|
62
|
+
ie as FORM_ITEM_CHANGE_LOADING,
|
|
63
|
+
Re as FormDatePicker,
|
|
64
|
+
L as FormMain,
|
|
65
|
+
S as FormRadioGroup,
|
|
66
|
+
Oe as FormSearch,
|
|
67
|
+
D as FormSelect,
|
|
68
|
+
b as FormTree,
|
|
69
|
+
N as FormVerifyCode,
|
|
70
|
+
Pe as FormVerifyImage,
|
|
71
|
+
ye as ListPage,
|
|
72
|
+
G as MenuItemSub,
|
|
73
|
+
v as MenuTree,
|
|
74
|
+
te as OPERATE_COLUMN_PROP,
|
|
75
|
+
he as ROUTE_MODULE_LEVEL,
|
|
76
|
+
Ge as TableMain,
|
|
77
|
+
U as TabsMain,
|
|
78
|
+
Ne as TabsMainReplaceQueryKey,
|
|
79
|
+
k as TriggerAutoImport,
|
|
80
|
+
K as WatchSize,
|
|
81
|
+
ve as countAll,
|
|
82
|
+
ke as createGenerateRouteMetaRawTree,
|
|
83
|
+
Be as createListApi,
|
|
84
|
+
Ke as createStorageWithNamespace,
|
|
85
|
+
Xe as createUseState,
|
|
88
86
|
r as displayInstall,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
oe as exportCSV,
|
|
88
|
+
Ue as fetchListAll,
|
|
89
|
+
Qe as flatRouteMetaResolveRaw,
|
|
92
90
|
t as formInstall,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
91
|
+
pe as generateFormData,
|
|
92
|
+
ne as getBlurSubmit,
|
|
93
|
+
xe as getChangeSubmit,
|
|
94
|
+
fe as getConfirmPasswordRule,
|
|
95
|
+
de as getDatePickerSwiftOptions,
|
|
96
|
+
ce as getEnterSubmit,
|
|
97
|
+
Je as getId,
|
|
98
|
+
Ie as getPlaceholder,
|
|
99
|
+
je as getRoutePermissionKey,
|
|
100
|
+
ge as getVModelSugar,
|
|
103
101
|
c as installComponents,
|
|
104
102
|
s as listPageInstall,
|
|
105
103
|
o as menuInstall,
|
|
106
104
|
a as miscInstall,
|
|
107
105
|
m as modalInstall,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
106
|
+
Ee as parseFormData,
|
|
107
|
+
se as passwordRule,
|
|
108
|
+
re as pickExportColumns,
|
|
109
|
+
_e as resolveFormLayout,
|
|
110
|
+
le as setFormComponentType,
|
|
111
|
+
Me as setInputComponent,
|
|
112
|
+
Te as setSelectComponent,
|
|
113
|
+
Ae as stringifyFormData,
|
|
114
|
+
Fe as swiftFormItemConfig,
|
|
116
115
|
f as tableInstall,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
116
|
+
$e as timeCountDown,
|
|
117
|
+
tt as useActivated,
|
|
118
|
+
ot as useActivatedEvent,
|
|
119
|
+
rt as useActivatedExec,
|
|
120
|
+
mt as useFeelSize,
|
|
121
|
+
st as useMenusDataDispatch,
|
|
122
|
+
ut as useTimeout
|
|
124
123
|
};
|
package/es/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-item-tip[data-v-
|
|
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}.form-date-picker[data-v-cefb4529]{display:flex;align-items:center}.form-date-picker-input[data-v-cefb4529]{width:50%}.form-date-picker-swift[data-v-cefb4529]{width:50%;padding-left:12px;display:flex;align-items:center;gap:8px;flex-wrap:nowrap}.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-alpha.
|
|
3
|
+
"version": "0.1.1-alpha.7",
|
|
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": "0913db96acb29bd299cdfd5cd3aebb3ca0fd85a9"
|
|
81
81
|
}
|
|
@@ -1,23 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
import { OptionItem } from './types';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
+
modelValue: import('vue').PropType<OptionItem["value"]>;
|
|
5
|
+
notNull: {
|
|
6
|
+
type: globalThis.PropType<boolean>;
|
|
7
|
+
default: boolean;
|
|
8
|
+
};
|
|
9
|
+
mode: {
|
|
10
|
+
type: globalThis.PropType<"radio" | "buttonGroup">;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
2
13
|
options: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
14
|
+
type: globalThis.PropType<OptionItem[]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
18
|
+
modelValue: import('vue').PropType<OptionItem["value"]>;
|
|
19
|
+
notNull: {
|
|
20
|
+
type: globalThis.PropType<boolean>;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
mode: {
|
|
24
|
+
type: globalThis.PropType<"radio" | "buttonGroup">;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
8
27
|
options: {
|
|
9
|
-
|
|
10
|
-
value: string | number;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
}[];
|
|
13
|
-
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
14
|
-
export default _default;
|
|
15
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
17
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
-
} : {
|
|
20
|
-
type: import('vue').PropType<T[K]>;
|
|
28
|
+
type: globalThis.PropType<OptionItem[]>;
|
|
21
29
|
required: true;
|
|
22
30
|
};
|
|
23
|
-
}
|
|
31
|
+
}>> & Readonly<{}>, {
|
|
32
|
+
notNull: boolean;
|
|
33
|
+
mode: "radio" | "buttonGroup";
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
35
|
+
export default _default;
|
|
@@ -2,7 +2,6 @@ import { Plugin } from 'vue';
|
|
|
2
2
|
import { default as FormMain } from './FormMain.vue';
|
|
3
3
|
import { default as FormSelect } from './FormSelect.vue';
|
|
4
4
|
import { default as FormRadioGroup } from './FormRadioGroup.vue';
|
|
5
|
-
import { default as FormRadio } from './FormRadio.vue';
|
|
6
5
|
import { default as FormTree } from './FormTree.vue';
|
|
7
6
|
import { default as FormSearch } from './FormSearch.vue';
|
|
8
7
|
import { default as FormVerifyImage } from './FormVerifyImage.vue';
|
|
@@ -11,5 +10,5 @@ import { default as FormDatePicker } from './FormDatePicker.vue';
|
|
|
11
10
|
|
|
12
11
|
export * from './types';
|
|
13
12
|
export * from './utils';
|
|
14
|
-
export { FormMain, FormSelect, FormSearch, FormRadioGroup,
|
|
13
|
+
export { FormMain, FormSelect, FormSearch, FormRadioGroup, FormTree, FormVerifyImage, FormVerifyCode, FormDatePicker, };
|
|
15
14
|
export declare const formInstall: Plugin;
|
|
@@ -50,6 +50,11 @@ SV extends PK extends keyof SO ? SO[PK] : PV = PK extends keyof SO ? SO[PK] : PV
|
|
|
50
50
|
key: PK;
|
|
51
51
|
/** 表单项label */
|
|
52
52
|
label: string;
|
|
53
|
+
/**
|
|
54
|
+
* 隐藏 label 且不占位(label-wrap 整体 display:none,表单元素顶满整行)。
|
|
55
|
+
* 仅当 label 有值时生效——无 label 时 element-plus 会给 content 加 margin-left 留白,需改用 labelWidth:0。
|
|
56
|
+
*/
|
|
57
|
+
labelHide?: boolean;
|
|
53
58
|
/** 提示信息 */
|
|
54
59
|
tip?: string | (() => VNode);
|
|
55
60
|
/** 表单布局 优先级高于FormMain同名属性 */
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { DateTimeRangeSwiftOption, FormItemConfig, FormItemConfigList, ExtractFormStringifyFromObject, FormItemConfigSwiftOptions } from './types';
|
|
2
|
+
import { ColProps } from 'element-plus';
|
|
2
3
|
|
|
4
|
+
/**
|
|
5
|
+
* 将 layout 解析为各屏幕尺寸的显式值:
|
|
6
|
+
* - 配置 span: xxx 时,xs/sm/md/lg/xl 默认全部视为 xxx
|
|
7
|
+
* - 单独设置某个尺寸则该尺寸覆盖 span 推导值
|
|
8
|
+
*/
|
|
9
|
+
export declare const resolveFormLayout: (layout?: Partial<ColProps>) => Partial<ColProps>;
|
|
3
10
|
/** 获取日期选择器默认快捷选项:今日、昨日、近7日 */
|
|
4
11
|
export declare const getDatePickerSwiftOptions: () => DateTimeRangeSwiftOption[];
|
|
5
12
|
/**
|
|
@@ -15,8 +15,6 @@ declare const _default: <T extends Record<string, any>, PO extends Record<string
|
|
|
15
15
|
} & Pick<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListPageInnerInjectInfo<PO, F>>, import('./types').TableMainRequiredKey> & Partial<Pick<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListPageInnerInjectInfo<PO, F>>, import('./types').TableMainOptionsKey>> & {
|
|
16
16
|
tableMainProps?: Partial<Omit<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListPageInnerInjectInfo<PO, F>>, import('./types').TableMainOptionsKey | import('./types').TableMainRewriteKey>> | undefined;
|
|
17
17
|
} & {
|
|
18
|
-
showOperation?: boolean;
|
|
19
|
-
showHeader?: boolean;
|
|
20
18
|
list?: FormItemConfigList<PO, SO> | undefined;
|
|
21
19
|
api: (params: import('../table').TableApiParams<import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ>) => Promise<import('../table').TableApiResult<T>>;
|
|
22
20
|
query?: SQ | undefined;
|
|
@@ -24,10 +24,6 @@ F extends Record<string, any>> = Partial<Pick<FormSearchProps<PO, SO, {}>, FormS
|
|
|
24
24
|
} & Pick<TableMainProps<T, ExtractFormStringifyFromObject<PO, SO> & SQ, ListPageInnerInjectInfo<PO, F>>, TableMainRequiredKey> & Partial<Pick<TableMainProps<T, ExtractFormStringifyFromObject<PO, SO> & SQ, ListPageInnerInjectInfo<PO, F>>, TableMainOptionsKey>> & {
|
|
25
25
|
tableMainProps?: Partial<Omit<TableMainProps<T, ExtractFormStringifyFromObject<PO, SO> & SQ, ListPageInnerInjectInfo<PO, F>>, TableMainOptionsKey | TableMainOptionsKey | TableMainRewriteKey>>;
|
|
26
26
|
} & {
|
|
27
|
-
/** 是否展示操作区 */
|
|
28
|
-
showOperation?: boolean;
|
|
29
|
-
/** 是否展示头部区 */
|
|
30
|
-
showHeader?: boolean;
|
|
31
27
|
list?: FormItemConfigList<PO, SO>;
|
|
32
28
|
/** api */
|
|
33
29
|
api: (params: TableApiParams<ExtractFormStringifyFromObject<PO, SO> & SQ>) => Promise<TableApiResult<T>>;
|
|
@@ -1,69 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { OptionItem } from './types';
|
|
2
|
-
|
|
3
|
-
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
-
modelValue: import('vue').PropType<OptionItem["value"]>;
|
|
5
|
-
list: {
|
|
6
|
-
type: globalThis.PropType<OptionItem[]>;
|
|
7
|
-
required: true;
|
|
8
|
-
};
|
|
9
|
-
notNull: {
|
|
10
|
-
type: globalThis.PropType<boolean>;
|
|
11
|
-
default: boolean;
|
|
12
|
-
};
|
|
13
|
-
mode: {
|
|
14
|
-
type: globalThis.PropType<"radio" | "buttonGroup">;
|
|
15
|
-
default: string;
|
|
16
|
-
};
|
|
17
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
18
|
-
modelValue: import('vue').PropType<OptionItem["value"]>;
|
|
19
|
-
list: {
|
|
20
|
-
type: globalThis.PropType<OptionItem[]>;
|
|
21
|
-
required: true;
|
|
22
|
-
};
|
|
23
|
-
notNull: {
|
|
24
|
-
type: globalThis.PropType<boolean>;
|
|
25
|
-
default: boolean;
|
|
26
|
-
};
|
|
27
|
-
mode: {
|
|
28
|
-
type: globalThis.PropType<"radio" | "buttonGroup">;
|
|
29
|
-
default: string;
|
|
30
|
-
};
|
|
31
|
-
}>> & Readonly<{}>, {
|
|
32
|
-
notNull: boolean;
|
|
33
|
-
mode: "radio" | "buttonGroup";
|
|
34
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
35
|
-
export default _default;
|