@vunk/plus 0.0.3 → 0.1.0
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/components/monaco-editor/index.mjs +2 -2
- package/components/monaco-editor/src/ctx.d.ts +1 -1
- package/components/table-columns/index.d.ts +5 -0
- package/components/table-columns/index.mjs +138 -0
- package/components/table-columns/src/ctx.d.ts +66 -0
- package/components/table-columns/src/el-ctx.d.ts +63 -0
- package/components/table-columns/src/index.vue.d.ts +280 -0
- package/components/table-columns/src/types.d.ts +21 -0
- package/components/typing-markdown/src/index.vue.d.ts +2 -2
- package/package.json +5 -1
|
@@ -22,13 +22,13 @@ const createBindProps = bindPropsFactory(props);
|
|
|
22
22
|
const emits = {
|
|
23
23
|
"update:modelValue": null
|
|
24
24
|
};
|
|
25
|
-
const
|
|
25
|
+
const createOnEmits = onEmitsFactory(emits);
|
|
26
26
|
|
|
27
27
|
var ctx = /*#__PURE__*/Object.freeze({
|
|
28
28
|
__proto__: null,
|
|
29
29
|
createBindProps: createBindProps,
|
|
30
|
+
createOnEmits: createOnEmits,
|
|
30
31
|
emits: emits,
|
|
31
|
-
onEmits: onEmits,
|
|
32
32
|
props: props
|
|
33
33
|
});
|
|
34
34
|
|
|
@@ -18,6 +18,6 @@ export declare const createBindProps: <T2 extends import("@vunk/core").NormalObj
|
|
|
18
18
|
export declare const emits: {
|
|
19
19
|
'update:modelValue': any;
|
|
20
20
|
};
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends "update:modelValue"[]>(emit: T2, excludes?: EX) => { [P in EX extends (infer KE)[] ? Exclude<"update:modelValue", KE> : "update:modelValue"]: {
|
|
22
22
|
'update:modelValue': (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
23
23
|
}[P]; };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { bindPropsFactory } from '@vunk/core/shared/utils-vue';
|
|
2
|
+
import { defineComponent, unref, h } from 'vue';
|
|
3
|
+
import { ElTableColumn } from 'element-plus';
|
|
4
|
+
import { isPlainObject, pickObject } from '@vunk/shared/object';
|
|
5
|
+
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
6
|
+
|
|
7
|
+
const tableColumnProps = {
|
|
8
|
+
type: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "default"
|
|
11
|
+
},
|
|
12
|
+
label: String,
|
|
13
|
+
className: String,
|
|
14
|
+
labelClassName: String,
|
|
15
|
+
property: String,
|
|
16
|
+
prop: String,
|
|
17
|
+
width: {
|
|
18
|
+
type: [String, Number],
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
minWidth: {
|
|
22
|
+
type: [String, Number],
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
renderHeader: Function,
|
|
26
|
+
sortable: {
|
|
27
|
+
type: [Boolean, String],
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
sortMethod: Function,
|
|
31
|
+
sortBy: [String, Function, Array],
|
|
32
|
+
resizable: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: true
|
|
35
|
+
},
|
|
36
|
+
columnKey: String,
|
|
37
|
+
align: String,
|
|
38
|
+
headerAlign: String,
|
|
39
|
+
showTooltipWhenOverflow: Boolean,
|
|
40
|
+
showOverflowTooltip: Boolean,
|
|
41
|
+
fixed: [Boolean, String],
|
|
42
|
+
formatter: Function,
|
|
43
|
+
selectable: Function,
|
|
44
|
+
reserveSelection: Boolean,
|
|
45
|
+
filterMethod: Function,
|
|
46
|
+
filteredValue: Array,
|
|
47
|
+
filters: Array,
|
|
48
|
+
filterPlacement: String,
|
|
49
|
+
filterMultiple: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: true
|
|
52
|
+
},
|
|
53
|
+
index: [Number, Function],
|
|
54
|
+
sortOrders: {
|
|
55
|
+
type: Array,
|
|
56
|
+
default: () => {
|
|
57
|
+
return ["ascending", "descending", null];
|
|
58
|
+
},
|
|
59
|
+
validator: (val) => {
|
|
60
|
+
return val.every(
|
|
61
|
+
(order) => ["ascending", "descending", null].includes(order)
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const createTableColumnBindProps = bindPropsFactory(tableColumnProps);
|
|
67
|
+
|
|
68
|
+
var elCtx = /*#__PURE__*/Object.freeze({
|
|
69
|
+
__proto__: null,
|
|
70
|
+
createTableColumnBindProps: createTableColumnBindProps,
|
|
71
|
+
tableColumnProps: tableColumnProps
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const props = {
|
|
75
|
+
...tableColumnProps,
|
|
76
|
+
source: {
|
|
77
|
+
type: Array,
|
|
78
|
+
default: () => []
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var _sfc_main = defineComponent({
|
|
83
|
+
name: "VkTableColumns",
|
|
84
|
+
components: {
|
|
85
|
+
ElTableColumn
|
|
86
|
+
},
|
|
87
|
+
props,
|
|
88
|
+
setup(props2) {
|
|
89
|
+
const coreBindProps = createTableColumnBindProps(props2);
|
|
90
|
+
return () => {
|
|
91
|
+
const createCols = (source = props2.source) => {
|
|
92
|
+
return source.reduce((a, item) => {
|
|
93
|
+
const hidden = unref(item.hidden);
|
|
94
|
+
if (hidden) {
|
|
95
|
+
return a;
|
|
96
|
+
}
|
|
97
|
+
let slots = {};
|
|
98
|
+
if (isPlainObject(item.slots)) {
|
|
99
|
+
slots = item.slots;
|
|
100
|
+
}
|
|
101
|
+
if (typeof item.slots === "function") {
|
|
102
|
+
slots.default = item.slots;
|
|
103
|
+
}
|
|
104
|
+
if (item.children) {
|
|
105
|
+
slots.default = () => createCols(item.children);
|
|
106
|
+
}
|
|
107
|
+
const attr = {
|
|
108
|
+
key: item.prop,
|
|
109
|
+
...coreBindProps.value,
|
|
110
|
+
...pickObject(item, {
|
|
111
|
+
excludes: ["children", "slots"]
|
|
112
|
+
})
|
|
113
|
+
};
|
|
114
|
+
Object.keys(attr).forEach((key) => {
|
|
115
|
+
if (attr[key] === void 0 || attr[key] === null || attr[key] === "") {
|
|
116
|
+
Reflect.deleteProperty(attr, key);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
a.push(h(ElTableColumn, attr, slots));
|
|
120
|
+
return a;
|
|
121
|
+
}, []);
|
|
122
|
+
};
|
|
123
|
+
return createCols(props2.source);
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
var VkTableColumns = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/table-columns/src/index.vue"]]);
|
|
129
|
+
|
|
130
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
131
|
+
__proto__: null
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
VkTableColumns.install = (app) => {
|
|
135
|
+
app.component(VkTableColumns.name, VkTableColumns);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export { VkTableColumns, elCtx as _VkTableColumnsElCtx, types as __VkTableColumns, VkTableColumns as default };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Source } from './types';
|
|
3
|
+
export declare const props: {
|
|
4
|
+
source: {
|
|
5
|
+
type: PropType<Source<any>[]>;
|
|
6
|
+
default: () => any[];
|
|
7
|
+
};
|
|
8
|
+
type: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
label: StringConstructor;
|
|
13
|
+
className: StringConstructor;
|
|
14
|
+
labelClassName: StringConstructor;
|
|
15
|
+
property: StringConstructor;
|
|
16
|
+
prop: StringConstructor;
|
|
17
|
+
width: {
|
|
18
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
minWidth: {
|
|
22
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
renderHeader: PropType<(data: {
|
|
26
|
+
column: import("element-plus").TableColumnCtx<any>;
|
|
27
|
+
$index: number;
|
|
28
|
+
}) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}>>;
|
|
31
|
+
sortable: {
|
|
32
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
sortMethod: PropType<(a: any, b: any) => number>;
|
|
36
|
+
sortBy: PropType<string | string[] | ((row: any, index: number) => string)>;
|
|
37
|
+
resizable: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
columnKey: StringConstructor;
|
|
42
|
+
align: StringConstructor;
|
|
43
|
+
headerAlign: StringConstructor;
|
|
44
|
+
showTooltipWhenOverflow: BooleanConstructor;
|
|
45
|
+
showOverflowTooltip: BooleanConstructor;
|
|
46
|
+
fixed: (StringConstructor | BooleanConstructor)[];
|
|
47
|
+
formatter: PropType<(row: any, column: import("element-plus").TableColumnCtx<any>, cellValue: any, index: number) => string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
}>>;
|
|
50
|
+
selectable: PropType<(row: any, index: number) => boolean>;
|
|
51
|
+
reserveSelection: BooleanConstructor;
|
|
52
|
+
filterMethod: PropType<import("element-plus/es/components/table/src/table-column/defaults").FilterMethods<any>>;
|
|
53
|
+
filteredValue: PropType<string[]>;
|
|
54
|
+
filters: PropType<import("element-plus/es/components/table/src/table-column/defaults").Filters>;
|
|
55
|
+
filterPlacement: StringConstructor;
|
|
56
|
+
filterMultiple: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
index: PropType<number | ((index: number) => number)>;
|
|
61
|
+
sortOrders: {
|
|
62
|
+
type: PropType<("ascending" | "descending")[]>;
|
|
63
|
+
default: () => string[];
|
|
64
|
+
validator: (val: ("ascending" | "descending")[]) => boolean;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { TableColumnCtx } from 'element-plus/es/components/table/src/table-column/defaults';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
export declare const tableColumnProps: {
|
|
4
|
+
type: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
label: StringConstructor;
|
|
9
|
+
className: StringConstructor;
|
|
10
|
+
labelClassName: StringConstructor;
|
|
11
|
+
property: StringConstructor;
|
|
12
|
+
prop: StringConstructor;
|
|
13
|
+
width: {
|
|
14
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
minWidth: {
|
|
18
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
renderHeader: PropType<(data: {
|
|
22
|
+
column: TableColumnCtx<any>;
|
|
23
|
+
$index: number;
|
|
24
|
+
}) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}>>;
|
|
27
|
+
sortable: {
|
|
28
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
sortMethod: PropType<(a: any, b: any) => number>;
|
|
32
|
+
sortBy: PropType<string | string[] | ((row: any, index: number) => string)>;
|
|
33
|
+
resizable: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
columnKey: StringConstructor;
|
|
38
|
+
align: StringConstructor;
|
|
39
|
+
headerAlign: StringConstructor;
|
|
40
|
+
showTooltipWhenOverflow: BooleanConstructor;
|
|
41
|
+
showOverflowTooltip: BooleanConstructor;
|
|
42
|
+
fixed: (StringConstructor | BooleanConstructor)[];
|
|
43
|
+
formatter: PropType<(row: any, column: TableColumnCtx<any>, cellValue: any, index: number) => string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
}>>;
|
|
46
|
+
selectable: PropType<(row: any, index: number) => boolean>;
|
|
47
|
+
reserveSelection: BooleanConstructor;
|
|
48
|
+
filterMethod: PropType<import("element-plus/es/components/table/src/table-column/defaults").FilterMethods<any>>;
|
|
49
|
+
filteredValue: PropType<string[]>;
|
|
50
|
+
filters: PropType<import("element-plus/es/components/table/src/table-column/defaults").Filters>;
|
|
51
|
+
filterPlacement: StringConstructor;
|
|
52
|
+
filterMultiple: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
index: PropType<number | ((index: number) => number)>;
|
|
57
|
+
sortOrders: {
|
|
58
|
+
type: PropType<("ascending" | "descending")[]>;
|
|
59
|
+
default: () => string[];
|
|
60
|
+
validator: (val: TableColumnCtx<unknown>['sortOrders']) => boolean;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export declare const createTableColumnBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"fixed", keyof T2> | Extract<"filters", keyof T2> | Extract<"type", keyof T2> | Extract<"renderHeader", keyof T2> | Extract<"sortMethod", keyof T2> | Extract<"sortBy", keyof T2> | Extract<"formatter", keyof T2> | Extract<"selectable", keyof T2> | Extract<"filterMethod", keyof T2> | Extract<"filteredValue", keyof T2> | Extract<"index", keyof T2> | Extract<"sortOrders", keyof T2> | Extract<"label", keyof T2> | Extract<"className", keyof T2> | Extract<"labelClassName", keyof T2> | Extract<"property", keyof T2> | Extract<"prop", keyof T2> | Extract<"width", keyof T2> | Extract<"minWidth", keyof T2> | Extract<"sortable", keyof T2> | Extract<"resizable", keyof T2> | Extract<"columnKey", keyof T2> | Extract<"align", keyof T2> | Extract<"headerAlign", keyof T2> | Extract<"showOverflowTooltip", keyof T2> | Extract<"reserveSelection", keyof T2> | Extract<"filterPlacement", keyof T2> | Extract<"filterMultiple", keyof T2> | Extract<"showTooltipWhenOverflow", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"fixed", keyof T2>, KE> | Exclude<Extract<"filters", keyof T2>, KE> | Exclude<Extract<"type", keyof T2>, KE> | Exclude<Extract<"renderHeader", keyof T2>, KE> | Exclude<Extract<"sortMethod", keyof T2>, KE> | Exclude<Extract<"sortBy", keyof T2>, KE> | Exclude<Extract<"formatter", keyof T2>, KE> | Exclude<Extract<"selectable", keyof T2>, KE> | Exclude<Extract<"filterMethod", keyof T2>, KE> | Exclude<Extract<"filteredValue", keyof T2>, KE> | Exclude<Extract<"index", keyof T2>, KE> | Exclude<Extract<"sortOrders", keyof T2>, KE> | Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"className", keyof T2>, KE> | Exclude<Extract<"labelClassName", keyof T2>, KE> | Exclude<Extract<"property", keyof T2>, KE> | Exclude<Extract<"prop", keyof T2>, KE> | Exclude<Extract<"width", keyof T2>, KE> | Exclude<Extract<"minWidth", keyof T2>, KE> | Exclude<Extract<"sortable", keyof T2>, KE> | Exclude<Extract<"resizable", keyof T2>, KE> | Exclude<Extract<"columnKey", keyof T2>, KE> | Exclude<Extract<"align", keyof T2>, KE> | Exclude<Extract<"headerAlign", keyof T2>, KE> | Exclude<Extract<"showOverflowTooltip", keyof T2>, KE> | Exclude<Extract<"reserveSelection", keyof T2>, KE> | Exclude<Extract<"filterPlacement", keyof T2>, KE> | Exclude<Extract<"filterMultiple", keyof T2>, KE> | Exclude<Extract<"showTooltipWhenOverflow", keyof T2>, KE> : Extract<"fixed", keyof T2> | Extract<"filters", keyof T2> | Extract<"type", keyof T2> | Extract<"renderHeader", keyof T2> | Extract<"sortMethod", keyof T2> | Extract<"sortBy", keyof T2> | Extract<"formatter", keyof T2> | Extract<"selectable", keyof T2> | Extract<"filterMethod", keyof T2> | Extract<"filteredValue", keyof T2> | Extract<"index", keyof T2> | Extract<"sortOrders", keyof T2> | Extract<"label", keyof T2> | Extract<"className", keyof T2> | Extract<"labelClassName", keyof T2> | Extract<"property", keyof T2> | Extract<"prop", keyof T2> | Extract<"width", keyof T2> | Extract<"minWidth", keyof T2> | Extract<"sortable", keyof T2> | Extract<"resizable", keyof T2> | Extract<"columnKey", keyof T2> | Extract<"align", keyof T2> | Extract<"headerAlign", keyof T2> | Extract<"showOverflowTooltip", keyof T2> | Extract<"reserveSelection", keyof T2> | Extract<"filterPlacement", keyof T2> | Extract<"filterMultiple", keyof T2> | Extract<"showTooltipWhenOverflow", keyof T2>]: { [k in Extract<"fixed", keyof T2> | Extract<"filters", keyof T2> | Extract<"type", keyof T2> | Extract<"renderHeader", keyof T2> | Extract<"sortMethod", keyof T2> | Extract<"sortBy", keyof T2> | Extract<"formatter", keyof T2> | Extract<"selectable", keyof T2> | Extract<"filterMethod", keyof T2> | Extract<"filteredValue", keyof T2> | Extract<"index", keyof T2> | Extract<"sortOrders", keyof T2> | Extract<"label", keyof T2> | Extract<"className", keyof T2> | Extract<"labelClassName", keyof T2> | Extract<"property", keyof T2> | Extract<"prop", keyof T2> | Extract<"width", keyof T2> | Extract<"minWidth", keyof T2> | Extract<"sortable", keyof T2> | Extract<"resizable", keyof T2> | Extract<"columnKey", keyof T2> | Extract<"align", keyof T2> | Extract<"headerAlign", keyof T2> | Extract<"showOverflowTooltip", keyof T2> | Extract<"reserveSelection", keyof T2> | Extract<"filterPlacement", keyof T2> | Extract<"filterMultiple", keyof T2> | Extract<"showTooltipWhenOverflow", keyof T2>]: T2[k]; }[P]; }>;
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { Source } from './types';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
source: {
|
|
5
|
+
type: import("vue").PropType<Source<any>[]>;
|
|
6
|
+
default: () => any[];
|
|
7
|
+
};
|
|
8
|
+
type: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
label: StringConstructor;
|
|
13
|
+
className: StringConstructor;
|
|
14
|
+
labelClassName: StringConstructor;
|
|
15
|
+
property: StringConstructor;
|
|
16
|
+
prop: StringConstructor;
|
|
17
|
+
width: {
|
|
18
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
minWidth: {
|
|
22
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
renderHeader: import("vue").PropType<(data: {
|
|
26
|
+
column: import("element-plus").TableColumnCtx<any>;
|
|
27
|
+
$index: number;
|
|
28
|
+
}) => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}>>;
|
|
31
|
+
sortable: {
|
|
32
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
sortMethod: import("vue").PropType<(a: any, b: any) => number>;
|
|
36
|
+
sortBy: import("vue").PropType<string | string[] | ((row: any, index: number) => string)>;
|
|
37
|
+
resizable: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
columnKey: StringConstructor;
|
|
42
|
+
align: StringConstructor;
|
|
43
|
+
headerAlign: StringConstructor;
|
|
44
|
+
showTooltipWhenOverflow: BooleanConstructor;
|
|
45
|
+
showOverflowTooltip: BooleanConstructor;
|
|
46
|
+
fixed: (StringConstructor | BooleanConstructor)[];
|
|
47
|
+
formatter: import("vue").PropType<(row: any, column: import("element-plus").TableColumnCtx<any>, cellValue: any, index: number) => string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
}>>;
|
|
50
|
+
selectable: import("vue").PropType<(row: any, index: number) => boolean>;
|
|
51
|
+
reserveSelection: BooleanConstructor;
|
|
52
|
+
filterMethod: import("vue").PropType<import("element-plus/es/components/table/src/table-column/defaults").FilterMethods<any>>;
|
|
53
|
+
filteredValue: import("vue").PropType<string[]>;
|
|
54
|
+
filters: import("vue").PropType<import("element-plus/es/components/table/src/table-column/defaults").Filters>;
|
|
55
|
+
filterPlacement: StringConstructor;
|
|
56
|
+
filterMultiple: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
index: import("vue").PropType<number | ((index: number) => number)>;
|
|
61
|
+
sortOrders: {
|
|
62
|
+
type: import("vue").PropType<("ascending" | "descending")[]>;
|
|
63
|
+
default: () => string[];
|
|
64
|
+
validator: (val: ("ascending" | "descending")[]) => boolean;
|
|
65
|
+
};
|
|
66
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
67
|
+
[key: string]: any;
|
|
68
|
+
}>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
69
|
+
source: {
|
|
70
|
+
type: import("vue").PropType<Source<any>[]>;
|
|
71
|
+
default: () => any[];
|
|
72
|
+
};
|
|
73
|
+
type: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
default: string;
|
|
76
|
+
};
|
|
77
|
+
label: StringConstructor;
|
|
78
|
+
className: StringConstructor;
|
|
79
|
+
labelClassName: StringConstructor;
|
|
80
|
+
property: StringConstructor;
|
|
81
|
+
prop: StringConstructor;
|
|
82
|
+
width: {
|
|
83
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
84
|
+
default: string;
|
|
85
|
+
};
|
|
86
|
+
minWidth: {
|
|
87
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
88
|
+
default: string;
|
|
89
|
+
};
|
|
90
|
+
renderHeader: import("vue").PropType<(data: {
|
|
91
|
+
column: import("element-plus").TableColumnCtx<any>;
|
|
92
|
+
$index: number;
|
|
93
|
+
}) => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
94
|
+
[key: string]: any;
|
|
95
|
+
}>>;
|
|
96
|
+
sortable: {
|
|
97
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
98
|
+
default: boolean;
|
|
99
|
+
};
|
|
100
|
+
sortMethod: import("vue").PropType<(a: any, b: any) => number>;
|
|
101
|
+
sortBy: import("vue").PropType<string | string[] | ((row: any, index: number) => string)>;
|
|
102
|
+
resizable: {
|
|
103
|
+
type: BooleanConstructor;
|
|
104
|
+
default: boolean;
|
|
105
|
+
};
|
|
106
|
+
columnKey: StringConstructor;
|
|
107
|
+
align: StringConstructor;
|
|
108
|
+
headerAlign: StringConstructor;
|
|
109
|
+
showTooltipWhenOverflow: BooleanConstructor;
|
|
110
|
+
showOverflowTooltip: BooleanConstructor;
|
|
111
|
+
fixed: (StringConstructor | BooleanConstructor)[];
|
|
112
|
+
formatter: import("vue").PropType<(row: any, column: import("element-plus").TableColumnCtx<any>, cellValue: any, index: number) => string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
113
|
+
[key: string]: any;
|
|
114
|
+
}>>;
|
|
115
|
+
selectable: import("vue").PropType<(row: any, index: number) => boolean>;
|
|
116
|
+
reserveSelection: BooleanConstructor;
|
|
117
|
+
filterMethod: import("vue").PropType<import("element-plus/es/components/table/src/table-column/defaults").FilterMethods<any>>;
|
|
118
|
+
filteredValue: import("vue").PropType<string[]>;
|
|
119
|
+
filters: import("vue").PropType<import("element-plus/es/components/table/src/table-column/defaults").Filters>;
|
|
120
|
+
filterPlacement: StringConstructor;
|
|
121
|
+
filterMultiple: {
|
|
122
|
+
type: BooleanConstructor;
|
|
123
|
+
default: boolean;
|
|
124
|
+
};
|
|
125
|
+
index: import("vue").PropType<number | ((index: number) => number)>;
|
|
126
|
+
sortOrders: {
|
|
127
|
+
type: import("vue").PropType<("ascending" | "descending")[]>;
|
|
128
|
+
default: () => string[];
|
|
129
|
+
validator: (val: ("ascending" | "descending")[]) => boolean;
|
|
130
|
+
};
|
|
131
|
+
}>> & Readonly<{}>, {
|
|
132
|
+
type: string;
|
|
133
|
+
sortOrders: ("ascending" | "descending")[];
|
|
134
|
+
width: string | number;
|
|
135
|
+
minWidth: string | number;
|
|
136
|
+
sortable: string | boolean;
|
|
137
|
+
resizable: boolean;
|
|
138
|
+
showOverflowTooltip: boolean;
|
|
139
|
+
reserveSelection: boolean;
|
|
140
|
+
filterMultiple: boolean;
|
|
141
|
+
source: Source<any>[];
|
|
142
|
+
showTooltipWhenOverflow: boolean;
|
|
143
|
+
}, {}, {
|
|
144
|
+
ElTableColumn: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
145
|
+
type: {
|
|
146
|
+
type: StringConstructor;
|
|
147
|
+
default: string;
|
|
148
|
+
};
|
|
149
|
+
label: StringConstructor;
|
|
150
|
+
className: StringConstructor;
|
|
151
|
+
labelClassName: StringConstructor;
|
|
152
|
+
property: StringConstructor;
|
|
153
|
+
prop: StringConstructor;
|
|
154
|
+
width: {
|
|
155
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
156
|
+
default: string;
|
|
157
|
+
};
|
|
158
|
+
minWidth: {
|
|
159
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
160
|
+
default: string;
|
|
161
|
+
};
|
|
162
|
+
renderHeader: import("vue").PropType<(data: {
|
|
163
|
+
column: import("element-plus").TableColumnCtx<any>;
|
|
164
|
+
$index: number;
|
|
165
|
+
}) => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
166
|
+
[key: string]: any;
|
|
167
|
+
}>>;
|
|
168
|
+
sortable: {
|
|
169
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
170
|
+
default: boolean;
|
|
171
|
+
};
|
|
172
|
+
sortMethod: import("vue").PropType<(a: any, b: any) => number>;
|
|
173
|
+
sortBy: import("vue").PropType<string | string[] | ((row: any, index: number) => string)>;
|
|
174
|
+
resizable: {
|
|
175
|
+
type: BooleanConstructor;
|
|
176
|
+
default: boolean;
|
|
177
|
+
};
|
|
178
|
+
columnKey: StringConstructor;
|
|
179
|
+
align: StringConstructor;
|
|
180
|
+
headerAlign: StringConstructor;
|
|
181
|
+
showOverflowTooltip: {
|
|
182
|
+
type: import("vue").PropType<boolean | Partial<Pick<import("element-plus").ElTooltipProps, "showArrow" | "appendTo" | "transition" | "effect" | "enterable" | "popperClass" | "offset" | "placement" | "popperOptions" | "showAfter" | "hideAfter">>>;
|
|
183
|
+
default: undefined;
|
|
184
|
+
};
|
|
185
|
+
fixed: (StringConstructor | BooleanConstructor)[];
|
|
186
|
+
formatter: import("vue").PropType<(row: any, column: import("element-plus").TableColumnCtx<any>, cellValue: any, index: number) => string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
187
|
+
[key: string]: any;
|
|
188
|
+
}>>;
|
|
189
|
+
selectable: import("vue").PropType<(row: any, index: number) => boolean>;
|
|
190
|
+
reserveSelection: BooleanConstructor;
|
|
191
|
+
filterMethod: import("vue").PropType<import("element-plus/es/components/table/src/table-column/defaults").FilterMethods<any>>;
|
|
192
|
+
filteredValue: import("vue").PropType<string[]>;
|
|
193
|
+
filters: import("vue").PropType<import("element-plus/es/components/table/src/table-column/defaults").Filters>;
|
|
194
|
+
filterPlacement: StringConstructor;
|
|
195
|
+
filterMultiple: {
|
|
196
|
+
type: BooleanConstructor;
|
|
197
|
+
default: boolean;
|
|
198
|
+
};
|
|
199
|
+
filterClassName: StringConstructor;
|
|
200
|
+
index: import("vue").PropType<number | ((index: number) => number)>;
|
|
201
|
+
sortOrders: {
|
|
202
|
+
type: import("vue").PropType<("ascending" | "descending")[]>;
|
|
203
|
+
default: () => string[];
|
|
204
|
+
validator: (val: ("ascending" | "descending")[]) => boolean;
|
|
205
|
+
};
|
|
206
|
+
}, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
207
|
+
type: {
|
|
208
|
+
type: StringConstructor;
|
|
209
|
+
default: string;
|
|
210
|
+
};
|
|
211
|
+
label: StringConstructor;
|
|
212
|
+
className: StringConstructor;
|
|
213
|
+
labelClassName: StringConstructor;
|
|
214
|
+
property: StringConstructor;
|
|
215
|
+
prop: StringConstructor;
|
|
216
|
+
width: {
|
|
217
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
218
|
+
default: string;
|
|
219
|
+
};
|
|
220
|
+
minWidth: {
|
|
221
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
222
|
+
default: string;
|
|
223
|
+
};
|
|
224
|
+
renderHeader: import("vue").PropType<(data: {
|
|
225
|
+
column: import("element-plus").TableColumnCtx<any>;
|
|
226
|
+
$index: number;
|
|
227
|
+
}) => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
228
|
+
[key: string]: any;
|
|
229
|
+
}>>;
|
|
230
|
+
sortable: {
|
|
231
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
232
|
+
default: boolean;
|
|
233
|
+
};
|
|
234
|
+
sortMethod: import("vue").PropType<(a: any, b: any) => number>;
|
|
235
|
+
sortBy: import("vue").PropType<string | string[] | ((row: any, index: number) => string)>;
|
|
236
|
+
resizable: {
|
|
237
|
+
type: BooleanConstructor;
|
|
238
|
+
default: boolean;
|
|
239
|
+
};
|
|
240
|
+
columnKey: StringConstructor;
|
|
241
|
+
align: StringConstructor;
|
|
242
|
+
headerAlign: StringConstructor;
|
|
243
|
+
showOverflowTooltip: {
|
|
244
|
+
type: import("vue").PropType<boolean | Partial<Pick<import("element-plus").ElTooltipProps, "showArrow" | "appendTo" | "transition" | "effect" | "enterable" | "popperClass" | "offset" | "placement" | "popperOptions" | "showAfter" | "hideAfter">>>;
|
|
245
|
+
default: undefined;
|
|
246
|
+
};
|
|
247
|
+
fixed: (StringConstructor | BooleanConstructor)[];
|
|
248
|
+
formatter: import("vue").PropType<(row: any, column: import("element-plus").TableColumnCtx<any>, cellValue: any, index: number) => string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
249
|
+
[key: string]: any;
|
|
250
|
+
}>>;
|
|
251
|
+
selectable: import("vue").PropType<(row: any, index: number) => boolean>;
|
|
252
|
+
reserveSelection: BooleanConstructor;
|
|
253
|
+
filterMethod: import("vue").PropType<import("element-plus/es/components/table/src/table-column/defaults").FilterMethods<any>>;
|
|
254
|
+
filteredValue: import("vue").PropType<string[]>;
|
|
255
|
+
filters: import("vue").PropType<import("element-plus/es/components/table/src/table-column/defaults").Filters>;
|
|
256
|
+
filterPlacement: StringConstructor;
|
|
257
|
+
filterMultiple: {
|
|
258
|
+
type: BooleanConstructor;
|
|
259
|
+
default: boolean;
|
|
260
|
+
};
|
|
261
|
+
filterClassName: StringConstructor;
|
|
262
|
+
index: import("vue").PropType<number | ((index: number) => number)>;
|
|
263
|
+
sortOrders: {
|
|
264
|
+
type: import("vue").PropType<("ascending" | "descending")[]>;
|
|
265
|
+
default: () => string[];
|
|
266
|
+
validator: (val: ("ascending" | "descending")[]) => boolean;
|
|
267
|
+
};
|
|
268
|
+
}>>, {
|
|
269
|
+
type: string;
|
|
270
|
+
width: string | number;
|
|
271
|
+
minWidth: string | number;
|
|
272
|
+
showOverflowTooltip: boolean | Partial<Pick<import("element-plus").ElTooltipProps, "showArrow" | "appendTo" | "transition" | "effect" | "enterable" | "popperClass" | "offset" | "placement" | "popperOptions" | "showAfter" | "hideAfter">>;
|
|
273
|
+
sortOrders: ("ascending" | "descending")[];
|
|
274
|
+
sortable: string | boolean;
|
|
275
|
+
resizable: boolean;
|
|
276
|
+
reserveSelection: boolean;
|
|
277
|
+
filterMultiple: boolean;
|
|
278
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
279
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
280
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Func, Keyof, NormalObject, VueComponentPropsType } from '@vunk/core';
|
|
2
|
+
import { ElTableColumn } from 'element-plus';
|
|
3
|
+
import type { TableColumnCtx } from 'element-plus/es/components/table/src/table-column/defaults';
|
|
4
|
+
export type DefaultSlot<R extends NormalObject> = Func<{
|
|
5
|
+
row: R;
|
|
6
|
+
column: TableColumnCtx<R>;
|
|
7
|
+
$index: number;
|
|
8
|
+
}>;
|
|
9
|
+
export interface Source<T extends NormalObject = NormalObject> extends VueComponentPropsType<typeof ElTableColumn> {
|
|
10
|
+
prop?: Keyof<T>;
|
|
11
|
+
slots?: DefaultSlot<T> | {
|
|
12
|
+
default?: DefaultSlot<T>;
|
|
13
|
+
header?: Func<{
|
|
14
|
+
column: TableColumnCtx<T>;
|
|
15
|
+
$index: number;
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
18
|
+
children?: Source<T>[];
|
|
19
|
+
hidden?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -41,8 +41,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
41
41
|
onTyping?: (...args: any[] | unknown[]) => any;
|
|
42
42
|
}>, {
|
|
43
43
|
source: string;
|
|
44
|
-
delay: number;
|
|
45
|
-
pause: boolean;
|
|
46
44
|
disabled: boolean;
|
|
45
|
+
pause: boolean;
|
|
46
|
+
delay: number;
|
|
47
47
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
48
48
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vunk/plus",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.esm.js",
|
|
6
6
|
"scripts": {
|
|
@@ -63,6 +63,10 @@
|
|
|
63
63
|
"import": "./components/typing-markdown/index.mjs",
|
|
64
64
|
"types": "./components/typing-markdown/index.d.ts"
|
|
65
65
|
},
|
|
66
|
+
"./components/table-columns": {
|
|
67
|
+
"import": "./components/table-columns/index.mjs",
|
|
68
|
+
"types": "./components/table-columns/index.d.ts"
|
|
69
|
+
},
|
|
66
70
|
"./components/monaco-environment": {
|
|
67
71
|
"import": "./components/monaco-environment/index.mjs",
|
|
68
72
|
"types": "./components/monaco-environment/index.d.ts"
|