@wyfex/ivue 0.19.2 → 0.19.4
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/dist/index.es.js +12 -12
- package/dist/index.umd.cjs +12 -12
- package/dist/ivue.css +1 -1
- package/dist/types/{UseCrudTable → UseCrud}/defaultExtConfig.d.ts +6 -0
- package/dist/types/UseCrud/hook.d.ts +31 -0
- package/dist/types/{UseCrudTable → UseCrud}/index.vue.d.ts +6 -12
- package/dist/types/UseCrud/props.d.ts +13 -0
- package/dist/types/UseCrud/types.d.ts +33 -0
- package/dist/types/UseCrud/useCrudWithBusiness.d.ts +46 -0
- package/dist/types/UseElButton/index.vue.d.ts +1 -1
- package/dist/types/UseElCheckbox/index.vue.d.ts +1 -1
- package/dist/types/UseElCheckbox/types.d.ts +2 -2
- package/dist/types/UseElConfigProvider/types.d.ts +4 -0
- package/dist/types/UseElDatePicker/index.vue.d.ts +1 -1
- package/dist/types/UseElDescriptions/index.vue.d.ts +1 -1
- package/dist/types/UseElDialog/index.vue.d.ts +1 -1
- package/dist/types/UseElDrawer/index.vue.d.ts +2 -2
- package/dist/types/UseElForm/components/QueryForm.vue.d.ts +1 -3
- package/dist/types/UseElForm/components/RowForm.vue.d.ts +1 -3
- package/dist/types/UseElForm/index.vue.d.ts +1 -1
- package/dist/types/UseElForm/types.d.ts +20 -21
- package/dist/types/UseElInput/index.vue.d.ts +11 -11
- package/dist/types/UseElInput/props.d.ts +5 -5
- package/dist/types/UseElSelect/index.vue.d.ts +2 -2
- package/dist/types/UseElTable/defaultExtConfig.d.ts +1 -0
- package/dist/types/UseElTable/index.vue.d.ts +20 -2
- package/dist/types/UseElTable/props.d.ts +8 -0
- package/dist/types/UseElTable/types.d.ts +1 -0
- package/dist/types/UseRender/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +2 -1
- package/package.json +8 -8
- package/src/components/UseCrud/defaultExtConfig.ts +15 -0
- package/src/components/UseCrud/props.ts +25 -0
- package/src/components/UseCrud/types.ts +85 -0
- package/src/components/UseElCheckbox/types.ts +2 -2
- package/src/components/UseElConfigProvider/types.ts +9 -0
- package/src/components/UseElForm/types.ts +165 -54
- package/src/components/UseElTable/defaultExtConfig.ts +1 -1
- package/src/components/UseElTable/props.ts +14 -0
- package/src/components/UseElTable/types.ts +8 -1
- package/src/types/index.ts +8 -0
- package/dist/types/UseCrudTable/props.d.ts +0 -18
- package/dist/types/UseCrudTable/types.d.ts +0 -26
- package/src/components/UseCrudTable/defaultExtConfig.ts +0 -28
- package/src/components/UseCrudTable/props.ts +0 -32
- package/src/components/UseCrudTable/types.ts +0 -51
- /package/dist/types/{UseCrudTable → UseCrud}/utils.d.ts +0 -0
|
@@ -49,8 +49,8 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
49
49
|
default: string;
|
|
50
50
|
};
|
|
51
51
|
}>> & Readonly<{}>, {
|
|
52
|
-
style: string | Record<string, any>;
|
|
53
52
|
class: string;
|
|
53
|
+
style: string | Record<string, any>;
|
|
54
54
|
emptyText: string;
|
|
55
55
|
separator: string;
|
|
56
56
|
parseKey: string;
|
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';
|
|
@@ -17,3 +17,4 @@ export { default as UseIconfont } from './UseIconfont/index.vue';
|
|
|
17
17
|
export { default as UseLineTitle } from './UseLineTitle/index.vue';
|
|
18
18
|
export { default as UseRender } from './UseRender/index.vue';
|
|
19
19
|
export { default as UseSvgIcon } from './UseSvgIcon/index.vue';
|
|
20
|
+
export { useCrud } from './UseCrud/useCrudWithBusiness';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wyfex/ivue",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.4",
|
|
4
4
|
"description": "万有前端 X 体系下基于 Vite8 + Vue3 + Typescript6 + ElementPlus2 构建的 iVue 组件库",
|
|
5
5
|
"homepage": "https://wyfex.top/idocs/ivue",
|
|
6
6
|
"type": "module",
|
|
@@ -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
61
|
"unplugin-auto-import": "^21.0.0",
|
|
62
62
|
"unplugin-dts": "^1.0.3",
|
|
63
63
|
"unplugin-vue-components": "^32.1.0",
|
|
64
|
-
"vite": "^8.1.
|
|
64
|
+
"vite": "^8.1.5",
|
|
65
65
|
"vite-svg-loader": "^5.1.1",
|
|
66
|
-
"vue": "^3.5.
|
|
67
|
-
"vue-tsc": "^3.3.
|
|
66
|
+
"vue": "^3.5.40",
|
|
67
|
+
"vue-tsc": "^3.3.8"
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MergedExtConfig } from './types'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 默认扩展配置
|
|
5
|
+
*/
|
|
6
|
+
export default {
|
|
7
|
+
mode: { type: 'PAGE' },
|
|
8
|
+
actionBar: {
|
|
9
|
+
margin: '20px 0',
|
|
10
|
+
showControlFormDisplayBtn: true,
|
|
11
|
+
reverse: false,
|
|
12
|
+
divider: { show: false, borderStyle: 'solid' }
|
|
13
|
+
},
|
|
14
|
+
modal: { type: 'Drawer' }
|
|
15
|
+
} 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】的配置基础上新增了【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,85 @@
|
|
|
1
|
+
import type { Component, ExtractPropTypes } from 'vue'
|
|
2
|
+
import componentProps from './props'
|
|
3
|
+
import type { FormColumn } from '../UseElForm/types'
|
|
4
|
+
import type {
|
|
5
|
+
TableColumn,
|
|
6
|
+
ExtConfig as TableExtConfig
|
|
7
|
+
} from '../UseElTable/types'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* props类型
|
|
11
|
+
*/
|
|
12
|
+
export type Props = ExtractPropTypes<typeof componentProps>
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* emits类型
|
|
16
|
+
*/
|
|
17
|
+
export type Emits = {
|
|
18
|
+
/**
|
|
19
|
+
* dictKeys事件
|
|
20
|
+
*/
|
|
21
|
+
(e: 'onDictKeys', value?: string[]): void
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 基础配置类型
|
|
26
|
+
*/
|
|
27
|
+
export type BaseConfigs = Omit<FormColumn, 'prop'> & Omit<TableColumn, 'prop'>
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 配置项接口
|
|
31
|
+
*/
|
|
32
|
+
export interface Configs extends BaseConfigs {
|
|
33
|
+
prop: string
|
|
34
|
+
onlySearch?: boolean
|
|
35
|
+
tableOrder?: number
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 分割线配置接口
|
|
40
|
+
* show:是否显示分割线
|
|
41
|
+
* borderStyle:分割线边框样式
|
|
42
|
+
*/
|
|
43
|
+
export interface Divider {
|
|
44
|
+
show?: boolean
|
|
45
|
+
borderStyle?: 'none' | 'solid' | 'hidden' | 'dashed'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 操作栏配置接口
|
|
50
|
+
* margin:操作栏外边距
|
|
51
|
+
* showControlFormDisplayBtn:是否显示【收起/展开查询】按钮
|
|
52
|
+
* controlFormDisplayBtnWithOpenedIcon:【收起/展开查询】按钮展开时图标
|
|
53
|
+
* controlFormDisplayBtnWithClosedIcon:【收起/展开查询】按钮收起时图标
|
|
54
|
+
* reverse:是否反转操作栏按钮 仅showControlFormDisplayBtn为true时生效
|
|
55
|
+
* divider:操作栏底部分割线
|
|
56
|
+
*/
|
|
57
|
+
export interface ActionBar {
|
|
58
|
+
margin?: string
|
|
59
|
+
showControlFormDisplayBtn?: boolean
|
|
60
|
+
controlFormDisplayBtnWithOpenedIcon?: Component
|
|
61
|
+
controlFormDisplayBtnWithClosedIcon?: Component
|
|
62
|
+
reverse?: boolean
|
|
63
|
+
divider?: Divider
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* extConfig接口
|
|
68
|
+
*/
|
|
69
|
+
export interface ExtConfig {
|
|
70
|
+
/**
|
|
71
|
+
* 操作栏配置项
|
|
72
|
+
*/
|
|
73
|
+
actionBar?: ActionBar
|
|
74
|
+
/**
|
|
75
|
+
* 弹窗配置项
|
|
76
|
+
* type:弹窗类型 支持Drawer和Dialog
|
|
77
|
+
* 其他配置项由于组件内部已进行v-bind透传,不不在此重复声明接口,详见UseElDrawer和UseElDialog组件types
|
|
78
|
+
*/
|
|
79
|
+
modal?: { type?: 'Drawer' | 'Dialog' }
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 合并后的extConfig类型 本组件ExtConfig和UseElTable组件ExtConfig合并
|
|
84
|
+
*/
|
|
85
|
+
export type MergedExtConfig = ExtConfig & TableExtConfig
|
|
@@ -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
|
|
12
|
+
export type Emits = {
|
|
13
13
|
// 更新value值
|
|
14
14
|
(e: 'update:modelValue', value: string | number | (string | number)[]): void
|
|
15
15
|
}
|
|
@@ -15,6 +15,15 @@ export interface ExtConfig {
|
|
|
15
15
|
* 字典属性配置项
|
|
16
16
|
*/
|
|
17
17
|
dictProps?: DictProps
|
|
18
|
+
/**
|
|
19
|
+
* crud配置项
|
|
20
|
+
* pageHeight:crud表格页面高度 extConfig.mode.type='PAGE'时生效,显式设置则表格自适应高度不生效,否则默认使用表格自适应高度
|
|
21
|
+
* modalHeight:crud表格弹窗高度 extConfig.mode.type='MODAL'时生效,显式设置则表格自适应高度不生效,否则默认使用表格自适应高度
|
|
22
|
+
*/
|
|
23
|
+
crud?: {
|
|
24
|
+
pageHeight?: string
|
|
25
|
+
modalHeight?: string
|
|
26
|
+
}
|
|
18
27
|
/**
|
|
19
28
|
* 表格配置项
|
|
20
29
|
* pageHeight:表格页面高度 extConfig.mode.type='PAGE'时生效,显式设置则表格自适应高度不生效,否则默认使用表格自适应高度
|
|
@@ -8,13 +8,13 @@ import type { RenderConfig, UseDict } from '@/types'
|
|
|
8
8
|
export type Props = ExtractPropTypes<typeof componentProps>
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* emits
|
|
11
|
+
* emits类型
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
14
|
-
|
|
13
|
+
export type Emits = {
|
|
14
|
+
/**
|
|
15
|
+
* dictKeys事件
|
|
16
|
+
*/
|
|
15
17
|
(e: 'onDictKeys', value?: string[]): void
|
|
16
|
-
// 更新formModel
|
|
17
|
-
(e: 'update:formModel', value: Record<string, any>): void
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -55,7 +55,7 @@ export interface QueryConfig {
|
|
|
55
55
|
* inputConfig接口
|
|
56
56
|
*/
|
|
57
57
|
export interface InputConfig {
|
|
58
|
-
useRender
|
|
58
|
+
useRender?: boolean | RenderConfig
|
|
59
59
|
type?:
|
|
60
60
|
| 'text'
|
|
61
61
|
| 'textarea'
|
|
@@ -76,78 +76,150 @@ export interface InputConfig {
|
|
|
76
76
|
resize?: string
|
|
77
77
|
showPassword?: boolean
|
|
78
78
|
placeholder?: string
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
79
|
+
/**
|
|
80
|
+
* 默认el-input的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-input宽度
|
|
81
|
+
*/
|
|
82
|
+
width?: string
|
|
83
|
+
/**
|
|
84
|
+
* 为true则对el-input使用v-focus聚焦指令
|
|
85
|
+
*/
|
|
86
|
+
autoFocus?: boolean
|
|
87
|
+
/**
|
|
88
|
+
* el-input头部插槽内容
|
|
89
|
+
*/
|
|
90
|
+
prefixContent?: string | object
|
|
91
|
+
/**
|
|
92
|
+
* el-input尾部插槽内容
|
|
93
|
+
*/
|
|
94
|
+
suffixContent?: string | object
|
|
95
|
+
/**
|
|
96
|
+
* el-input前置插槽内容
|
|
97
|
+
*/
|
|
98
|
+
prependContent?: string | object
|
|
99
|
+
/**
|
|
100
|
+
* el-input后置插槽内容
|
|
101
|
+
*/
|
|
102
|
+
appendContent?: string | object
|
|
103
|
+
/**
|
|
104
|
+
* 在el-input右外部显示单位
|
|
105
|
+
*/
|
|
106
|
+
unit?: string | object
|
|
107
|
+
/**
|
|
108
|
+
* el-input的clear事件
|
|
109
|
+
*/
|
|
110
|
+
onClear?: Function
|
|
111
|
+
/**
|
|
112
|
+
* el-input的input事件
|
|
113
|
+
*/
|
|
114
|
+
inputEvent?: Function
|
|
115
|
+
/**
|
|
116
|
+
* el-input的keyup.enter事件
|
|
117
|
+
*/
|
|
118
|
+
onKeyupEnter?: Function
|
|
89
119
|
}
|
|
90
120
|
|
|
91
121
|
/**
|
|
92
122
|
* inputNumberConfig接口
|
|
93
123
|
*/
|
|
94
124
|
export interface InputNumberConfig {
|
|
95
|
-
useRender
|
|
125
|
+
useRender?: boolean | RenderConfig
|
|
96
126
|
min?: number
|
|
97
127
|
max?: number
|
|
98
128
|
step?: number
|
|
99
129
|
precision?: number
|
|
100
130
|
placeholder?: string
|
|
101
131
|
disabledScientific?: boolean
|
|
102
|
-
|
|
132
|
+
/**
|
|
133
|
+
* 在el-input-number右外部显示单位
|
|
134
|
+
*/
|
|
135
|
+
unit?: string | object
|
|
103
136
|
}
|
|
104
137
|
|
|
105
138
|
/**
|
|
106
139
|
* radioConfig接口
|
|
107
140
|
*/
|
|
108
141
|
export interface RadioConfig {
|
|
109
|
-
useRender
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
142
|
+
useRender?: boolean | RenderConfig
|
|
143
|
+
/**
|
|
144
|
+
* el-radio的选项集
|
|
145
|
+
*/
|
|
146
|
+
options?: Array<{ label: string; value: string | number }>
|
|
147
|
+
/**
|
|
148
|
+
* el-radio的props配置项
|
|
149
|
+
*/
|
|
150
|
+
props?: { value: string; label?: string }
|
|
151
|
+
/**
|
|
152
|
+
* 是否反转单选框和标签的位置
|
|
153
|
+
*/
|
|
154
|
+
reverse?: boolean
|
|
155
|
+
/**
|
|
156
|
+
* el-radio的change事件
|
|
157
|
+
*/
|
|
158
|
+
onChange?: Function
|
|
114
159
|
}
|
|
115
160
|
|
|
116
161
|
/**
|
|
117
162
|
* selectConfig接口
|
|
118
163
|
*/
|
|
119
164
|
export interface SelectConfig {
|
|
120
|
-
useRender
|
|
165
|
+
useRender?: boolean | RenderConfig
|
|
121
166
|
multiple?: boolean
|
|
122
167
|
clearable?: boolean
|
|
123
168
|
filterable?: boolean
|
|
124
169
|
placeholder?: string
|
|
125
170
|
options?: Array<{ label: string; value: string | number }>
|
|
126
171
|
props?: { value: string; label?: string }
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
172
|
+
/**
|
|
173
|
+
* 是否使用v2版本
|
|
174
|
+
*/
|
|
175
|
+
useV2: boolean
|
|
176
|
+
/**
|
|
177
|
+
* 是否反转
|
|
178
|
+
*/
|
|
179
|
+
reverse?: boolean
|
|
180
|
+
/**
|
|
181
|
+
* 是否将值为数组转为以逗号分隔的字符串
|
|
182
|
+
*/
|
|
183
|
+
toJoin?: boolean
|
|
184
|
+
/**
|
|
185
|
+
* 默认el-select的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-select宽度
|
|
186
|
+
*/
|
|
187
|
+
width?: string
|
|
188
|
+
/**
|
|
189
|
+
* el-select的change事件
|
|
190
|
+
*/
|
|
191
|
+
onChange?: Function
|
|
132
192
|
}
|
|
133
193
|
|
|
134
194
|
/**
|
|
135
195
|
* cascaderConfig接口
|
|
136
196
|
*/
|
|
137
197
|
export interface CascaderConfig {
|
|
138
|
-
useRender
|
|
198
|
+
useRender?: boolean | RenderConfig
|
|
139
199
|
clearable?: boolean
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
200
|
+
/**
|
|
201
|
+
* el-cascader的选项集
|
|
202
|
+
*/
|
|
203
|
+
options?: Array<{ label: string; value: string | number }>
|
|
204
|
+
/**
|
|
205
|
+
* el-cascader的props配置项
|
|
206
|
+
*/
|
|
207
|
+
props?: { value: string; label?: string }
|
|
208
|
+
/**
|
|
209
|
+
* 默认el-cascader的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-cascader宽度
|
|
210
|
+
*/
|
|
211
|
+
width?: string
|
|
212
|
+
/**
|
|
213
|
+
* el-select的change事件
|
|
214
|
+
*/
|
|
215
|
+
onChange?: Function
|
|
144
216
|
}
|
|
145
217
|
|
|
146
218
|
/**
|
|
147
219
|
* datePickerConfig接口
|
|
148
220
|
*/
|
|
149
221
|
export interface DatePickerConfig {
|
|
150
|
-
useRender
|
|
222
|
+
useRender?: boolean | RenderConfig
|
|
151
223
|
type?:
|
|
152
224
|
| 'year'
|
|
153
225
|
| 'years'
|
|
@@ -169,17 +241,29 @@ export interface DatePickerConfig {
|
|
|
169
241
|
startPlaceholder?: string
|
|
170
242
|
endPlaceholder?: string
|
|
171
243
|
rangeSeparator?: string
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
244
|
+
/**
|
|
245
|
+
* 默认el-date-picker的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-date-picker宽度
|
|
246
|
+
*/
|
|
247
|
+
width?: string
|
|
248
|
+
/**
|
|
249
|
+
* el-date-picker的calendar-change事件
|
|
250
|
+
*/
|
|
251
|
+
onCalendarChange?: Function
|
|
252
|
+
/**
|
|
253
|
+
* el-date-picker的clear事件
|
|
254
|
+
*/
|
|
255
|
+
onClear?: Function
|
|
256
|
+
/**
|
|
257
|
+
* el-date-picker的change事件
|
|
258
|
+
*/
|
|
259
|
+
onChange?: Function
|
|
176
260
|
}
|
|
177
261
|
|
|
178
262
|
/**
|
|
179
263
|
* timePickerConfig接口
|
|
180
264
|
*/
|
|
181
265
|
export interface TimePickerConfig {
|
|
182
|
-
useRender
|
|
266
|
+
useRender?: boolean | RenderConfig
|
|
183
267
|
startPlaceholder?: string
|
|
184
268
|
endPlaceholder?: string
|
|
185
269
|
rangeSeparator?: string
|
|
@@ -187,38 +271,56 @@ export interface TimePickerConfig {
|
|
|
187
271
|
editable?: boolean
|
|
188
272
|
format?: string
|
|
189
273
|
valueFormat?: string
|
|
190
|
-
|
|
274
|
+
/**
|
|
275
|
+
* el-date-picker的change事件
|
|
276
|
+
*/
|
|
277
|
+
onChange?: Function
|
|
191
278
|
}
|
|
192
279
|
|
|
193
280
|
/**
|
|
194
281
|
* timeSelectConfig接口
|
|
195
282
|
*/
|
|
196
283
|
export interface TimeSelectConfig {
|
|
197
|
-
useRender
|
|
198
|
-
|
|
199
|
-
|
|
284
|
+
useRender?: boolean | RenderConfig
|
|
285
|
+
/**
|
|
286
|
+
* 时间选择范围开始时间在formModel中的属性名
|
|
287
|
+
*/
|
|
288
|
+
startProp: string
|
|
289
|
+
/**
|
|
290
|
+
* 时间选择范围结束时间在formModel中的属性名
|
|
291
|
+
*/
|
|
292
|
+
endProp: string
|
|
200
293
|
}
|
|
201
294
|
|
|
202
295
|
/**
|
|
203
296
|
* switchConfig接口
|
|
204
297
|
*/
|
|
205
298
|
export interface SwitchConfig {
|
|
206
|
-
useRender
|
|
299
|
+
useRender?: boolean | RenderConfig
|
|
207
300
|
activeValue?: string | number | boolean
|
|
208
301
|
inactiveValue?: string | number | boolean
|
|
209
|
-
|
|
302
|
+
/**
|
|
303
|
+
* el-switch的change事件
|
|
304
|
+
*/
|
|
305
|
+
onChange?: Function
|
|
210
306
|
}
|
|
211
307
|
|
|
212
308
|
/**
|
|
213
309
|
* inputRangeConfig接口
|
|
214
310
|
*/
|
|
215
311
|
export interface InputRangeConfig {
|
|
216
|
-
|
|
217
|
-
|
|
312
|
+
/**
|
|
313
|
+
* 输入范围开始值在formModel中的属性名
|
|
314
|
+
*/
|
|
315
|
+
startProp: string
|
|
316
|
+
/**
|
|
317
|
+
* 输入范围结束值在formModel中的属性名
|
|
318
|
+
*/
|
|
319
|
+
endProp: string
|
|
218
320
|
startPlaceholder?: string
|
|
219
321
|
endPlaceholder?: string
|
|
220
322
|
rangeSeparator?: string
|
|
221
|
-
onClear?:
|
|
323
|
+
onClear?: Function
|
|
222
324
|
}
|
|
223
325
|
|
|
224
326
|
/**
|
|
@@ -227,7 +329,10 @@ export interface InputRangeConfig {
|
|
|
227
329
|
export interface TreeSelectConfig {
|
|
228
330
|
useRender?: boolean | RenderConfig
|
|
229
331
|
data: Record<string, unknown>[]
|
|
230
|
-
|
|
332
|
+
/**
|
|
333
|
+
* 是否反转
|
|
334
|
+
*/
|
|
335
|
+
reverse?: boolean
|
|
231
336
|
width?: string
|
|
232
337
|
placeholder?: string
|
|
233
338
|
props?: { value: string; label?: string }
|
|
@@ -238,11 +343,17 @@ export interface TreeSelectConfig {
|
|
|
238
343
|
}
|
|
239
344
|
|
|
240
345
|
export interface IRequired {
|
|
241
|
-
|
|
346
|
+
/**
|
|
347
|
+
* 是否必填
|
|
348
|
+
*/
|
|
242
349
|
isRequired?: boolean
|
|
243
|
-
|
|
350
|
+
/**
|
|
351
|
+
* 内置校验器
|
|
352
|
+
*/
|
|
244
353
|
validator: 'mobile' | 'nonNegativeDecimal'
|
|
245
|
-
|
|
354
|
+
/**
|
|
355
|
+
* 参数
|
|
356
|
+
*/
|
|
246
357
|
parmas?: any
|
|
247
358
|
}
|
|
248
359
|
|
|
@@ -273,7 +384,7 @@ export interface FormColumn {
|
|
|
273
384
|
* 如为IRequired则使用内置必填校验
|
|
274
385
|
* 可传对象数组进行自定义校验
|
|
275
386
|
*/
|
|
276
|
-
required
|
|
387
|
+
required?: boolean | IRequired
|
|
277
388
|
/**
|
|
278
389
|
* 必填项错误消息
|
|
279
390
|
* 如不指定则默认为“请输入xxx”或“请选择xxx”
|
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
},
|
|
13
13
|
mode: { type: 'PAGE' },
|
|
14
14
|
selection: { width: 40, enableRowClick: false, align: 'center', fixed: true },
|
|
15
|
-
index: { width: 55, align: 'center', fixed: true },
|
|
15
|
+
index: { width: 55, align: 'center', fixed: true, isContinuous: true },
|
|
16
16
|
expand: { show: false },
|
|
17
17
|
operation: { width: 128, fixed: 'right' },
|
|
18
18
|
pagination: {
|
|
@@ -51,6 +51,20 @@ export default {
|
|
|
51
51
|
type: Object as PropType<DictProps>,
|
|
52
52
|
default: () => ({})
|
|
53
53
|
},
|
|
54
|
+
/**
|
|
55
|
+
* 当前页数
|
|
56
|
+
*/
|
|
57
|
+
currentPage: {
|
|
58
|
+
type: Number,
|
|
59
|
+
default: 1
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* 当前页码
|
|
63
|
+
*/
|
|
64
|
+
pageSize: {
|
|
65
|
+
type: Number,
|
|
66
|
+
default: 10
|
|
67
|
+
},
|
|
54
68
|
/**
|
|
55
69
|
* 当内容过长被隐藏时是否显示tooltip 默认是
|
|
56
70
|
*/
|
|
@@ -256,9 +256,16 @@ export interface ExtConfig {
|
|
|
256
256
|
/**
|
|
257
257
|
* 序号列配置项
|
|
258
258
|
* label:序号列表头文本 不显式设置则不显示序号列
|
|
259
|
+
* isContinuous:是否连续的,默认是,即第二页的序号根据第一条最后一个序号进行延续
|
|
259
260
|
* width、align、fixed同选择器配置项
|
|
260
261
|
*/
|
|
261
|
-
index?: {
|
|
262
|
+
index?: {
|
|
263
|
+
label?: string
|
|
264
|
+
isContinuous?: boolean
|
|
265
|
+
width?: number
|
|
266
|
+
align?: string
|
|
267
|
+
fixed?: boolean
|
|
268
|
+
}
|
|
262
269
|
/**
|
|
263
270
|
* 展开列配置项
|
|
264
271
|
* show:是否显示展开列
|
package/src/types/index.ts
CHANGED
|
@@ -139,6 +139,14 @@ export interface GlobalConfig {
|
|
|
139
139
|
* 最终字典映射
|
|
140
140
|
*/
|
|
141
141
|
finalDictMap: DictMap
|
|
142
|
+
/**
|
|
143
|
+
* 最终crud表格页面高度
|
|
144
|
+
*/
|
|
145
|
+
finalCrudTablePageHeight: string
|
|
146
|
+
/**
|
|
147
|
+
* 最终crud表格弹窗高度
|
|
148
|
+
*/
|
|
149
|
+
finalCrudTableModalHeight: string
|
|
142
150
|
/**
|
|
143
151
|
* 最终表格页面高度
|
|
144
152
|
*/
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { ExtConfig as TableExtConfig } from '../UseElTable/types';
|
|
3
|
-
import { Configs, ExtConfig } from './types';
|
|
4
|
-
declare const _default: {
|
|
5
|
-
configs: {
|
|
6
|
-
type: PropType<Configs[]>;
|
|
7
|
-
required: boolean;
|
|
8
|
-
};
|
|
9
|
-
tableExtConfig: {
|
|
10
|
-
type: PropType<TableExtConfig>;
|
|
11
|
-
default: () => {};
|
|
12
|
-
};
|
|
13
|
-
extConfig: {
|
|
14
|
-
type: PropType<ExtConfig>;
|
|
15
|
-
default: () => {};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|