@gct-paas/v-ben 0.1.4-dev.10 → 0.1.4-dev.12
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.js +685 -0
- package/dist/index.min.css +2 -0
- package/es/_virtual/_plugin-vue_export-helper.mjs +8 -0
- package/es/components/index.d.ts +3 -0
- package/es/components/index.mjs +7 -0
- package/es/components/v-ben-button/index.d.ts +133 -0
- package/es/components/v-ben-button/index.mjs +8 -0
- package/es/components/v-ben-button/src/BasicButton.vue.d.ts +75 -0
- package/es/components/v-ben-button/src/BasicButton.vue.mjs +5 -0
- package/es/components/v-ben-button/src/BasicButton.vue_vue_type_script_setup_true_lang.mjs +37 -0
- package/es/components/v-ben-button/src/PopConfirmButton.vue.d.ts +24 -0
- package/es/components/v-ben-button/src/PopConfirmButton.vue.mjs +5 -0
- package/es/components/v-ben-button/src/PopConfirmButton.vue_vue_type_script_lang.mjs +36 -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.vue_vue_type_script_setup_true_name_custom-button_lang.mjs +22 -0
- package/es/components/v-ben-button/src/custom-button.vue_vue_type_style_index_0_scoped_305f4090_lang.css +64 -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 +5 -0
- package/es/components/v-ben-dropdown/src/Dropdown.vue_vue_type_script_setup_true_lang.mjs +87 -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/index.mjs +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 +37 -0
- package/es/components/v-ben-table/src/BasicTable.vue_vue_type_script_lang.mjs +41 -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.vue_vue_type_script_lang.mjs +15 -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 +6 -0
- package/es/components/v-ben-table/src/components/TableAction.vue_vue_type_script_setup_true_lang.mjs +145 -0
- package/es/components/v-ben-table/src/components/TableAction.vue_vue_type_style_index_0_lang.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 +6 -0
- package/es/components/v-ben-table/src/components/TableActionAuto.vue_vue_type_script_setup_true_lang.mjs +159 -0
- package/es/components/v-ben-table/src/components/TableActionAuto.vue_vue_type_style_index_0_lang.css +37 -0
- package/es/components/v-ben-table/src/props.d.ts +186 -0
- package/es/components/v-ben-table/src/props.mjs +157 -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 +10 -0
- package/es/index.d.ts +2 -0
- package/es/index.mjs +12 -4
- package/es/types/index.d.ts +18 -0
- package/es/utils/is.d.ts +23 -0
- package/es/utils/is.mjs +72 -0
- package/package.json +9 -6
- package/dist/index.esm.min.mjs +0 -5
- package/dist/index.min.cjs +0 -1
- package/dist/index.system.min.js +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { DropMenu } from './typing';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: {
|
|
6
|
+
default?(_: {}): any;
|
|
7
|
+
};
|
|
8
|
+
refs: {};
|
|
9
|
+
rootEl: any;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
13
|
+
popconfirm: BooleanConstructor;
|
|
14
|
+
/**
|
|
15
|
+
* the trigger mode which executes the drop-down action
|
|
16
|
+
* @default ['hover']
|
|
17
|
+
* @type string[]
|
|
18
|
+
*/
|
|
19
|
+
trigger: {
|
|
20
|
+
type: PropType<("contextmenu" | "click" | "hover")[]>;
|
|
21
|
+
default: () => string[];
|
|
22
|
+
};
|
|
23
|
+
dropMenuList: {
|
|
24
|
+
type: PropType<(DropMenu & IObject)[]>;
|
|
25
|
+
default: () => never[];
|
|
26
|
+
};
|
|
27
|
+
selectedKeys: {
|
|
28
|
+
type: PropType<string[]>;
|
|
29
|
+
default: () => never[];
|
|
30
|
+
};
|
|
31
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
32
|
+
menuEvent: (...args: any[]) => void;
|
|
33
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
34
|
+
popconfirm: BooleanConstructor;
|
|
35
|
+
/**
|
|
36
|
+
* the trigger mode which executes the drop-down action
|
|
37
|
+
* @default ['hover']
|
|
38
|
+
* @type string[]
|
|
39
|
+
*/
|
|
40
|
+
trigger: {
|
|
41
|
+
type: PropType<("contextmenu" | "click" | "hover")[]>;
|
|
42
|
+
default: () => string[];
|
|
43
|
+
};
|
|
44
|
+
dropMenuList: {
|
|
45
|
+
type: PropType<(DropMenu & IObject)[]>;
|
|
46
|
+
default: () => never[];
|
|
47
|
+
};
|
|
48
|
+
selectedKeys: {
|
|
49
|
+
type: PropType<string[]>;
|
|
50
|
+
default: () => never[];
|
|
51
|
+
};
|
|
52
|
+
}>> & Readonly<{
|
|
53
|
+
onMenuEvent?: ((...args: any[]) => any) | undefined;
|
|
54
|
+
}>, {
|
|
55
|
+
trigger: ("hover" | "click" | "contextmenu")[];
|
|
56
|
+
popconfirm: boolean;
|
|
57
|
+
dropMenuList: (DropMenu & IObject)[];
|
|
58
|
+
selectedKeys: string[];
|
|
59
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
60
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
61
|
+
export default _default;
|
|
62
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
63
|
+
new (): {
|
|
64
|
+
$slots: S;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Dropdown_vue_vue_type_script_setup_true_lang_default from "./Dropdown.vue_vue_type_script_setup_true_lang.mjs";
|
|
2
|
+
//#region src/components/v-ben-dropdown/src/Dropdown.vue
|
|
3
|
+
var Dropdown_default = Dropdown_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { Dropdown_default as default };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { isFunction } from "../../../utils/is.mjs";
|
|
2
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, openBlock, renderList, renderSlot, toDisplayString, unref, withCtx } from "vue";
|
|
3
|
+
import { omit } from "lodash-es";
|
|
4
|
+
import { Dropdown, Menu, Popconfirm } from "ant-design-vue";
|
|
5
|
+
//#region src/components/v-ben-dropdown/src/Dropdown.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var _hoisted_1 = { class: "ml-1" };
|
|
7
|
+
var _hoisted_2 = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "ml-1"
|
|
10
|
+
};
|
|
11
|
+
var Dropdown_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
12
|
+
name: "VDropdown",
|
|
13
|
+
__name: "Dropdown",
|
|
14
|
+
props: {
|
|
15
|
+
popconfirm: Boolean,
|
|
16
|
+
trigger: {
|
|
17
|
+
type: Array,
|
|
18
|
+
default: () => {
|
|
19
|
+
return ["contextmenu"];
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
dropMenuList: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => []
|
|
25
|
+
},
|
|
26
|
+
selectedKeys: {
|
|
27
|
+
type: Array,
|
|
28
|
+
default: () => []
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
emits: ["menuEvent"],
|
|
32
|
+
setup(__props, { emit: __emit }) {
|
|
33
|
+
const ADropdown = Dropdown;
|
|
34
|
+
const AMenu = Menu;
|
|
35
|
+
const AMenuItem = Menu.Item;
|
|
36
|
+
const AMenuDivider = Menu.Divider;
|
|
37
|
+
const APopconfirm = Popconfirm;
|
|
38
|
+
const props = __props;
|
|
39
|
+
const emit = __emit;
|
|
40
|
+
function handleClickMenu(item) {
|
|
41
|
+
const { event } = item;
|
|
42
|
+
emit("menuEvent", props.dropMenuList.find((item) => `${item.event}` === `${event}`));
|
|
43
|
+
item.onClick?.();
|
|
44
|
+
}
|
|
45
|
+
function getPopConfirmAttrs(attrs) {
|
|
46
|
+
const originAttrs = omit(attrs, [
|
|
47
|
+
"confirm",
|
|
48
|
+
"cancel",
|
|
49
|
+
"icon"
|
|
50
|
+
]);
|
|
51
|
+
if (!attrs.onConfirm && attrs.confirm && isFunction(attrs.confirm)) originAttrs["onConfirm"] = attrs.confirm;
|
|
52
|
+
if (!attrs.onCancel && attrs.cancel && isFunction(attrs.cancel)) originAttrs["onCancel"] = attrs.cancel;
|
|
53
|
+
return originAttrs;
|
|
54
|
+
}
|
|
55
|
+
const getAttr = (key) => ({ key });
|
|
56
|
+
return (_ctx, _cache) => {
|
|
57
|
+
return openBlock(), createBlock(unref(ADropdown), mergeProps({ trigger: __props.trigger }, _ctx.$attrs), {
|
|
58
|
+
overlay: withCtx(() => [createVNode(unref(AMenu), { "selected-keys": __props.selectedKeys }, {
|
|
59
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.dropMenuList, (item) => {
|
|
60
|
+
return openBlock(), createElementBlock(Fragment, { key: `${item.event}` }, [createVNode(unref(AMenuItem), mergeProps({ class: item.class }, { ref_for: true }, getAttr(item.event), {
|
|
61
|
+
disabled: item.disabled,
|
|
62
|
+
onClick: ($event) => handleClickMenu(item)
|
|
63
|
+
}), {
|
|
64
|
+
default: withCtx(() => [__props.popconfirm && item.popConfirm ? (openBlock(), createBlock(unref(APopconfirm), mergeProps({
|
|
65
|
+
key: 0,
|
|
66
|
+
ref_for: true
|
|
67
|
+
}, getPopConfirmAttrs(item.popConfirm)), {
|
|
68
|
+
default: withCtx(() => [createElementVNode("div", null, [createElementVNode("span", _hoisted_1, toDisplayString(item.text), 1)])]),
|
|
69
|
+
_: 2
|
|
70
|
+
}, 1040)) : (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(item.text), 1))]),
|
|
71
|
+
_: 2
|
|
72
|
+
}, 1040, [
|
|
73
|
+
"class",
|
|
74
|
+
"disabled",
|
|
75
|
+
"onClick"
|
|
76
|
+
]), item.divider ? (openBlock(), createBlock(unref(AMenuDivider), { key: `d-${item.event}` })) : createCommentVNode("", true)], 64);
|
|
77
|
+
}), 128))]),
|
|
78
|
+
_: 1
|
|
79
|
+
}, 8, ["selected-keys"])]),
|
|
80
|
+
default: withCtx(() => [createElementVNode("span", null, [renderSlot(_ctx.$slots, "default")]), createTextVNode(" " + toDisplayString(__props.dropMenuList) + " ", 1)]),
|
|
81
|
+
_: 3
|
|
82
|
+
}, 16, ["trigger"]);
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
//#endregion
|
|
87
|
+
export { Dropdown_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
clickToRowSelect: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
isTreeTable: BooleanConstructor;
|
|
7
|
+
tableSetting: {
|
|
8
|
+
type: import('vue').PropType<import('./types/table').TableSetting>;
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
inset: BooleanConstructor;
|
|
12
|
+
showTableSetting: BooleanConstructor;
|
|
13
|
+
autoCreateKey: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
striped: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
showSummary: BooleanConstructor;
|
|
22
|
+
summaryFunc: {
|
|
23
|
+
type: import('vue').PropType<(...arg: unknown[]) => unknown[]>;
|
|
24
|
+
default: null;
|
|
25
|
+
};
|
|
26
|
+
summaryData: {
|
|
27
|
+
type: import('vue').PropType<Recordable[]>;
|
|
28
|
+
default: null;
|
|
29
|
+
};
|
|
30
|
+
indentSize: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
default: number;
|
|
33
|
+
};
|
|
34
|
+
canColDrag: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
api: {
|
|
39
|
+
type: import('vue').PropType<(...arg: unknown[]) => Promise<unknown>>;
|
|
40
|
+
default: null;
|
|
41
|
+
};
|
|
42
|
+
beforeFetch: {
|
|
43
|
+
type: import('vue').PropType<Fn>;
|
|
44
|
+
default: null;
|
|
45
|
+
};
|
|
46
|
+
afterFetch: {
|
|
47
|
+
type: import('vue').PropType<Fn>;
|
|
48
|
+
default: null;
|
|
49
|
+
};
|
|
50
|
+
handleSearchInfoFn: {
|
|
51
|
+
type: import('vue').PropType<Fn>;
|
|
52
|
+
default: null;
|
|
53
|
+
};
|
|
54
|
+
immediate: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
emptyDataIsShowTable: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
62
|
+
searchInfo: {
|
|
63
|
+
type: import('vue').PropType<Recordable>;
|
|
64
|
+
default: null;
|
|
65
|
+
};
|
|
66
|
+
defSort: {
|
|
67
|
+
type: import('vue').PropType<Recordable>;
|
|
68
|
+
default: null;
|
|
69
|
+
};
|
|
70
|
+
useSearchForm: BooleanConstructor;
|
|
71
|
+
columns: {
|
|
72
|
+
type: import('vue').PropType<import('./types/table').BasicColumn[]>;
|
|
73
|
+
default: () => never[];
|
|
74
|
+
};
|
|
75
|
+
showIndexColumn: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
79
|
+
indexColumnProps: {
|
|
80
|
+
type: import('vue').PropType<import('./types/table').BasicColumn>;
|
|
81
|
+
default: null;
|
|
82
|
+
};
|
|
83
|
+
actionColumn: {
|
|
84
|
+
type: import('vue').PropType<import('./types/table').BasicColumn>;
|
|
85
|
+
default: null;
|
|
86
|
+
};
|
|
87
|
+
ellipsis: {
|
|
88
|
+
type: BooleanConstructor;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
91
|
+
isCanResizeParent: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
95
|
+
canResize: {
|
|
96
|
+
type: BooleanConstructor;
|
|
97
|
+
default: boolean;
|
|
98
|
+
};
|
|
99
|
+
clearSelectOnPageChange: BooleanConstructor;
|
|
100
|
+
resizeHeightOffset: {
|
|
101
|
+
type: NumberConstructor;
|
|
102
|
+
default: number;
|
|
103
|
+
};
|
|
104
|
+
rowSelection: {
|
|
105
|
+
type: import('vue').PropType<import('./types/table').TableRowSelection | null>;
|
|
106
|
+
default: null;
|
|
107
|
+
};
|
|
108
|
+
title: {
|
|
109
|
+
type: import('vue').PropType<string | ((data: Recordable) => string)>;
|
|
110
|
+
default: null;
|
|
111
|
+
};
|
|
112
|
+
titleHelpMessage: {
|
|
113
|
+
type: import('vue').PropType<string | string[]>;
|
|
114
|
+
};
|
|
115
|
+
maxHeight: NumberConstructor;
|
|
116
|
+
dataSource: {
|
|
117
|
+
type: import('vue').PropType<Recordable[]>;
|
|
118
|
+
default: null;
|
|
119
|
+
};
|
|
120
|
+
rowKey: {
|
|
121
|
+
type: import('vue').PropType<string | ((record: Recordable) => string)>;
|
|
122
|
+
default: string;
|
|
123
|
+
};
|
|
124
|
+
bordered: BooleanConstructor;
|
|
125
|
+
pagination: {
|
|
126
|
+
type: import('vue').PropType<import('./types/pagination').PaginationProps | boolean>;
|
|
127
|
+
default: null;
|
|
128
|
+
};
|
|
129
|
+
loading: BooleanConstructor;
|
|
130
|
+
rowClassName: {
|
|
131
|
+
type: import('vue').PropType<(record: import('./types/table').TableCustomRecord<unknown>, index: number) => string>;
|
|
132
|
+
};
|
|
133
|
+
scroll: {
|
|
134
|
+
type: import('vue').PropType<{
|
|
135
|
+
x?: number | string | true;
|
|
136
|
+
y?: number | string;
|
|
137
|
+
}>;
|
|
138
|
+
default: null;
|
|
139
|
+
};
|
|
140
|
+
beforeEditSubmit: {
|
|
141
|
+
type: import('vue').PropType<(data: {
|
|
142
|
+
record: Recordable;
|
|
143
|
+
index: number;
|
|
144
|
+
key: string | number;
|
|
145
|
+
value: unknown;
|
|
146
|
+
}) => Promise<unknown>>;
|
|
147
|
+
};
|
|
148
|
+
rowDraggable: {
|
|
149
|
+
type: BooleanConstructor;
|
|
150
|
+
default: boolean;
|
|
151
|
+
};
|
|
152
|
+
supportSameLevel: {
|
|
153
|
+
type: BooleanConstructor;
|
|
154
|
+
default: boolean;
|
|
155
|
+
};
|
|
156
|
+
rowDragApi: {
|
|
157
|
+
type: FunctionConstructor;
|
|
158
|
+
default: null;
|
|
159
|
+
};
|
|
160
|
+
expandedRowKeys: {
|
|
161
|
+
type: import('vue').PropType<string[]>;
|
|
162
|
+
default: () => never[];
|
|
163
|
+
};
|
|
164
|
+
emptyFull: {
|
|
165
|
+
type: BooleanConstructor;
|
|
166
|
+
default: boolean;
|
|
167
|
+
};
|
|
168
|
+
}>, {
|
|
169
|
+
formRef: import('vue').Ref<null, null>;
|
|
170
|
+
tableElRef: import('vue').Ref<null, null>;
|
|
171
|
+
getBindValues: import('vue').ComputedRef<IObject>;
|
|
172
|
+
handleTableChange: (...args: unknown[]) => void;
|
|
173
|
+
expandKeysList: import('vue').Ref<never[], never[]>;
|
|
174
|
+
getEmptyDataIsShowTable: import('vue').ComputedRef<boolean>;
|
|
175
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "change"[], "change", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
176
|
+
clickToRowSelect: {
|
|
177
|
+
type: BooleanConstructor;
|
|
178
|
+
default: boolean;
|
|
179
|
+
};
|
|
180
|
+
isTreeTable: BooleanConstructor;
|
|
181
|
+
tableSetting: {
|
|
182
|
+
type: import('vue').PropType<import('./types/table').TableSetting>;
|
|
183
|
+
default: {};
|
|
184
|
+
};
|
|
185
|
+
inset: BooleanConstructor;
|
|
186
|
+
showTableSetting: BooleanConstructor;
|
|
187
|
+
autoCreateKey: {
|
|
188
|
+
type: BooleanConstructor;
|
|
189
|
+
default: boolean;
|
|
190
|
+
};
|
|
191
|
+
striped: {
|
|
192
|
+
type: BooleanConstructor;
|
|
193
|
+
default: boolean;
|
|
194
|
+
};
|
|
195
|
+
showSummary: BooleanConstructor;
|
|
196
|
+
summaryFunc: {
|
|
197
|
+
type: import('vue').PropType<(...arg: unknown[]) => unknown[]>;
|
|
198
|
+
default: null;
|
|
199
|
+
};
|
|
200
|
+
summaryData: {
|
|
201
|
+
type: import('vue').PropType<Recordable[]>;
|
|
202
|
+
default: null;
|
|
203
|
+
};
|
|
204
|
+
indentSize: {
|
|
205
|
+
type: NumberConstructor;
|
|
206
|
+
default: number;
|
|
207
|
+
};
|
|
208
|
+
canColDrag: {
|
|
209
|
+
type: BooleanConstructor;
|
|
210
|
+
default: boolean;
|
|
211
|
+
};
|
|
212
|
+
api: {
|
|
213
|
+
type: import('vue').PropType<(...arg: unknown[]) => Promise<unknown>>;
|
|
214
|
+
default: null;
|
|
215
|
+
};
|
|
216
|
+
beforeFetch: {
|
|
217
|
+
type: import('vue').PropType<Fn>;
|
|
218
|
+
default: null;
|
|
219
|
+
};
|
|
220
|
+
afterFetch: {
|
|
221
|
+
type: import('vue').PropType<Fn>;
|
|
222
|
+
default: null;
|
|
223
|
+
};
|
|
224
|
+
handleSearchInfoFn: {
|
|
225
|
+
type: import('vue').PropType<Fn>;
|
|
226
|
+
default: null;
|
|
227
|
+
};
|
|
228
|
+
immediate: {
|
|
229
|
+
type: BooleanConstructor;
|
|
230
|
+
default: boolean;
|
|
231
|
+
};
|
|
232
|
+
emptyDataIsShowTable: {
|
|
233
|
+
type: BooleanConstructor;
|
|
234
|
+
default: boolean;
|
|
235
|
+
};
|
|
236
|
+
searchInfo: {
|
|
237
|
+
type: import('vue').PropType<Recordable>;
|
|
238
|
+
default: null;
|
|
239
|
+
};
|
|
240
|
+
defSort: {
|
|
241
|
+
type: import('vue').PropType<Recordable>;
|
|
242
|
+
default: null;
|
|
243
|
+
};
|
|
244
|
+
useSearchForm: BooleanConstructor;
|
|
245
|
+
columns: {
|
|
246
|
+
type: import('vue').PropType<import('./types/table').BasicColumn[]>;
|
|
247
|
+
default: () => never[];
|
|
248
|
+
};
|
|
249
|
+
showIndexColumn: {
|
|
250
|
+
type: BooleanConstructor;
|
|
251
|
+
default: boolean;
|
|
252
|
+
};
|
|
253
|
+
indexColumnProps: {
|
|
254
|
+
type: import('vue').PropType<import('./types/table').BasicColumn>;
|
|
255
|
+
default: null;
|
|
256
|
+
};
|
|
257
|
+
actionColumn: {
|
|
258
|
+
type: import('vue').PropType<import('./types/table').BasicColumn>;
|
|
259
|
+
default: null;
|
|
260
|
+
};
|
|
261
|
+
ellipsis: {
|
|
262
|
+
type: BooleanConstructor;
|
|
263
|
+
default: boolean;
|
|
264
|
+
};
|
|
265
|
+
isCanResizeParent: {
|
|
266
|
+
type: BooleanConstructor;
|
|
267
|
+
default: boolean;
|
|
268
|
+
};
|
|
269
|
+
canResize: {
|
|
270
|
+
type: BooleanConstructor;
|
|
271
|
+
default: boolean;
|
|
272
|
+
};
|
|
273
|
+
clearSelectOnPageChange: BooleanConstructor;
|
|
274
|
+
resizeHeightOffset: {
|
|
275
|
+
type: NumberConstructor;
|
|
276
|
+
default: number;
|
|
277
|
+
};
|
|
278
|
+
rowSelection: {
|
|
279
|
+
type: import('vue').PropType<import('./types/table').TableRowSelection | null>;
|
|
280
|
+
default: null;
|
|
281
|
+
};
|
|
282
|
+
title: {
|
|
283
|
+
type: import('vue').PropType<string | ((data: Recordable) => string)>;
|
|
284
|
+
default: null;
|
|
285
|
+
};
|
|
286
|
+
titleHelpMessage: {
|
|
287
|
+
type: import('vue').PropType<string | string[]>;
|
|
288
|
+
};
|
|
289
|
+
maxHeight: NumberConstructor;
|
|
290
|
+
dataSource: {
|
|
291
|
+
type: import('vue').PropType<Recordable[]>;
|
|
292
|
+
default: null;
|
|
293
|
+
};
|
|
294
|
+
rowKey: {
|
|
295
|
+
type: import('vue').PropType<string | ((record: Recordable) => string)>;
|
|
296
|
+
default: string;
|
|
297
|
+
};
|
|
298
|
+
bordered: BooleanConstructor;
|
|
299
|
+
pagination: {
|
|
300
|
+
type: import('vue').PropType<import('./types/pagination').PaginationProps | boolean>;
|
|
301
|
+
default: null;
|
|
302
|
+
};
|
|
303
|
+
loading: BooleanConstructor;
|
|
304
|
+
rowClassName: {
|
|
305
|
+
type: import('vue').PropType<(record: import('./types/table').TableCustomRecord<unknown>, index: number) => string>;
|
|
306
|
+
};
|
|
307
|
+
scroll: {
|
|
308
|
+
type: import('vue').PropType<{
|
|
309
|
+
x?: number | string | true;
|
|
310
|
+
y?: number | string;
|
|
311
|
+
}>;
|
|
312
|
+
default: null;
|
|
313
|
+
};
|
|
314
|
+
beforeEditSubmit: {
|
|
315
|
+
type: import('vue').PropType<(data: {
|
|
316
|
+
record: Recordable;
|
|
317
|
+
index: number;
|
|
318
|
+
key: string | number;
|
|
319
|
+
value: unknown;
|
|
320
|
+
}) => Promise<unknown>>;
|
|
321
|
+
};
|
|
322
|
+
rowDraggable: {
|
|
323
|
+
type: BooleanConstructor;
|
|
324
|
+
default: boolean;
|
|
325
|
+
};
|
|
326
|
+
supportSameLevel: {
|
|
327
|
+
type: BooleanConstructor;
|
|
328
|
+
default: boolean;
|
|
329
|
+
};
|
|
330
|
+
rowDragApi: {
|
|
331
|
+
type: FunctionConstructor;
|
|
332
|
+
default: null;
|
|
333
|
+
};
|
|
334
|
+
expandedRowKeys: {
|
|
335
|
+
type: import('vue').PropType<string[]>;
|
|
336
|
+
default: () => never[];
|
|
337
|
+
};
|
|
338
|
+
emptyFull: {
|
|
339
|
+
type: BooleanConstructor;
|
|
340
|
+
default: boolean;
|
|
341
|
+
};
|
|
342
|
+
}>> & Readonly<{
|
|
343
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
344
|
+
}>, {
|
|
345
|
+
title: string | ((data: Recordable) => string);
|
|
346
|
+
clickToRowSelect: boolean;
|
|
347
|
+
isTreeTable: boolean;
|
|
348
|
+
tableSetting: import('./types/table').TableSetting;
|
|
349
|
+
inset: boolean;
|
|
350
|
+
showTableSetting: boolean;
|
|
351
|
+
autoCreateKey: boolean;
|
|
352
|
+
striped: boolean;
|
|
353
|
+
showSummary: boolean;
|
|
354
|
+
summaryFunc: (...arg: unknown[]) => unknown[];
|
|
355
|
+
summaryData: Recordable<unknown>[];
|
|
356
|
+
indentSize: number;
|
|
357
|
+
canColDrag: boolean;
|
|
358
|
+
api: (...arg: unknown[]) => Promise<unknown>;
|
|
359
|
+
beforeFetch: Fn<any, any>;
|
|
360
|
+
afterFetch: Fn<any, any>;
|
|
361
|
+
handleSearchInfoFn: Fn<any, any>;
|
|
362
|
+
immediate: boolean;
|
|
363
|
+
emptyDataIsShowTable: boolean;
|
|
364
|
+
searchInfo: Recordable<unknown>;
|
|
365
|
+
defSort: Recordable<unknown>;
|
|
366
|
+
useSearchForm: boolean;
|
|
367
|
+
columns: import('./types/table').BasicColumn[];
|
|
368
|
+
showIndexColumn: boolean;
|
|
369
|
+
indexColumnProps: import('./types/table').BasicColumn;
|
|
370
|
+
actionColumn: import('./types/table').BasicColumn;
|
|
371
|
+
ellipsis: boolean;
|
|
372
|
+
isCanResizeParent: boolean;
|
|
373
|
+
canResize: boolean;
|
|
374
|
+
clearSelectOnPageChange: boolean;
|
|
375
|
+
resizeHeightOffset: number;
|
|
376
|
+
rowSelection: import('./types/table').TableRowSelection<unknown> | null;
|
|
377
|
+
dataSource: Recordable<unknown>[];
|
|
378
|
+
rowKey: string | ((record: Recordable) => string);
|
|
379
|
+
bordered: boolean;
|
|
380
|
+
pagination: boolean | import('./types/pagination').PaginationProps;
|
|
381
|
+
loading: boolean;
|
|
382
|
+
scroll: {
|
|
383
|
+
x?: number | string | true;
|
|
384
|
+
y?: number | string;
|
|
385
|
+
};
|
|
386
|
+
rowDraggable: boolean;
|
|
387
|
+
supportSameLevel: boolean;
|
|
388
|
+
rowDragApi: Function;
|
|
389
|
+
expandedRowKeys: string[];
|
|
390
|
+
emptyFull: boolean;
|
|
391
|
+
}, {}, {
|
|
392
|
+
HeaderCell: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
393
|
+
column: {
|
|
394
|
+
type: import('vue').PropType<import('./types/table').BasicColumn>;
|
|
395
|
+
default: () => {};
|
|
396
|
+
};
|
|
397
|
+
}>, {
|
|
398
|
+
getTitle: import('vue').ComputedRef<string | number | boolean | void | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
399
|
+
[key: string]: any;
|
|
400
|
+
}> | import('vue').VNodeArrayChildren | ((props: import('ant-design-vue/lib/table/interface').ColumnTitleProps<Recordable<unknown>>) => import('ant-design-vue/lib/_util/type').VueNode) | null>;
|
|
401
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
402
|
+
column: {
|
|
403
|
+
type: import('vue').PropType<import('./types/table').BasicColumn>;
|
|
404
|
+
default: () => {};
|
|
405
|
+
};
|
|
406
|
+
}>> & Readonly<{}>, {
|
|
407
|
+
column: import('./types/table').BasicColumn;
|
|
408
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
409
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
410
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
|
+
import BasicTable_vue_vue_type_script_lang_default from "./BasicTable.vue_vue_type_script_lang.mjs";
|
|
3
|
+
import { Fragment, createBlock, createElementBlock, createSlots, createVNode, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderList, renderSlot, resolveComponent, vShow, withCtx, withDirectives } from "vue";
|
|
4
|
+
//#region src/components/v-ben-table/src/BasicTable.vue
|
|
5
|
+
var _hoisted_1 = { ref: "wrapRef" };
|
|
6
|
+
var _hoisted_2 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "pr26px"
|
|
9
|
+
};
|
|
10
|
+
var _hoisted_3 = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "pr8px"
|
|
13
|
+
};
|
|
14
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15
|
+
const _component_HeaderCell = resolveComponent("HeaderCell");
|
|
16
|
+
const _component_a_table = resolveComponent("a-table");
|
|
17
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "beforeTable"), withDirectives(createVNode(_component_a_table, mergeProps({ ref: "tableElRef" }, _ctx.getBindValues, {
|
|
18
|
+
"expanded-row-keys": _ctx.expandKeysList,
|
|
19
|
+
"onUpdate:expandedRowKeys": _cache[0] || (_cache[0] = ($event) => _ctx.expandKeysList = $event),
|
|
20
|
+
onChange: _ctx.handleTableChange
|
|
21
|
+
}), createSlots({
|
|
22
|
+
headerCell: withCtx(({ column }) => [_ctx.rowDraggable && column?.dataIndex === _ctx.getBindValues.columns[0].dataIndex ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_ctx.isTreeTable ? (openBlock(), createElementBlock("span", _hoisted_2)) : (openBlock(), createElementBlock("span", _hoisted_3)), createVNode(_component_HeaderCell, { column }, null, 8, ["column"])], 64)) : (openBlock(), createBlock(_component_HeaderCell, {
|
|
23
|
+
key: 1,
|
|
24
|
+
column
|
|
25
|
+
}, null, 8, ["column"]))]),
|
|
26
|
+
bodyCell: withCtx((data) => [renderSlot(_ctx.$slots, "bodyCell", normalizeProps(guardReactiveProps(data || {})))]),
|
|
27
|
+
_: 2
|
|
28
|
+
}, [renderList(Object.keys(_ctx.$slots), (item) => {
|
|
29
|
+
return {
|
|
30
|
+
name: item,
|
|
31
|
+
fn: withCtx((data) => [renderSlot(_ctx.$slots, item, normalizeProps(guardReactiveProps(data || {})))])
|
|
32
|
+
};
|
|
33
|
+
})]), 1040, ["expanded-row-keys", "onChange"]), [[vShow, _ctx.getEmptyDataIsShowTable]])], 512);
|
|
34
|
+
}
|
|
35
|
+
var BasicTable_default = /* @__PURE__ */ _plugin_vue_export_helper_default(BasicTable_vue_vue_type_script_lang_default, [["render", _sfc_render]]);
|
|
36
|
+
//#endregion
|
|
37
|
+
export { BasicTable_default as default };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import HeaderCell_default from "./components/HeaderCell.vue.mjs";
|
|
2
|
+
import { basicProps } from "./props.mjs";
|
|
3
|
+
import { computed, defineComponent, ref } from "vue";
|
|
4
|
+
import { omit } from "lodash-es";
|
|
5
|
+
//#region src/components/v-ben-table/src/BasicTable.vue?vue&type=script&lang.ts
|
|
6
|
+
var BasicTable_vue_vue_type_script_lang_default = defineComponent({
|
|
7
|
+
name: "BasicTable",
|
|
8
|
+
components: { HeaderCell: HeaderCell_default },
|
|
9
|
+
props: basicProps,
|
|
10
|
+
emits: ["change"],
|
|
11
|
+
setup(props, { attrs, emit, slots, expose }) {
|
|
12
|
+
const tableElRef = ref(null);
|
|
13
|
+
const expandKeysList = ref([]);
|
|
14
|
+
const formRef = ref(null);
|
|
15
|
+
const getBindValues = computed(() => {
|
|
16
|
+
let propsData = { ...attrs };
|
|
17
|
+
propsData = omit(propsData, ["class", "onChange"]);
|
|
18
|
+
return propsData;
|
|
19
|
+
});
|
|
20
|
+
function handleTableChange(...args) {
|
|
21
|
+
emit("change", ...args);
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
formRef,
|
|
25
|
+
tableElRef,
|
|
26
|
+
getBindValues,
|
|
27
|
+
handleTableChange,
|
|
28
|
+
expandKeysList,
|
|
29
|
+
getEmptyDataIsShowTable: computed(() => {
|
|
30
|
+
const { emptyDataIsShowTable, useSearchForm, dataSource } = props;
|
|
31
|
+
if (emptyDataIsShowTable || !useSearchForm) return true;
|
|
32
|
+
return !!dataSource.length;
|
|
33
|
+
})
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
mounted() {
|
|
37
|
+
this.expandKeysList = this.getBindValues.expandedRowKeys;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
//#endregion
|
|
41
|
+
export { BasicTable_vue_vue_type_script_lang_default as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { BasicColumn } from '../types/table';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
column: {
|
|
5
|
+
type: PropType<BasicColumn>;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
}>, {
|
|
9
|
+
getTitle: import('vue').ComputedRef<string | number | boolean | void | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}> | import('vue').VNodeArrayChildren | ((props: import('ant-design-vue/lib/table/interface').ColumnTitleProps<Recordable<unknown>>) => import('ant-design-vue/lib/_util/type').VueNode) | null>;
|
|
12
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
13
|
+
column: {
|
|
14
|
+
type: PropType<BasicColumn>;
|
|
15
|
+
default: () => {};
|
|
16
|
+
};
|
|
17
|
+
}>> & Readonly<{}>, {
|
|
18
|
+
column: BasicColumn;
|
|
19
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
export default _default;
|