@wyfex/ivue 0.19.3 → 0.20.0
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/README.md +7 -1
- package/dist/index.es.js +9 -9
- package/dist/index.umd.cjs +6 -6
- package/dist/ivue.css +1 -1
- package/dist/types/{UseCrudTable → UseCrud}/defaultExtConfig.d.ts +10 -0
- package/dist/types/UseCrud/hook.d.ts +11 -0
- package/dist/types/{UseCrudTable → UseCrud}/index.vue.d.ts +15 -13
- package/dist/types/UseCrud/props.d.ts +13 -0
- package/dist/types/UseCrud/types.d.ts +78 -0
- package/dist/types/UseCrud/utils.d.ts +48 -0
- package/dist/types/UseElButton/index.vue.d.ts +1 -1
- package/dist/types/UseElCheckbox/index.vue.d.ts +1 -1
- package/dist/types/UseElConfigProvider/types.d.ts +4 -0
- package/dist/types/UseElDatePicker/index.vue.d.ts +5 -5
- package/dist/types/UseElDatePicker/types.d.ts +2 -2
- package/dist/types/UseElDescriptions/index.vue.d.ts +1 -1
- package/dist/types/UseElDialog/hook.d.ts +1 -0
- package/dist/types/UseElDialog/index.vue.d.ts +19 -1
- package/dist/types/UseElDialog/props.d.ts +8 -0
- package/dist/types/UseElDrawer/index.vue.d.ts +10 -1
- package/dist/types/UseElDrawer/props.d.ts +4 -0
- package/dist/types/UseElForm/components/QueryForm.vue.d.ts +1 -1
- package/dist/types/UseElForm/components/RowForm.vue.d.ts +1 -1
- package/dist/types/UseElForm/index.vue.d.ts +1 -1
- package/dist/types/UseElForm/types.d.ts +1 -2
- package/dist/types/UseElInput/index.vue.d.ts +14 -14
- package/dist/types/UseElInput/props.d.ts +5 -5
- package/dist/types/UseElSelect/index.vue.d.ts +5 -5
- package/dist/types/UseElTable/defaultExtConfig.d.ts +1 -1
- package/dist/types/UseElTable/index.vue.d.ts +2 -2
- package/dist/types/UseElTable/types.d.ts +9 -10
- package/dist/types/UseElTimeSelect/index.vue.d.ts +28 -0
- package/dist/types/UseElTimeSelect/props.d.ts +13 -0
- package/dist/types/UseElTimeSelect/types.d.ts +6 -0
- package/dist/types/UseRender/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +2 -1
- package/package.json +11 -11
- package/src/components/UseCrud/defaultExtConfig.ts +16 -0
- package/src/components/UseCrud/props.ts +25 -0
- package/src/components/UseCrud/types.ts +161 -0
- package/src/components/UseElButton/types.ts +12 -37
- package/src/components/UseElCheckbox/types.ts +1 -1
- package/src/components/UseElConfigProvider/types.ts +14 -13
- package/src/components/UseElDatePicker/types.ts +3 -3
- package/src/components/UseElDialog/props.ts +16 -2
- package/src/components/UseElDrawer/props.ts +7 -0
- package/src/components/UseElForm/types.ts +3 -10
- package/src/components/UseElTable/types.ts +92 -183
- package/src/components/UseElTimeSelect/props.ts +22 -0
- package/src/components/UseElTimeSelect/types.ts +15 -0
- package/src/types/index.ts +8 -0
- package/dist/types/UseCrudTable/components/ActionBar.vue.d.ts +0 -20
- package/dist/types/UseCrudTable/hook.d.ts +0 -18
- package/dist/types/UseCrudTable/props.d.ts +0 -18
- package/dist/types/UseCrudTable/types.d.ts +0 -32
- package/dist/types/UseCrudTable/utils.d.ts +0 -2
- package/src/components/UseCrudTable/defaultExtConfig.ts +0 -28
- package/src/components/UseCrudTable/props.ts +0 -32
- package/src/components/UseCrudTable/types.ts +0 -71
- /package/dist/types/UseElForm/components/controls/{TimeSelect.vue.d.ts → TimeSelectRange.vue.d.ts} +0 -0
|
@@ -24,14 +24,6 @@ export interface Edit {
|
|
|
24
24
|
component: Component;
|
|
25
25
|
attrs?: EditAttrs;
|
|
26
26
|
}
|
|
27
|
-
export interface TableColumnExtConfig {
|
|
28
|
-
header?: Header;
|
|
29
|
-
edit?: Edit;
|
|
30
|
-
formatter?: Function;
|
|
31
|
-
class?: string | string[];
|
|
32
|
-
style?: string | Record<string, unknown>;
|
|
33
|
-
slot?: boolean | string;
|
|
34
|
-
}
|
|
35
27
|
export interface TableColumn {
|
|
36
28
|
label?: string;
|
|
37
29
|
prop?: string;
|
|
@@ -43,7 +35,14 @@ export interface TableColumn {
|
|
|
43
35
|
fixed?: boolean | string;
|
|
44
36
|
sortable?: boolean;
|
|
45
37
|
showOverflowTooltip?: boolean;
|
|
46
|
-
extConfig?:
|
|
38
|
+
extConfig?: {
|
|
39
|
+
header?: Header;
|
|
40
|
+
edit?: Edit;
|
|
41
|
+
formatter?: Function;
|
|
42
|
+
class?: string | string[];
|
|
43
|
+
style?: string | Record<string, unknown>;
|
|
44
|
+
slot?: boolean | string;
|
|
45
|
+
};
|
|
47
46
|
children?: TableColumn[];
|
|
48
47
|
}
|
|
49
48
|
export interface Selection {
|
|
@@ -94,7 +93,7 @@ export interface ExtConfig {
|
|
|
94
93
|
pagination?: {
|
|
95
94
|
total?: number;
|
|
96
95
|
marginTop?: number;
|
|
97
|
-
position?:
|
|
96
|
+
position?: 'left' | 'center' | 'right';
|
|
98
97
|
pageSizes?: number[];
|
|
99
98
|
background?: boolean;
|
|
100
99
|
layout?: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
useRender: {
|
|
7
|
+
type: import('vue').PropType<boolean | import('../../types').RenderConfig>;
|
|
8
|
+
default: boolean;
|
|
9
|
+
};
|
|
10
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
|
+
"update:modelValue": (value: string | number | any[]) => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
useRender: {
|
|
18
|
+
type: import('vue').PropType<boolean | import('../../types').RenderConfig>;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{
|
|
22
|
+
"onUpdate:modelValue"?: ((value: string | number | any[]) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
useRender: boolean | import('../../types').RenderConfig;
|
|
25
|
+
modelValue: string;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { RenderConfig } from '../../types';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
useRender: {
|
|
9
|
+
type: PropType<boolean | RenderConfig>;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
@@ -50,9 +50,9 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
50
50
|
};
|
|
51
51
|
}>> & Readonly<{}>, {
|
|
52
52
|
class: string;
|
|
53
|
+
separator: string;
|
|
53
54
|
style: string | Record<string, any>;
|
|
54
55
|
emptyText: string;
|
|
55
|
-
separator: string;
|
|
56
56
|
parseKey: string;
|
|
57
57
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
58
58
|
declare const _default: typeof __VLS_export;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as UseCrud } from './UseCrud/index.vue';
|
|
2
2
|
export { default as UseElButton } from './UseElButton/index.vue';
|
|
3
3
|
export { default as UseElCheckbox } from './UseElCheckbox/index.vue';
|
|
4
4
|
export { default as UseElConfigProvider } from './UseElConfigProvider/index.vue';
|
|
@@ -11,6 +11,7 @@ export { default as UseElInput } from './UseElInput/index.vue';
|
|
|
11
11
|
export { default as UseElSelect } from './UseElSelect/index.vue';
|
|
12
12
|
export { default as UseElSwitch } from './UseElSwitch/index.vue';
|
|
13
13
|
export { default as UseElTable } from './UseElTable/index.vue';
|
|
14
|
+
export { default as UseElTimeSelect } from './UseElTimeSelect/index.vue';
|
|
14
15
|
export { default as UseElTooltip } from './UseElTooltip/index.vue';
|
|
15
16
|
export { default as UseElUpload } from './UseElUpload/index.vue';
|
|
16
17
|
export { default as UseIconfont } from './UseIconfont/index.vue';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wyfex/ivue",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "万有前端 X 体系下基于 Vite8 + Vue3 + Typescript6 + ElementPlus2
|
|
3
|
+
"version": "0.20.0",
|
|
4
|
+
"description": "万有前端 X 体系下基于 Vite8 + Vue3 + Typescript6 + ElementPlus2 构建的高性能组件库",
|
|
5
5
|
"homepage": "https://wyfex.top/idocs/ivue",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.umd.cjs",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"wyfex",
|
|
38
38
|
"ivue",
|
|
39
39
|
"wyfex-ivue",
|
|
40
|
-
"万有前端",
|
|
40
|
+
"万有前端 X",
|
|
41
41
|
"万有前端 X ·iVue"
|
|
42
42
|
],
|
|
43
43
|
"author": "Symbol(王独秀) <963569210@qq.com>",
|
|
@@ -50,20 +50,20 @@
|
|
|
50
50
|
"vue": ">=3.2.0 <4.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@types/node": "^26.1.
|
|
54
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
53
|
+
"@types/node": "^26.1.2",
|
|
54
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
55
55
|
"@vue/tsconfig": "^0.9.1",
|
|
56
|
-
"@wyfex/iutils": "^0.
|
|
56
|
+
"@wyfex/iutils": "^0.55.0",
|
|
57
57
|
"dayjs": "^1.11.21",
|
|
58
|
-
"element-plus": "^2.14.
|
|
58
|
+
"element-plus": "^2.14.3",
|
|
59
59
|
"sass-embedded": "^1.100.0",
|
|
60
60
|
"typescript": "~6.0.3",
|
|
61
|
-
"unplugin-auto-import": "^21.
|
|
61
|
+
"unplugin-auto-import": "^21.1.0",
|
|
62
62
|
"unplugin-dts": "^1.0.3",
|
|
63
63
|
"unplugin-vue-components": "^32.1.0",
|
|
64
|
-
"vite": "^8.1
|
|
64
|
+
"vite": "^8.2.1",
|
|
65
65
|
"vite-svg-loader": "^5.1.1",
|
|
66
|
-
"vue": "^3.5.
|
|
67
|
-
"vue-tsc": "^3.3.
|
|
66
|
+
"vue": "^3.5.41",
|
|
67
|
+
"vue-tsc": "^3.3.9"
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { MergedExtConfig } from './types'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 默认扩展配置
|
|
5
|
+
*/
|
|
6
|
+
export default {
|
|
7
|
+
crudFetch: { queryImmediate: true, autoCancelQueryStrategy: 'unmount' },
|
|
8
|
+
mode: { type: 'PAGE' },
|
|
9
|
+
actionBar: {
|
|
10
|
+
margin: '20px 0',
|
|
11
|
+
showControlFormDisplayBtn: true,
|
|
12
|
+
reverse: false,
|
|
13
|
+
divider: { show: false, borderStyle: 'solid' }
|
|
14
|
+
},
|
|
15
|
+
modal: { type: 'Drawer' }
|
|
16
|
+
} satisfies MergedExtConfig
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PropType } from 'vue'
|
|
2
|
+
import type { Configs, MergedExtConfig } from './types'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 组件props
|
|
6
|
+
*/
|
|
7
|
+
export default {
|
|
8
|
+
/**
|
|
9
|
+
* 配置 必传
|
|
10
|
+
* 1、该configs是【formColumns】和【tableColumns】的统一配置入口
|
|
11
|
+
* 2、该configs在【formColumns】和【tableColumns】的配置基础上新增了【queryLabel】、【onlySearch】和【tableOrder】配置项用于兼容特殊应用场景
|
|
12
|
+
*/
|
|
13
|
+
configs: {
|
|
14
|
+
type: Array as PropType<Configs[]>,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
/**
|
|
18
|
+
* 扩展配置 如【操作栏/弹窗】等
|
|
19
|
+
* 该extConfig是本组件extConfig和UseElTable组件extConfig合并后的扩展配置
|
|
20
|
+
*/
|
|
21
|
+
extConfig: {
|
|
22
|
+
type: Object as PropType<MergedExtConfig>,
|
|
23
|
+
default: () => ({})
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
Component,
|
|
3
|
+
ComputedRef,
|
|
4
|
+
ExtractPropTypes,
|
|
5
|
+
Ref,
|
|
6
|
+
ShallowRef
|
|
7
|
+
} from 'vue'
|
|
8
|
+
import componentProps from './props'
|
|
9
|
+
import type { FormColumn } from '../UseElForm/types'
|
|
10
|
+
import type {
|
|
11
|
+
TableColumn,
|
|
12
|
+
ExtConfig as TableExtConfig
|
|
13
|
+
} from '../UseElTable/types'
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* props类型
|
|
17
|
+
*/
|
|
18
|
+
export type Props = ExtractPropTypes<typeof componentProps>
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* emits类型
|
|
22
|
+
*/
|
|
23
|
+
export type Emits = {
|
|
24
|
+
/** dictKeys事件 */
|
|
25
|
+
(e: 'onDictKeys', value?: string[]): void
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 基础配置类型
|
|
30
|
+
*/
|
|
31
|
+
export type BaseConfigs = FormColumn & TableColumn
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 配置项接口
|
|
35
|
+
*/
|
|
36
|
+
export interface Configs extends BaseConfigs {
|
|
37
|
+
/** 查询表单项标签 当查询表单项标签和表格项标签不一致使使用 */
|
|
38
|
+
queryLabel?: string
|
|
39
|
+
/** 查询表单项属性 当查询表单项属性和表格项属性不一致使使用,可传以逗号分隔的字符串,组件内部自动拆解*/
|
|
40
|
+
queryProp?: string
|
|
41
|
+
/** 是否仅搜索 */
|
|
42
|
+
onlySearch?: boolean
|
|
43
|
+
/** 表格排序 */
|
|
44
|
+
tableOrder?: number
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 分割线配置接口
|
|
49
|
+
*/
|
|
50
|
+
export interface Divider {
|
|
51
|
+
/** 是否显示分割线 */
|
|
52
|
+
show?: boolean
|
|
53
|
+
/** 分割线边框样式 */
|
|
54
|
+
borderStyle?: 'none' | 'solid' | 'hidden' | 'dashed'
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 操作栏配置接口
|
|
59
|
+
*/
|
|
60
|
+
export interface ActionBar {
|
|
61
|
+
/** 操作栏外边距 */
|
|
62
|
+
margin?: string
|
|
63
|
+
/** 是否显示【收起/展开查询】按钮 */
|
|
64
|
+
showControlFormDisplayBtn?: boolean
|
|
65
|
+
/** 【收起/展开查询】按钮展开时图标 */
|
|
66
|
+
controlFormDisplayBtnWithOpenedIcon?: Component
|
|
67
|
+
/** 【收起/展开查询】按钮收起时图标 */
|
|
68
|
+
controlFormDisplayBtnWithClosedIcon?: Component
|
|
69
|
+
/** 是否反转操作栏按钮 仅showControlFormDisplayBtn为true时生效 */
|
|
70
|
+
reverse?: boolean
|
|
71
|
+
/** 操作栏底部分割线 */
|
|
72
|
+
divider?: Divider
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* extConfig接口
|
|
77
|
+
*/
|
|
78
|
+
export interface ExtConfig {
|
|
79
|
+
/** 增删改查请求配置项 */
|
|
80
|
+
crudFetch?: {
|
|
81
|
+
/** 查询api */
|
|
82
|
+
queryApi?: Function
|
|
83
|
+
/** 是否立即查询 */
|
|
84
|
+
queryImmediate?: boolean
|
|
85
|
+
/** 自动取消查询策略 配合signal实现接口取消请求 */
|
|
86
|
+
autoCancelQueryStrategy?: 'none' | 'unmount' | 'deactivate' | 'both'
|
|
87
|
+
/** 开始查询前钩子 用于注入字典数据等 */
|
|
88
|
+
onQueryBefore?: (done: () => void) => void
|
|
89
|
+
/** 查询错误钩子 */
|
|
90
|
+
onQueryError?: (err: any) => void
|
|
91
|
+
/** 删除api */
|
|
92
|
+
deleteApi?: Function
|
|
93
|
+
}
|
|
94
|
+
/** 操作栏配置项 */
|
|
95
|
+
actionBar?: ActionBar
|
|
96
|
+
/** 弹窗配置项 */
|
|
97
|
+
modal?: {
|
|
98
|
+
/** 弹窗类型 支持Drawer和Dialog */
|
|
99
|
+
type?: 'Drawer' | 'Dialog'
|
|
100
|
+
/** 其他配置项由于组件内部已进行v-bind透传,故不在此重复声明接口,详见UseElDrawer和UseElDialog组件types */
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* 合并后的extConfig类型 本组件ExtConfig和UseElTable组件ExtConfig合并
|
|
106
|
+
*/
|
|
107
|
+
export type MergedExtConfig = ExtConfig & TableExtConfig
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Crud状态类型
|
|
111
|
+
*/
|
|
112
|
+
export interface UseCrudState {
|
|
113
|
+
/** 表单列配置 */
|
|
114
|
+
formColumns: FormColumn[]
|
|
115
|
+
/** 表格列配置 */
|
|
116
|
+
tableColumns: TableColumn[]
|
|
117
|
+
/** 表单模型 查询表单的原始数据模型 */
|
|
118
|
+
formModel: Record<string, any>
|
|
119
|
+
/** 表单参数 查询表单提交接口的数据参数 */
|
|
120
|
+
formParams: Record<string, any>
|
|
121
|
+
/** 表格loading */
|
|
122
|
+
tableLoading: boolean
|
|
123
|
+
/** 表格数据 */
|
|
124
|
+
tableData: any[]
|
|
125
|
+
/** 当前页码 */
|
|
126
|
+
currentPage: number
|
|
127
|
+
/** 分页大小 */
|
|
128
|
+
pageSize: number
|
|
129
|
+
/** 分页总数 */
|
|
130
|
+
total: number
|
|
131
|
+
/** 字典映射 */
|
|
132
|
+
dictMap: Record<string, any>
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Crud返回类型
|
|
137
|
+
*/
|
|
138
|
+
export interface UseCrudReturn {
|
|
139
|
+
state: Ref<UseCrudState>
|
|
140
|
+
heightComputed: ComputedRef<string>
|
|
141
|
+
fetchTableData: (
|
|
142
|
+
options?: { params?: Record<string, any>; isPageApi?: boolean },
|
|
143
|
+
cb?: () => void
|
|
144
|
+
) => Promise<any>
|
|
145
|
+
onQuery: (e: Record<string, unknown>, done?: () => void) => void
|
|
146
|
+
onCancelQueryRequest: () => void
|
|
147
|
+
handleDelete: (
|
|
148
|
+
payload: { id?: string | number; ids?: string | Array<string | number> },
|
|
149
|
+
loadingConfig: { source?: Record<string, unknown>; key?: string },
|
|
150
|
+
successCb?: () => void,
|
|
151
|
+
errorCb?: (err: unknown) => void,
|
|
152
|
+
successMsg?: string
|
|
153
|
+
) => Promise<void>
|
|
154
|
+
margin: ComputedRef<string | undefined>
|
|
155
|
+
actionBar: any
|
|
156
|
+
handleDisplayQueryForm: () => void
|
|
157
|
+
showModal: Ref<boolean>
|
|
158
|
+
modalComponent: ShallowRef<Component | null>
|
|
159
|
+
handleShowModal: () => Promise<void>
|
|
160
|
+
handleCloseModal: ComputedRef<() => void>
|
|
161
|
+
}
|
|
@@ -10,9 +10,7 @@ export type Props = ExtractPropTypes<typeof componentProps>
|
|
|
10
10
|
* emits类型
|
|
11
11
|
*/
|
|
12
12
|
export type Emits = {
|
|
13
|
-
/**
|
|
14
|
-
* 点击事件 默认自带防抖
|
|
15
|
-
*/
|
|
13
|
+
/** 点击事件 默认自带防抖 */
|
|
16
14
|
(e: 'click', value?: string | number | Record<string, unknown>): void
|
|
17
15
|
}
|
|
18
16
|
|
|
@@ -20,31 +18,18 @@ export type Emits = {
|
|
|
20
18
|
* extConfig接口
|
|
21
19
|
*/
|
|
22
20
|
export interface ExtConfig {
|
|
23
|
-
/**
|
|
24
|
-
* 防抖配置项 无需防抖将delay设置为0即可
|
|
25
|
-
*/
|
|
21
|
+
/** 防抖配置项 无需防抖将delay设置为0即可 */
|
|
26
22
|
debounce?: {
|
|
27
|
-
/**
|
|
28
|
-
* 防抖时间
|
|
29
|
-
*/
|
|
23
|
+
/** 防抖时间 */
|
|
30
24
|
delay?: number
|
|
31
|
-
/**
|
|
32
|
-
* 是否立即开启防抖
|
|
33
|
-
*/
|
|
25
|
+
/** 是否立即开启防抖 */
|
|
34
26
|
immediate?: boolean
|
|
35
27
|
}
|
|
36
|
-
/**
|
|
37
|
-
* 二次确认配置项
|
|
38
|
-
*/
|
|
28
|
+
/** 二次确认配置项 */
|
|
39
29
|
confirm?: {
|
|
40
|
-
/**
|
|
41
|
-
* 二次确认数据 显式设置则开启二次确认
|
|
42
|
-
* 可为String、Number、Object、Array,无需传递数据则显式设置为null
|
|
43
|
-
*/
|
|
30
|
+
/** 二次确认数据 显式设置则开启二次确认,可为String、Number、Object、Array,无需传递数据则显式设置为null */
|
|
44
31
|
data?: string | number | Record<string, unknown> | unknown[] | null
|
|
45
|
-
/**
|
|
46
|
-
* 二次确认类型 同ElButton类型
|
|
47
|
-
*/
|
|
32
|
+
/** 二次确认类型 同ElButton类型 */
|
|
48
33
|
type?:
|
|
49
34
|
| 'default'
|
|
50
35
|
| 'primary'
|
|
@@ -53,25 +38,15 @@ export interface ExtConfig {
|
|
|
53
38
|
| 'danger'
|
|
54
39
|
| 'info'
|
|
55
40
|
| ''
|
|
56
|
-
/**
|
|
57
|
-
* 二次确认数据主键key 对象或对象数组需要
|
|
58
|
-
*/
|
|
41
|
+
/** 二次确认数据主键key 对象或对象数组需要 */
|
|
59
42
|
dataKey?: string
|
|
60
|
-
/**
|
|
61
|
-
* 是否将数组转换为以逗号分隔的字符串 如:[1,2] => '1,2'
|
|
62
|
-
*/
|
|
43
|
+
/** 是否将数组转换为以逗号分隔的字符串 如:[1,2] => '1,2' */
|
|
63
44
|
toJoin?: boolean
|
|
64
|
-
/**
|
|
65
|
-
* 是否追加s到dataKey后面 如:id => ids
|
|
66
|
-
*/
|
|
45
|
+
/** 是否追加s到dataKey后面 如:id => ids */
|
|
67
46
|
appendS?: boolean
|
|
68
|
-
/**
|
|
69
|
-
* 二次确认弹框标题
|
|
70
|
-
*/
|
|
47
|
+
/** 二次确认弹框标题 */
|
|
71
48
|
title?: string
|
|
72
|
-
/**
|
|
73
|
-
* 二次确认弹框内容
|
|
74
|
-
*/
|
|
49
|
+
/** 二次确认弹框内容 */
|
|
75
50
|
content?: string
|
|
76
51
|
}
|
|
77
52
|
}
|
|
@@ -11,25 +11,26 @@ export type Props = ExtractPropTypes<typeof componentProps>
|
|
|
11
11
|
* extConfig接口
|
|
12
12
|
*/
|
|
13
13
|
export interface ExtConfig {
|
|
14
|
-
/**
|
|
15
|
-
* 字典属性配置项
|
|
16
|
-
*/
|
|
14
|
+
/** 字典属性配置项 */
|
|
17
15
|
dictProps?: DictProps
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
/** crud配置项 */
|
|
17
|
+
crud?: {
|
|
18
|
+
/** crud表格页面高度 extConfig.mode.type='PAGE'时生效,显式设置则表格自适应高度不生效,否则默认使用表格自适应高度 */
|
|
19
|
+
pageHeight?: string
|
|
20
|
+
/** crud表格弹窗高度 extConfig.mode.type='MODAL'时生效,显式设置则表格自适应高度不生效,否则默认使用表格自适应高度 */
|
|
21
|
+
modalHeight?: string
|
|
22
|
+
}
|
|
23
|
+
/** 表格配置项 */
|
|
25
24
|
table?: {
|
|
25
|
+
/** 表格页面高度 extConfig.mode.type='PAGE'时生效,显式设置则表格自适应高度不生效,否则默认使用表格自适应高度 */
|
|
26
26
|
pageHeight?: string
|
|
27
|
+
/** 表格弹窗高度 extConfig.mode.type='MODAL'时生效,显式设置则表格自适应高度不生效,否则默认使用表格自适应高度 */
|
|
27
28
|
modalHeight?: string
|
|
29
|
+
/** 表格页面底部预留偏移 */
|
|
28
30
|
pageBottomOffset?: number
|
|
31
|
+
/** 表格弹窗底部预留偏移 */
|
|
29
32
|
modalBottomOffset?: number
|
|
30
33
|
}
|
|
31
|
-
/**
|
|
32
|
-
* 上传配置项
|
|
33
|
-
*/
|
|
34
|
+
/** 上传配置项 */
|
|
34
35
|
upload?: UploadConfig
|
|
35
36
|
}
|
|
@@ -7,9 +7,9 @@ import componentProps from './props'
|
|
|
7
7
|
export type Props = ExtractPropTypes<typeof componentProps>
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* emits
|
|
10
|
+
* emits类型
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
13
|
-
|
|
12
|
+
export type Emits = {
|
|
13
|
+
/** 更新value值 */
|
|
14
14
|
(e: 'update:modelValue', value: string | number | any[]): void
|
|
15
15
|
}
|
|
@@ -17,11 +17,18 @@ export default {
|
|
|
17
17
|
default: true
|
|
18
18
|
},
|
|
19
19
|
/**
|
|
20
|
-
* el-dialog
|
|
20
|
+
* el-dialog CSS 中的 margin-top 值 默认12dvh
|
|
21
|
+
*/
|
|
22
|
+
top: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: '12dvh'
|
|
25
|
+
},
|
|
26
|
+
/**
|
|
27
|
+
* el-dialog内容区域最大高度 默认为autoMax,内部自动根据浏览器高度进行计算最大高度
|
|
21
28
|
*/
|
|
22
29
|
maxHeight: {
|
|
23
30
|
type: [String, Number],
|
|
24
|
-
default: ''
|
|
31
|
+
default: 'autoCalcMaxHeight'
|
|
25
32
|
},
|
|
26
33
|
/**
|
|
27
34
|
* el-scrollbar不响应容器尺寸变化,如果容器尺寸不会发生变化,最好设置它可以优化性能
|
|
@@ -108,6 +115,13 @@ export default {
|
|
|
108
115
|
type: String,
|
|
109
116
|
default: '取消'
|
|
110
117
|
},
|
|
118
|
+
/**
|
|
119
|
+
* 确定按钮loading状态
|
|
120
|
+
*/
|
|
121
|
+
confirmLoading: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: false
|
|
124
|
+
},
|
|
111
125
|
/**
|
|
112
126
|
* 取消按钮类型
|
|
113
127
|
*/
|
|
@@ -11,9 +11,7 @@ export type Props = ExtractPropTypes<typeof componentProps>
|
|
|
11
11
|
* emits类型
|
|
12
12
|
*/
|
|
13
13
|
export type Emits = {
|
|
14
|
-
/**
|
|
15
|
-
* dictKeys事件
|
|
16
|
-
*/
|
|
14
|
+
/** dictKeys事件 */
|
|
17
15
|
(e: 'onDictKeys', value?: string[]): void
|
|
18
16
|
}
|
|
19
17
|
|
|
@@ -369,15 +367,10 @@ export interface FormColumn {
|
|
|
369
367
|
label?: string
|
|
370
368
|
/**
|
|
371
369
|
* el-form-item的prop
|
|
370
|
+
* 一般情况下为必传 为适配UseCrud组件类型特将此属性设置为非必传
|
|
372
371
|
* 可传以逗号分隔的字符串,组件内部自动拆解,如'startDate,endDate' => { startDate: xxx, endDate: yyy }
|
|
373
372
|
*/
|
|
374
|
-
prop
|
|
375
|
-
/**
|
|
376
|
-
* 查询prop
|
|
377
|
-
* 当查询表单(如起止时间字段拆分)和列表prop字段不一致时传入该配置项
|
|
378
|
-
* 可传以逗号分隔的字符串,组件内部自动拆解,亦可传入字符串数组
|
|
379
|
-
*/
|
|
380
|
-
queryProp?: string | string[]
|
|
373
|
+
prop?: string
|
|
381
374
|
/**
|
|
382
375
|
* 是否为必填项
|
|
383
376
|
* 如为boolean则使用基础必填校验
|