stk-table-vue 0.8.12 → 0.8.14
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/README.md +9 -17
- package/lib/src/StkTable/StkTable.vue.d.ts +6 -4
- package/lib/src/StkTable/utils/index.d.ts +3 -0
- package/lib/stk-table-vue.js +263 -159
- package/lib/style.css +8 -2
- package/package.json +3 -1
- package/src/StkTable/StkTable.vue +169 -128
- package/src/StkTable/const.ts +2 -2
- package/src/StkTable/style.less +0 -2
- package/src/StkTable/useFixedCol.ts +10 -8
- package/src/StkTable/useHighlight.ts +1 -1
- package/src/StkTable/useMergeCells.ts +19 -18
- package/src/StkTable/useScrollRowByRow.ts +53 -18
- package/src/StkTable/useTrDrag.ts +1 -6
- package/src/StkTable/utils/index.ts +16 -0
package/README.md
CHANGED
|
@@ -31,11 +31,6 @@
|
|
|
31
31
|
## Demo
|
|
32
32
|
[<span style="font-size: 16px;font-weight: bold;">Online Demo in stackblitz</span>](https://stackblitz.com/edit/vitejs-vite-ad91hh?file=src%2FDemo%2Findex.vue)
|
|
33
33
|
|
|
34
|
-
## Compare
|
|
35
|
-
Compare performance with other vue table [vue-table-compare](https://github.com/ja-plus/vue-table-compare)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
34
|
## Usage
|
|
40
35
|
> npm install stk-table-vue
|
|
41
36
|
|
|
@@ -88,23 +83,17 @@ const dataSource = [
|
|
|
88
83
|
[Vue2.7 Usage](https://ja-plus.github.io/stk-table-vue/main/start/vue2-usage.html)
|
|
89
84
|
|
|
90
85
|
## API
|
|
91
|
-
|
|
92
|
-
[Props 表格配置](https://ja-plus.github.io/stk-table-vue/main/api/table-props.html)
|
|
86
|
+
* [Props](https://ja-plus.github.io/stk-table-vue/main/api/table-props.html)
|
|
93
87
|
|
|
94
|
-
|
|
95
|
-
[Emits 事件](https://ja-plus.github.io/stk-table-vue/main/api/emits.html)
|
|
88
|
+
* [Emits](https://ja-plus.github.io/stk-table-vue/main/api/emits.html)
|
|
96
89
|
|
|
97
|
-
|
|
98
|
-
[Slots 插槽](https://ja-plus.github.io/stk-table-vue/main/api/slots.html)
|
|
90
|
+
* [Slots](https://ja-plus.github.io/stk-table-vue/main/api/slots.html)
|
|
99
91
|
|
|
100
|
-
|
|
101
|
-
[Expose 实例方法](https://ja-plus.github.io/stk-table-vue/main/api/expose.html)
|
|
92
|
+
* [Expose](https://ja-plus.github.io/stk-table-vue/main/api/expose.html)
|
|
102
93
|
|
|
103
|
-
|
|
104
|
-
[StkTableColumn 列配置](https://ja-plus.github.io/stk-table-vue/main/api/stk-table-column.html)
|
|
94
|
+
* [StkTableColumn: Define column type](https://ja-plus.github.io/stk-table-vue/main/api/stk-table-column.html)
|
|
105
95
|
|
|
106
|
-
|
|
107
|
-
[Highlight 高亮](https://ja-plus.github.io/stk-table-vue/main/api/expose.html#sethighlightdimcell)
|
|
96
|
+
* [Highlight: setHighlightDimCell & setHighlightDimRow](https://ja-plus.github.io/stk-table-vue/main/api/expose.html#sethighlightdimcell)
|
|
108
97
|
|
|
109
98
|
|
|
110
99
|
### Example
|
|
@@ -175,6 +164,9 @@ const dataSource = [
|
|
|
175
164
|
</script>
|
|
176
165
|
```
|
|
177
166
|
|
|
167
|
+
## Compare
|
|
168
|
+
Compare performance with other vue table [vue-table-compare](https://github.com/ja-plus/vue-table-compare)
|
|
169
|
+
|
|
178
170
|
|
|
179
171
|
## Other
|
|
180
172
|
* `$*$`
|
|
@@ -4,6 +4,8 @@ import { AutoRowHeightConfig, ColResizableConfig, DragRowConfig, ExpandConfig, H
|
|
|
4
4
|
type DT = any & PrivateRowDT;
|
|
5
5
|
/**
|
|
6
6
|
* 选中一行
|
|
7
|
+
*
|
|
8
|
+
* en: Select a row
|
|
7
9
|
* @param {string} rowKeyOrRow selected rowKey, undefined to unselect
|
|
8
10
|
* @param {boolean} option.silent if set true not emit `current-change`. default:false
|
|
9
11
|
* @param {boolean} option.deep if set true, deep search in children. default:false
|
|
@@ -157,7 +159,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
157
159
|
* "v" - 仅展示竖线
|
|
158
160
|
* "body-v" - 仅表体展示竖线
|
|
159
161
|
*/
|
|
160
|
-
bordered?: boolean | "h" | "v" | "body-v";
|
|
162
|
+
bordered?: boolean | "h" | "v" | "body-v" | "body-h";
|
|
161
163
|
/**
|
|
162
164
|
* 自动重新计算虚拟滚动高度宽度。默认true
|
|
163
165
|
* [非响应式]
|
|
@@ -526,7 +528,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
526
528
|
* "v" - 仅展示竖线
|
|
527
529
|
* "body-v" - 仅表体展示竖线
|
|
528
530
|
*/
|
|
529
|
-
bordered?: boolean | "h" | "v" | "body-v";
|
|
531
|
+
bordered?: boolean | "h" | "v" | "body-v" | "body-h";
|
|
530
532
|
/**
|
|
531
533
|
* 自动重新计算虚拟滚动高度宽度。默认true
|
|
532
534
|
* [非响应式]
|
|
@@ -680,6 +682,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
680
682
|
minWidth: string;
|
|
681
683
|
maxWidth: string;
|
|
682
684
|
sortConfig: SortConfig<DT>;
|
|
685
|
+
colKey: UniqKeyProp;
|
|
683
686
|
rowHeight: number;
|
|
684
687
|
headless: boolean;
|
|
685
688
|
autoRowHeight: boolean | AutoRowHeightConfig<DT>;
|
|
@@ -687,7 +690,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
687
690
|
optimizeVue2Scroll: boolean;
|
|
688
691
|
rowKey: UniqKeyProp;
|
|
689
692
|
headerRowHeight: number | string | null;
|
|
690
|
-
colKey: UniqKeyProp;
|
|
691
693
|
fixedMode: boolean;
|
|
692
694
|
theme: "light" | "dark";
|
|
693
695
|
rowHover: boolean;
|
|
@@ -714,7 +716,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
714
716
|
rowClassName: (row: DT, i: number) => string | undefined;
|
|
715
717
|
colResizable: boolean | ColResizableConfig<DT>;
|
|
716
718
|
colMinWidth: number;
|
|
717
|
-
bordered: boolean | "h" | "v" | "body-v";
|
|
719
|
+
bordered: boolean | "h" | "v" | "body-v" | "body-h";
|
|
718
720
|
autoResize: boolean | (() => void);
|
|
719
721
|
fixedColShadow: boolean;
|
|
720
722
|
hideHeaderTitle: boolean | string[];
|
|
@@ -51,3 +51,6 @@ export declare function howDeepTheHeader(arr: StkTableColumn<any>[], level?: num
|
|
|
51
51
|
export declare function transformWidthToStr(width?: string | number): string | undefined;
|
|
52
52
|
export declare function getBrowsersVersion(browserName: string): number;
|
|
53
53
|
export declare function pureCellKeyGen(rowKey: UniqKey, colKey: UniqKey): string;
|
|
54
|
+
export declare function getClosestTr(e: MouseEvent): HTMLTableRowElement | null;
|
|
55
|
+
export declare function getClosestTrIndex(e: MouseEvent): number;
|
|
56
|
+
export declare function getClosestColKey(e: MouseEvent): string | undefined;
|