@wyfex/ivue 0.22.2 → 0.22.3
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 +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/ivue.css +1 -1
- package/dist/types/UseCrud/defaultExtConfig.d.ts +1 -0
- package/dist/types/UseCrud/index.vue.d.ts +0 -9
- package/dist/types/UseCrud/props.d.ts +0 -5
- package/dist/types/UseElConfigProvider/defaultExtConfig.d.ts +2 -0
- package/dist/types/UseElConfigProvider/types.d.ts +2 -0
- package/dist/types/UseElDescriptions/index.vue.d.ts +9 -18
- package/dist/types/UseElDescriptions/props.d.ts +5 -9
- package/dist/types/UseElForm/components/QueryForm.vue.d.ts +9 -18
- package/dist/types/UseElForm/components/RowForm.vue.d.ts +23 -28
- package/dist/types/UseElForm/components/controls/Cascader.vue.d.ts +2 -2
- package/dist/types/UseElForm/components/controls/Radio.vue.d.ts +2 -2
- package/dist/types/UseElForm/components/controls/Select.vue.d.ts +2 -2
- package/dist/types/UseElForm/components/controls/TreeSelect.vue.d.ts +2 -2
- package/dist/types/UseElForm/index.vue.d.ts +9 -18
- package/dist/types/UseElForm/props.d.ts +5 -9
- package/dist/types/UseElSelect/hook.d.ts +1 -1
- package/dist/types/UseElSelect/index.vue.d.ts +1 -1
- package/dist/types/UseElTable/defaultExtConfig.d.ts +5 -0
- package/dist/types/UseElTable/index.vue.d.ts +5 -14
- package/dist/types/UseElTable/props.d.ts +3 -7
- package/dist/types/UseElTable/types.d.ts +3 -0
- package/package.json +1 -1
- package/src/components/UseCrud/defaultExtConfig.ts +1 -1
- package/src/components/UseCrud/props.ts +0 -8
- package/src/components/UseElConfigProvider/defaultExtConfig.ts +6 -1
- package/src/components/UseElConfigProvider/types.ts +4 -0
- package/src/components/UseElDescriptions/props.ts +8 -15
- package/src/components/UseElForm/props.ts +8 -15
- package/src/components/UseElSelect/props.ts +1 -0
- package/src/components/UseElTable/defaultExtConfig.ts +1 -0
- package/src/components/UseElTable/props.ts +4 -11
- package/src/components/UseElTable/types.ts +6 -1
- package/src/types/index.ts +7 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PropType } from 'vue'
|
|
2
2
|
import type { ConfigColumn } from './types'
|
|
3
|
-
import type {
|
|
3
|
+
import type { Dict } from '@/types'
|
|
4
4
|
import type { RenderConfig } from '@/types'
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -22,25 +22,18 @@ export default {
|
|
|
22
22
|
required: true
|
|
23
23
|
},
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
useRender: {
|
|
28
|
-
type: [Boolean, Object] as PropType<boolean | RenderConfig>,
|
|
29
|
-
default: false
|
|
30
|
-
},
|
|
31
|
-
/**
|
|
32
|
-
* 字典映射 数据结构为{ configs[][label | useDict | useDict.key]: Array<{ label: string, value: any }> }
|
|
25
|
+
* 字典 可配置api、payload和props等,默认由UseElConfigProvider提供
|
|
33
26
|
*/
|
|
34
|
-
|
|
35
|
-
type: Object as PropType<
|
|
27
|
+
dict: {
|
|
28
|
+
type: Object as PropType<Dict>,
|
|
36
29
|
default: () => ({})
|
|
37
30
|
},
|
|
38
31
|
/**
|
|
39
|
-
*
|
|
32
|
+
* 是否使用渲染器 默认否
|
|
40
33
|
*/
|
|
41
|
-
|
|
42
|
-
type: Object as PropType<
|
|
43
|
-
default:
|
|
34
|
+
useRender: {
|
|
35
|
+
type: [Boolean, Object] as PropType<boolean | RenderConfig>,
|
|
36
|
+
default: false
|
|
44
37
|
},
|
|
45
38
|
/**
|
|
46
39
|
* 一行 Descriptions Item 的数量 默认2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PropType } from 'vue'
|
|
2
2
|
import type { FormColumn, QueryConfig } from './types'
|
|
3
|
-
import type {
|
|
3
|
+
import type { Dict, RenderConfig } from '@/types'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* 组件props
|
|
@@ -21,25 +21,18 @@ export default {
|
|
|
21
21
|
required: true
|
|
22
22
|
},
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
useRender: {
|
|
27
|
-
type: [Boolean, Object] as PropType<boolean | RenderConfig>,
|
|
28
|
-
default: false
|
|
29
|
-
},
|
|
30
|
-
/**
|
|
31
|
-
* 字典映射 数据结构为{ formColumns[][label | useDict | useDict.key]: Array<{ label: string, value: any }> }
|
|
24
|
+
* 字典 可配置api、payload和props等,默认由UseElConfigProvider提供
|
|
32
25
|
*/
|
|
33
|
-
|
|
34
|
-
type: Object as PropType<
|
|
26
|
+
dict: {
|
|
27
|
+
type: Object as PropType<Dict>,
|
|
35
28
|
default: () => ({})
|
|
36
29
|
},
|
|
37
30
|
/**
|
|
38
|
-
*
|
|
31
|
+
* 是否使用渲染器 默认否
|
|
39
32
|
*/
|
|
40
|
-
|
|
41
|
-
type: Object as PropType<
|
|
42
|
-
default:
|
|
33
|
+
useRender: {
|
|
34
|
+
type: [Boolean, Object] as PropType<boolean | RenderConfig>,
|
|
35
|
+
default: false
|
|
43
36
|
},
|
|
44
37
|
/**
|
|
45
38
|
* el-form-item宽度值
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PropType } from 'vue'
|
|
2
2
|
import type { ExtConfig, TableColumn } from './types'
|
|
3
|
-
import type {
|
|
3
|
+
import type { Dict } from '@/types'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* 组件props
|
|
@@ -38,17 +38,10 @@ export default {
|
|
|
38
38
|
validator: (val: string) => ['left', 'center', 'right'].includes(val)
|
|
39
39
|
},
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* 字典 可配置api、payload和props等,默认由UseElConfigProvider提供
|
|
42
42
|
*/
|
|
43
|
-
|
|
44
|
-
type: Object as PropType<
|
|
45
|
-
default: () => ({})
|
|
46
|
-
},
|
|
47
|
-
/**
|
|
48
|
-
* 字典属性 默认为{ value: 'value', label: 'label',children:'children' },可通过全局配置进行设置,为适配全局配置此处不再设置默认值
|
|
49
|
-
*/
|
|
50
|
-
dictProps: {
|
|
51
|
-
type: Object as PropType<DictProps>,
|
|
43
|
+
dict: {
|
|
44
|
+
type: Object as PropType<Dict>,
|
|
52
45
|
default: () => ({})
|
|
53
46
|
},
|
|
54
47
|
/**
|
|
@@ -139,14 +139,19 @@ export interface Selection {
|
|
|
139
139
|
* 查询类型
|
|
140
140
|
*/
|
|
141
141
|
export type Query = {
|
|
142
|
-
/**
|
|
142
|
+
/** 查询接口 */
|
|
143
143
|
api?: Function
|
|
144
144
|
/** 是否立即查询 */
|
|
145
145
|
immediate?: boolean
|
|
146
|
+
/** 是否是分页接口 */
|
|
147
|
+
isPageApi?: boolean
|
|
148
|
+
/** 处理查询参数的方法 */
|
|
149
|
+
resolveParamsFn?: Function
|
|
146
150
|
/** 自动取消查询策略 配合signal实现接口取消请求 */
|
|
147
151
|
autoCancelStrategy?: 'none' | 'unmount' | 'deactivate' | 'both'
|
|
148
152
|
/** 开始查询前钩子 用于注入字典数据等 */
|
|
149
153
|
onQueryBefore?: (opts: {
|
|
154
|
+
params: Record<string, any>
|
|
150
155
|
dictKeys: string[]
|
|
151
156
|
done: (continueRequest?: boolean) => void
|
|
152
157
|
}) => void
|
package/src/types/index.ts
CHANGED
|
@@ -81,6 +81,8 @@ export interface Dict {
|
|
|
81
81
|
apiPayload?: string
|
|
82
82
|
/** 字典属性 */
|
|
83
83
|
props?: DictProps
|
|
84
|
+
/** 字典映射 数据结构为:{ formColumns[][label | useDict | useDict.key]: Array<{ label: string, value: any }> } */
|
|
85
|
+
map?: DictMap
|
|
84
86
|
}
|
|
85
87
|
// =========================== 字典相关接口 end ===========================
|
|
86
88
|
|
|
@@ -115,6 +117,11 @@ export interface GlobalConfig {
|
|
|
115
117
|
/** 最终字典映射 */
|
|
116
118
|
finalDictMap: DictMap
|
|
117
119
|
|
|
120
|
+
/** 最终查询接口分页字段 */
|
|
121
|
+
finalQueryApiPageField: string
|
|
122
|
+
/** 最终查询接口分页大小字段 */
|
|
123
|
+
finalQueryApiPageSizeField: string
|
|
124
|
+
|
|
118
125
|
/** 最终查询接口非分页数据载荷 */
|
|
119
126
|
finalQueryApiDefaultPayload: string
|
|
120
127
|
/** 最终查询接口分页数据载荷 */
|