@lx-frontend/wrap-element-ui 1.0.5-beta.1 → 1.0.5-beta.2
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/package.json
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
+
import type { TableColumn } from 'element-ui'
|
|
2
|
+
|
|
1
3
|
export enum IEditType {
|
|
2
4
|
INPUT = 'input',
|
|
3
5
|
SELECT = 'select',
|
|
4
6
|
DATE_ONLY = 'date'
|
|
5
7
|
}
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
type _IColumnConfigRequired = {
|
|
8
10
|
prop: string;
|
|
9
11
|
label: string;
|
|
10
12
|
editType?: IEditType; // 编辑格式
|
|
13
|
+
editSlotName?: string; // 编辑时,自定义编辑组件的slotName
|
|
11
14
|
sortable?: boolean; // 该列是否允许排序,ture则表头弹窗会显示升降序按钮
|
|
12
15
|
slotName?: string; // 如果要自定义,传入 slotName
|
|
16
|
+
hoverSlotName?: string; // 悬浮时,自定义悬浮组件的slotName
|
|
13
17
|
isAlwaysShow?: boolean; // 不可隐藏,显示设置中,该列不允许隐藏
|
|
14
18
|
/** 默认隐藏,显示设置中,该列默认隐藏 */
|
|
15
19
|
defaultHide?: boolean;
|
|
@@ -23,10 +27,12 @@ export interface IColumnConfigRequired {
|
|
|
23
27
|
options: FiltersOption[]
|
|
24
28
|
default?: string | number | string[] | number[]
|
|
25
29
|
} | FiltersOption[]
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
/** 格式化函数,用于自定义渲染 */
|
|
31
|
+
formatter?: (row: any, column: IColumnConfig, value: any, index: number) => string | number;
|
|
28
32
|
}
|
|
29
33
|
|
|
34
|
+
export type IColumnConfigRequired = _IColumnConfigRequired & Partial<Omit<TableColumn, keyof _IColumnConfigRequired>>
|
|
35
|
+
|
|
30
36
|
type FiltersOption = { value: string | number; text: string; [key: string]: any }
|
|
31
37
|
|
|
32
38
|
type ISearchOptions = {
|