@gct-paas/v-ben 0.1.4-dev.10 → 0.1.4-dev.11
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.esm.min.mjs +793 -2
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.css +1 -0
- package/dist/index.system.min.js +1 -1
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/components/index.d.ts +3 -0
- package/es/components/v-ben-button/index.d.ts +133 -0
- package/es/components/v-ben-button/index.mjs +9 -0
- package/es/components/v-ben-button/src/BasicButton.vue.d.ts +75 -0
- package/es/components/v-ben-button/src/BasicButton.vue.mjs +40 -0
- package/es/components/v-ben-button/src/BasicButton.vue2.mjs +5 -0
- package/es/components/v-ben-button/src/PopConfirmButton.vue.d.ts +24 -0
- package/es/components/v-ben-button/src/PopConfirmButton.vue.mjs +46 -0
- package/es/components/v-ben-button/src/PopConfirmButton.vue2.mjs +5 -0
- package/es/components/v-ben-button/src/custom-button.css +64 -0
- package/es/components/v-ben-button/src/custom-button.vue.d.ts +27 -0
- package/es/components/v-ben-button/src/custom-button.vue.mjs +7 -0
- package/es/components/v-ben-button/src/custom-button.vue3.mjs +32 -0
- package/es/components/v-ben-button/src/props.d.ts +38 -0
- package/es/components/v-ben-button/src/props.mjs +29 -0
- package/es/components/v-ben-dropdown/index.d.ts +85 -0
- package/es/components/v-ben-dropdown/index.mjs +5 -0
- package/es/components/v-ben-dropdown/src/Dropdown.vue.d.ts +66 -0
- package/es/components/v-ben-dropdown/src/Dropdown.vue.mjs +113 -0
- package/es/components/v-ben-dropdown/src/Dropdown.vue2.mjs +5 -0
- package/es/components/v-ben-dropdown/src/typing.d.ts +10 -0
- package/es/components/v-ben-table/index.d.ts +3 -0
- package/es/components/v-ben-table/src/BasicTable.vue.d.ts +410 -0
- package/es/components/v-ben-table/src/BasicTable.vue.mjs +53 -0
- package/es/components/v-ben-table/src/BasicTable.vue2.mjs +48 -0
- package/es/components/v-ben-table/src/components/HeaderCell.vue.d.ts +20 -0
- package/es/components/v-ben-table/src/components/HeaderCell.vue.mjs +10 -0
- package/es/components/v-ben-table/src/components/HeaderCell.vue2.mjs +20 -0
- package/es/components/v-ben-table/src/components/TableAction.css +37 -0
- package/es/components/v-ben-table/src/components/TableAction.vue.d.ts +61 -0
- package/es/components/v-ben-table/src/components/TableAction.vue.mjs +174 -0
- package/es/components/v-ben-table/src/components/TableAction.vue3.mjs +6 -0
- package/es/components/v-ben-table/src/components/TableActionAuto.css +37 -0
- package/es/components/v-ben-table/src/components/TableActionAuto.vue.d.ts +61 -0
- package/es/components/v-ben-table/src/components/TableActionAuto.vue.mjs +181 -0
- package/es/components/v-ben-table/src/components/TableActionAuto.vue3.mjs +6 -0
- package/es/components/v-ben-table/src/props.d.ts +186 -0
- package/es/components/v-ben-table/src/props.mjs +136 -0
- package/es/components/v-ben-table/src/types/column.d.ts +164 -0
- package/es/components/v-ben-table/src/types/componentType.d.ts +1 -0
- package/es/components/v-ben-table/src/types/pagination.d.ts +93 -0
- package/es/components/v-ben-table/src/types/table.d.ts +356 -0
- package/es/components/v-ben-table/src/types/tableAction.d.ts +24 -0
- package/es/hooks/useDesign.d.ts +5 -0
- package/es/hooks/useDesign.mjs +9 -0
- package/es/index.d.ts +2 -0
- package/es/index.mjs +10 -0
- package/es/types/index.d.ts +18 -0
- package/es/utils/is.d.ts +23 -0
- package/es/utils/is.mjs +78 -0
- package/package.json +8 -5
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
const basicProps = {
|
|
2
|
+
clickToRowSelect: { type: Boolean, default: true },
|
|
3
|
+
isTreeTable: Boolean,
|
|
4
|
+
tableSetting: {
|
|
5
|
+
type: Object,
|
|
6
|
+
default: {}
|
|
7
|
+
},
|
|
8
|
+
inset: Boolean,
|
|
9
|
+
showTableSetting: Boolean,
|
|
10
|
+
autoCreateKey: { type: Boolean, default: true },
|
|
11
|
+
striped: { type: Boolean, default: true },
|
|
12
|
+
showSummary: Boolean,
|
|
13
|
+
summaryFunc: {
|
|
14
|
+
type: [Function, Array],
|
|
15
|
+
default: null
|
|
16
|
+
},
|
|
17
|
+
summaryData: {
|
|
18
|
+
type: Array,
|
|
19
|
+
default: null
|
|
20
|
+
},
|
|
21
|
+
indentSize: {
|
|
22
|
+
type: Number,
|
|
23
|
+
default: 24
|
|
24
|
+
},
|
|
25
|
+
canColDrag: { type: Boolean, default: true },
|
|
26
|
+
api: {
|
|
27
|
+
type: Function,
|
|
28
|
+
default: null
|
|
29
|
+
},
|
|
30
|
+
beforeFetch: {
|
|
31
|
+
type: Function,
|
|
32
|
+
default: null
|
|
33
|
+
},
|
|
34
|
+
afterFetch: {
|
|
35
|
+
type: Function,
|
|
36
|
+
default: null
|
|
37
|
+
},
|
|
38
|
+
handleSearchInfoFn: {
|
|
39
|
+
type: Function,
|
|
40
|
+
default: null
|
|
41
|
+
},
|
|
42
|
+
// 立即请求接口
|
|
43
|
+
immediate: { type: Boolean, default: true },
|
|
44
|
+
emptyDataIsShowTable: { type: Boolean, default: true },
|
|
45
|
+
// 额外的请求参数
|
|
46
|
+
searchInfo: {
|
|
47
|
+
type: Object,
|
|
48
|
+
default: null
|
|
49
|
+
},
|
|
50
|
+
// 默认的排序参数
|
|
51
|
+
defSort: {
|
|
52
|
+
type: Object,
|
|
53
|
+
default: null
|
|
54
|
+
},
|
|
55
|
+
// 使用搜索表单
|
|
56
|
+
useSearchForm: Boolean,
|
|
57
|
+
columns: {
|
|
58
|
+
type: Array,
|
|
59
|
+
default: () => []
|
|
60
|
+
},
|
|
61
|
+
showIndexColumn: { type: Boolean, default: true },
|
|
62
|
+
indexColumnProps: {
|
|
63
|
+
type: Object,
|
|
64
|
+
default: null
|
|
65
|
+
},
|
|
66
|
+
actionColumn: {
|
|
67
|
+
type: Object,
|
|
68
|
+
default: null
|
|
69
|
+
},
|
|
70
|
+
ellipsis: { type: Boolean, default: true },
|
|
71
|
+
isCanResizeParent: { type: Boolean, default: false },
|
|
72
|
+
canResize: { type: Boolean, default: true },
|
|
73
|
+
clearSelectOnPageChange: Boolean,
|
|
74
|
+
resizeHeightOffset: {
|
|
75
|
+
type: Number,
|
|
76
|
+
default: 0
|
|
77
|
+
},
|
|
78
|
+
rowSelection: {
|
|
79
|
+
type: Object,
|
|
80
|
+
default: null
|
|
81
|
+
},
|
|
82
|
+
title: {
|
|
83
|
+
type: [String, Function],
|
|
84
|
+
default: null
|
|
85
|
+
},
|
|
86
|
+
titleHelpMessage: {
|
|
87
|
+
type: [String, Array]
|
|
88
|
+
},
|
|
89
|
+
maxHeight: Number,
|
|
90
|
+
dataSource: {
|
|
91
|
+
type: Array,
|
|
92
|
+
default: null
|
|
93
|
+
},
|
|
94
|
+
rowKey: {
|
|
95
|
+
type: [String, Function],
|
|
96
|
+
default: ""
|
|
97
|
+
},
|
|
98
|
+
bordered: Boolean,
|
|
99
|
+
pagination: {
|
|
100
|
+
type: [Object, Boolean],
|
|
101
|
+
default: null
|
|
102
|
+
},
|
|
103
|
+
loading: Boolean,
|
|
104
|
+
rowClassName: {
|
|
105
|
+
type: Function
|
|
106
|
+
},
|
|
107
|
+
scroll: {
|
|
108
|
+
type: Object,
|
|
109
|
+
default: null
|
|
110
|
+
},
|
|
111
|
+
beforeEditSubmit: {
|
|
112
|
+
type: Function
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* 行拖拽
|
|
116
|
+
*/
|
|
117
|
+
rowDraggable: { type: Boolean, default: false },
|
|
118
|
+
/**
|
|
119
|
+
* 仅支持同层级拖拽
|
|
120
|
+
*/
|
|
121
|
+
supportSameLevel: { type: Boolean, default: false },
|
|
122
|
+
/**
|
|
123
|
+
* 拖拽完成自动请求的api
|
|
124
|
+
*/
|
|
125
|
+
rowDragApi: { type: Function, default: null },
|
|
126
|
+
/**
|
|
127
|
+
* tree表格展开行
|
|
128
|
+
*/
|
|
129
|
+
expandedRowKeys: { type: Array, default: () => [] },
|
|
130
|
+
/**
|
|
131
|
+
* 空数据时全屏显示
|
|
132
|
+
*/
|
|
133
|
+
emptyFull: { type: Boolean, default: false }
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export { basicProps };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { VNodeChild } from 'vue';
|
|
2
|
+
export interface ColumnFilterItem {
|
|
3
|
+
text?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
children?: IObject[];
|
|
6
|
+
}
|
|
7
|
+
export declare type SortOrder = 'ascend' | 'descend';
|
|
8
|
+
export interface RecordProps<T> {
|
|
9
|
+
text: string;
|
|
10
|
+
record: T;
|
|
11
|
+
index: number;
|
|
12
|
+
}
|
|
13
|
+
export interface FilterDropdownProps {
|
|
14
|
+
prefixCls?: string;
|
|
15
|
+
setSelectedKeys?: (selectedKeys: string[]) => void;
|
|
16
|
+
selectedKeys?: string[];
|
|
17
|
+
confirm?: () => void;
|
|
18
|
+
clearFilters?: () => void;
|
|
19
|
+
filters?: ColumnFilterItem[];
|
|
20
|
+
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
21
|
+
visible?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare type CustomRenderFunction<T> = (record: RecordProps<T>) => VNodeChild | JSX.Element;
|
|
24
|
+
export interface ColumnProps<T> {
|
|
25
|
+
/**
|
|
26
|
+
* specify how content is aligned
|
|
27
|
+
* @default 'left'
|
|
28
|
+
* @type string
|
|
29
|
+
*/
|
|
30
|
+
align?: 'left' | 'right' | 'center';
|
|
31
|
+
/**
|
|
32
|
+
* ellipsize cell content, not working with sorter and filters for now.
|
|
33
|
+
* tableLayout would be fixed when ellipsis is true.
|
|
34
|
+
* @default false
|
|
35
|
+
* @type boolean
|
|
36
|
+
*/
|
|
37
|
+
ellipsis?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Span of this column's title
|
|
40
|
+
* @type number
|
|
41
|
+
*/
|
|
42
|
+
colSpan?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Display field of the data record, could be set like a.b.c
|
|
45
|
+
* @type string
|
|
46
|
+
*/
|
|
47
|
+
dataIndex?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Default filtered values
|
|
50
|
+
* @type string[]
|
|
51
|
+
*/
|
|
52
|
+
defaultFilteredValue?: string[];
|
|
53
|
+
/**
|
|
54
|
+
* Default order of sorted values: 'ascend' 'descend' null
|
|
55
|
+
* @type string
|
|
56
|
+
*/
|
|
57
|
+
defaultSortOrder?: SortOrder;
|
|
58
|
+
/**
|
|
59
|
+
* Customized filter overlay
|
|
60
|
+
* @type any (slot)
|
|
61
|
+
*/
|
|
62
|
+
filterDropdown?: VNodeChild | JSX.Element | ((props: FilterDropdownProps) => VNodeChild | JSX.Element);
|
|
63
|
+
/**
|
|
64
|
+
* Whether filterDropdown is visible
|
|
65
|
+
* @type boolean
|
|
66
|
+
*/
|
|
67
|
+
filterDropdownVisible?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the dataSource is filtered
|
|
70
|
+
* @default false
|
|
71
|
+
* @type boolean
|
|
72
|
+
*/
|
|
73
|
+
filtered?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Controlled filtered value, filter icon will highlight
|
|
76
|
+
* @type string[]
|
|
77
|
+
*/
|
|
78
|
+
filteredValue?: string[];
|
|
79
|
+
/**
|
|
80
|
+
* Customized filter icon
|
|
81
|
+
* @default false
|
|
82
|
+
* @type any
|
|
83
|
+
*/
|
|
84
|
+
filterIcon?: boolean | VNodeChild | JSX.Element;
|
|
85
|
+
/**
|
|
86
|
+
* Whether multiple filters can be selected
|
|
87
|
+
* @default true
|
|
88
|
+
* @type boolean
|
|
89
|
+
*/
|
|
90
|
+
filterMultiple?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Filter menu config
|
|
93
|
+
* @type object[]
|
|
94
|
+
*/
|
|
95
|
+
filters?: ColumnFilterItem[];
|
|
96
|
+
/**
|
|
97
|
+
* Set column to be fixed: true(same as left) 'left' 'right'
|
|
98
|
+
* @default false
|
|
99
|
+
* @type boolean | string
|
|
100
|
+
*/
|
|
101
|
+
fixed?: boolean | 'left' | 'right';
|
|
102
|
+
/**
|
|
103
|
+
* Unique key of this column, you can ignore this prop if you've set a unique dataIndex
|
|
104
|
+
* @type string
|
|
105
|
+
*/
|
|
106
|
+
key?: string;
|
|
107
|
+
/**
|
|
108
|
+
* Renderer of the table cell. The return value should be a VNode, or an object for colSpan/rowSpan config
|
|
109
|
+
* @type Function | ScopedSlot
|
|
110
|
+
*/
|
|
111
|
+
customRender?: CustomRenderFunction<T> | VNodeChild | JSX.Element;
|
|
112
|
+
/**
|
|
113
|
+
* Sort function for local sort, see Array.sort's compareFunction. If you need sort buttons only, set to true
|
|
114
|
+
* @type boolean | Function
|
|
115
|
+
*/
|
|
116
|
+
sorter?: boolean | Fn;
|
|
117
|
+
/**
|
|
118
|
+
* Order of sorted values: 'ascend' 'descend' false
|
|
119
|
+
* @type boolean | string
|
|
120
|
+
*/
|
|
121
|
+
sortOrder?: boolean | SortOrder;
|
|
122
|
+
/**
|
|
123
|
+
* supported sort way, could be 'ascend', 'descend'
|
|
124
|
+
* @default ['ascend', 'descend']
|
|
125
|
+
* @type string[]
|
|
126
|
+
*/
|
|
127
|
+
sortDirections?: SortOrder[];
|
|
128
|
+
/**
|
|
129
|
+
* Title of this column
|
|
130
|
+
* @type any (string | slot)
|
|
131
|
+
*/
|
|
132
|
+
title?: VNodeChild | JSX.Element;
|
|
133
|
+
/**
|
|
134
|
+
* Width of this column
|
|
135
|
+
* @type string | number
|
|
136
|
+
*/
|
|
137
|
+
width?: string | number;
|
|
138
|
+
/**
|
|
139
|
+
* Set props on per cell
|
|
140
|
+
* @type Function
|
|
141
|
+
*/
|
|
142
|
+
customCell?: (record: T, rowIndex: number) => object;
|
|
143
|
+
/**
|
|
144
|
+
* Set props on per header cell
|
|
145
|
+
* @type object
|
|
146
|
+
*/
|
|
147
|
+
customHeaderCell?: (column: ColumnProps<T>) => object;
|
|
148
|
+
/**
|
|
149
|
+
* Callback executed when the confirm filter button is clicked, Use as a filter event when using template or jsx
|
|
150
|
+
* @type Function
|
|
151
|
+
*/
|
|
152
|
+
onFilter?: (value: unknown, record: T) => boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Callback executed when filterDropdownVisible is changed, Use as a filterDropdownVisible event when using template or jsx
|
|
155
|
+
* @type Function
|
|
156
|
+
*/
|
|
157
|
+
onFilterDropdownVisibleChange?: (visible: boolean) => void;
|
|
158
|
+
/**
|
|
159
|
+
* When using columns, you can setting this property to configure the properties that support the slot,
|
|
160
|
+
* such as slots: { filterIcon: 'XXX'}
|
|
161
|
+
* @type object
|
|
162
|
+
*/
|
|
163
|
+
slots?: IObject;
|
|
164
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ComponentType = 'Input' | 'InputNumber' | 'Select' | 'ApiSelect' | 'AutoComplete' | 'ApiTreeSelect' | 'Checkbox' | 'Switch' | 'DatePicker' | 'TimePicker' | 'RadioGroup' | 'RadioButtonGroup' | 'ApiRadioGroup';
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { default as Pagination } from 'ant-design-vue/lib/pagination';
|
|
2
|
+
import { VNodeChild, VNode } from 'vue';
|
|
3
|
+
export interface PaginationRenderProps {
|
|
4
|
+
page: number;
|
|
5
|
+
type: 'page' | 'prev' | 'next';
|
|
6
|
+
originalElement: VNode;
|
|
7
|
+
}
|
|
8
|
+
type PaginationPositon = 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
|
9
|
+
export declare class PaginationConfig extends Pagination {
|
|
10
|
+
position?: PaginationPositon[];
|
|
11
|
+
}
|
|
12
|
+
export interface PaginationProps {
|
|
13
|
+
/**
|
|
14
|
+
* total number of data items
|
|
15
|
+
* @default 0
|
|
16
|
+
* @type number
|
|
17
|
+
*/
|
|
18
|
+
total?: number;
|
|
19
|
+
/**
|
|
20
|
+
* default initial page number
|
|
21
|
+
* @default 1
|
|
22
|
+
* @type number
|
|
23
|
+
*/
|
|
24
|
+
defaultCurrent?: number;
|
|
25
|
+
/**
|
|
26
|
+
* current page number
|
|
27
|
+
* @type number
|
|
28
|
+
*/
|
|
29
|
+
current?: number;
|
|
30
|
+
/**
|
|
31
|
+
* default number of data items per page
|
|
32
|
+
* @default 10
|
|
33
|
+
* @type number
|
|
34
|
+
*/
|
|
35
|
+
defaultPageSize?: number;
|
|
36
|
+
/**
|
|
37
|
+
* number of data items per page
|
|
38
|
+
* @type number
|
|
39
|
+
*/
|
|
40
|
+
pageSize?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Whether to hide pager on single page
|
|
43
|
+
* @default false
|
|
44
|
+
* @type boolean
|
|
45
|
+
*/
|
|
46
|
+
hideOnSinglePage?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* determine whether pageSize can be changed
|
|
49
|
+
* @default false
|
|
50
|
+
* @type boolean
|
|
51
|
+
*/
|
|
52
|
+
showSizeChanger?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* specify the sizeChanger options
|
|
55
|
+
* @default ['10', '20', '30', '40']
|
|
56
|
+
* @type string[]
|
|
57
|
+
*/
|
|
58
|
+
pageSizeOptions?: string[];
|
|
59
|
+
/**
|
|
60
|
+
* determine whether you can jump to pages directly
|
|
61
|
+
* @default false
|
|
62
|
+
* @type boolean
|
|
63
|
+
*/
|
|
64
|
+
showQuickJumper?: boolean | object;
|
|
65
|
+
/**
|
|
66
|
+
* to display the total number and range
|
|
67
|
+
* @type Function
|
|
68
|
+
*/
|
|
69
|
+
showTotal?: (total: number, range: [number, number]) => IObject;
|
|
70
|
+
/**
|
|
71
|
+
* specify the size of Pagination, can be set to small
|
|
72
|
+
* @default ''
|
|
73
|
+
* @type string
|
|
74
|
+
*/
|
|
75
|
+
size?: string;
|
|
76
|
+
/**
|
|
77
|
+
* whether to setting simple mode
|
|
78
|
+
* @type boolean
|
|
79
|
+
*/
|
|
80
|
+
simple?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* to customize item innerHTML
|
|
83
|
+
* @type Function
|
|
84
|
+
*/
|
|
85
|
+
itemRender?: (props: PaginationRenderProps) => VNodeChild | JSX.Element;
|
|
86
|
+
/**
|
|
87
|
+
* specify the position of Pagination
|
|
88
|
+
* @default ['bottomRight']
|
|
89
|
+
* @type string[]
|
|
90
|
+
*/
|
|
91
|
+
position?: PaginationPositon[];
|
|
92
|
+
}
|
|
93
|
+
export {};
|