stk-table-vue 1.0.0-beta.4 → 1.0.0-beta.5
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 +173 -173
- package/lib/{Dropdown-CtiuG-7-.js → Dropdown-Clc70S1z.js} +1 -1
- package/lib/{StkTable-Bz-71TiQ.js → StkTable-QUd4TJCF.js} +11 -7
- package/lib/stk-table-vue.js +2 -2
- package/package.json +85 -85
- package/src/StkTable/StkTable.vue +1849 -1849
- package/src/StkTable/components/DragHandle.vue +9 -9
- package/src/StkTable/components/SortIcon.vue +6 -6
- package/src/StkTable/components/TreeNodeCell.vue +19 -19
- package/src/StkTable/components/TriangleIcon.vue +3 -3
- package/src/StkTable/const.ts +50 -50
- package/src/StkTable/custom-cells/CheckboxCell/Checkbox.less +14 -14
- package/src/StkTable/custom-cells/CheckboxCell/Checkbox.vue +41 -41
- package/src/StkTable/custom-cells/CheckboxCell/createCheckboxCell.ts +146 -146
- package/src/StkTable/custom-cells/CheckboxCell/index.ts +5 -5
- package/src/StkTable/custom-cells/FilterCell/Dropdown/index.ts +16 -16
- package/src/StkTable/custom-cells/FilterCell/Dropdown/index.vue +184 -184
- package/src/StkTable/custom-cells/FilterCell/Filter.less +118 -118
- package/src/StkTable/custom-cells/FilterCell/Filter.vue +66 -66
- package/src/StkTable/custom-cells/FilterCell/createFilterCell.ts +120 -120
- package/src/StkTable/custom-cells/FilterCell/index.ts +6 -6
- package/src/StkTable/custom-cells/FilterCell/types.ts +43 -43
- package/src/StkTable/features/const.ts +1 -1
- package/src/StkTable/features/index.ts +1 -1
- package/src/StkTable/features/useAreaSelection.bak.ts +951 -951
- package/src/StkTable/features/useAreaSelection.ts +1079 -1078
- package/src/StkTable/index.ts +14 -14
- package/src/StkTable/registerFeature.ts +40 -40
- package/src/StkTable/style.less +767 -767
- package/src/StkTable/types/highlightDimOptions.ts +28 -28
- package/src/StkTable/types/index.ts +452 -452
- package/src/StkTable/useAutoResize.ts +87 -87
- package/src/StkTable/useColResize.ts +202 -202
- package/src/StkTable/useFixedCol.ts +142 -142
- package/src/StkTable/useFixedStyle.ts +75 -75
- package/src/StkTable/useGetFixedColPosition.ts +63 -63
- package/src/StkTable/useHighlight.ts +270 -270
- package/src/StkTable/useIndexResolver.ts +29 -29
- package/src/StkTable/useKeyboardArrowScroll.ts +114 -114
- package/src/StkTable/useMaxRowSpan.ts +50 -50
- package/src/StkTable/useMergeCells.ts +138 -138
- package/src/StkTable/useRowExpand.ts +81 -81
- package/src/StkTable/useScrollRowByRow.ts +96 -96
- package/src/StkTable/useScrollbar.ts +177 -177
- package/src/StkTable/useSorter.ts +259 -259
- package/src/StkTable/useTableColumns.ts +131 -131
- package/src/StkTable/useThDrag.ts +94 -94
- package/src/StkTable/useTrDrag.ts +100 -100
- package/src/StkTable/useTree.ts +152 -152
- package/src/StkTable/useVirtualScroll.ts +693 -690
- package/src/StkTable/useWheeling.ts +23 -23
- package/src/StkTable/utils/constRefUtils.ts +29 -29
- package/src/StkTable/utils/index.ts +331 -331
- package/src/StkTable/utils/useTriggerRef.ts +33 -33
- package/src/VirtualTree.vue +622 -622
- package/src/VirtualTreeSelect.vue +367 -367
- package/src/vite-env.d.ts +10 -10
package/README.md
CHANGED
|
@@ -1,173 +1,173 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<a href="https://ja-plus.github.io/stk-table-vue/">
|
|
3
|
-
<img src="./docs-src/public/assets/logo.svg" width="152">
|
|
4
|
-
</a>
|
|
5
|
-
<h3 align='center'>Stk Table Vue</h3>
|
|
6
|
-
<p align="center">
|
|
7
|
-
<a href="https://www.npmjs.com/package/stk-table-vue"><img src="https://img.shields.io/npm/v/stk-table-vue"></a>
|
|
8
|
-
<a href="https://www.npmjs.com/package/stk-table-vue"><img src="https://img.shields.io/npm/dw/stk-table-vue"></a>
|
|
9
|
-
<a href="https://github.com/ja-plus/stk-table-vue/stargazers"><img src="https://img.shields.io/github/stars/ja-plus/stk-table-vue.svg"></a>
|
|
10
|
-
<a href="https://raw.githubusercontent.com/ja-plus/stk-table-vue/master/LICENSE"><img src="https://img.shields.io/npm/l/stk-table-vue"></a>
|
|
11
|
-
<a href="https://github.com/ja-plus/stk-table-vue"><img src="https://img.shields.io/npm/types/stk-table-vue"></a>
|
|
12
|
-
</p>
|
|
13
|
-
</p>
|
|
14
|
-
|
|
15
|
-
Stk Table Vue(Sticky Table) is a high-performance virtual list component based on Vue.
|
|
16
|
-
|
|
17
|
-
Smooth performance with tens of thousands of rows
|
|
18
|
-
|
|
19
|
-
Used for real-time data display, with data highlighting and dynamic effects.
|
|
20
|
-
|
|
21
|
-
Support Vue3 and Vue2.7
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
## Documentation
|
|
25
|
-
### [Stk Table Vue Official](https://ja-plus.github.io/stk-table-vue/)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## Repo:
|
|
29
|
-
- [Github](https://github.com/ja-plus/stk-table-vue)
|
|
30
|
-
- [Gitee](https://gitee.com/japlus/stk-table-vue)
|
|
31
|
-
|
|
32
|
-
## Demo
|
|
33
|
-
[<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)
|
|
34
|
-
|
|
35
|
-
## Usage
|
|
36
|
-
> npm install stk-table-vue
|
|
37
|
-
|
|
38
|
-
```html
|
|
39
|
-
<script setup>
|
|
40
|
-
import { StkTable } from 'stk-table-vue'
|
|
41
|
-
import { ref, useTemplateRef } from 'vue'
|
|
42
|
-
const stkTableRef = ref<InstanceType<typeof StkTable>>();
|
|
43
|
-
// or Vue 3.5 useTemplateRef
|
|
44
|
-
const stkTableRef = useTemplateRef('stkTableRef');
|
|
45
|
-
|
|
46
|
-
// highlight row
|
|
47
|
-
stkTableRef.value.setHighlightDimRow([rowKey], {
|
|
48
|
-
method: 'css' | 'animation', // default animation
|
|
49
|
-
className: 'custom-class-name', // for method 'css'
|
|
50
|
-
keyframe: [{ backgroundColor: '#aaa' }, { backgroundColor: '#222' }], // same as https://developer.mozilla.org/zh-CN/docs/Web/API/Web_Animations_API/Keyframe_Formats
|
|
51
|
-
duration: 2000,
|
|
52
|
-
});
|
|
53
|
-
// highlight cell
|
|
54
|
-
stkTableRef.value.setHighlightDimCell(rowKey, colDataIndex, {
|
|
55
|
-
method: 'css' | 'animation',
|
|
56
|
-
className: 'custom-class-name', // for method 'css'
|
|
57
|
-
keyframe: [{ backgroundColor: '#aaa' }, { backgroundColor: '#222' }], // for method 'animation'
|
|
58
|
-
duration: 2000,
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
const columns = [
|
|
62
|
-
{title: 'name', dataIndex: 'name'},
|
|
63
|
-
{title: 'age', dataIndex: 'age'},
|
|
64
|
-
{title: 'address', dataIndex: 'address'},
|
|
65
|
-
];
|
|
66
|
-
|
|
67
|
-
const dataSource = [
|
|
68
|
-
{id: 1, name: 'John', age: 32, address: 'New York'},
|
|
69
|
-
{id: 2, name: 'Jim', age: 42, address: 'London'},
|
|
70
|
-
{id: 3, name: 'Joe', age: 52, address: 'Tokyo'},
|
|
71
|
-
{id: 4, name: 'Jack', age: 62, address: 'Sydney'},
|
|
72
|
-
{id: 5, name: 'Jill', age: 72, address: 'Paris'},
|
|
73
|
-
]
|
|
74
|
-
|
|
75
|
-
</script>
|
|
76
|
-
|
|
77
|
-
<template>
|
|
78
|
-
<StkTable ref='stkTableRef' row-key="id" :data-source="dataSource" :columns="columns"></StkTable>
|
|
79
|
-
</template>
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Vue2.7 Usage
|
|
84
|
-
[Vue2.7 Usage](https://ja-plus.github.io/stk-table-vue/main/start/vue2-usage.html)
|
|
85
|
-
|
|
86
|
-
## API
|
|
87
|
-
* [Props](https://ja-plus.github.io/stk-table-vue/main/api/table-props.html)
|
|
88
|
-
|
|
89
|
-
* [Emits](https://ja-plus.github.io/stk-table-vue/main/api/emits.html)
|
|
90
|
-
|
|
91
|
-
* [Slots](https://ja-plus.github.io/stk-table-vue/main/api/slots.html)
|
|
92
|
-
|
|
93
|
-
* [Expose](https://ja-plus.github.io/stk-table-vue/main/api/expose.html)
|
|
94
|
-
|
|
95
|
-
* [StkTableColumn: Define column type](https://ja-plus.github.io/stk-table-vue/main/api/stk-table-column.html)
|
|
96
|
-
|
|
97
|
-
* [Highlight: setHighlightDimCell & setHighlightDimRow](https://ja-plus.github.io/stk-table-vue/main/api/expose.html#sethighlightdimcell)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
### Example
|
|
101
|
-
```vue
|
|
102
|
-
<template>
|
|
103
|
-
<StkTable
|
|
104
|
-
ref="stkTable"
|
|
105
|
-
row-key="name"
|
|
106
|
-
v-model:columns="columns"
|
|
107
|
-
:style="{height:props.height}"
|
|
108
|
-
theme='dark'
|
|
109
|
-
height='200px'
|
|
110
|
-
bordered="h"
|
|
111
|
-
:row-height="28"
|
|
112
|
-
:show-overflow="false"
|
|
113
|
-
:show-header-overflow="false"
|
|
114
|
-
:sort-remote="false"
|
|
115
|
-
col-resizable
|
|
116
|
-
header-drag
|
|
117
|
-
virtual
|
|
118
|
-
virtual-x
|
|
119
|
-
no-data-full
|
|
120
|
-
col-resizable
|
|
121
|
-
auto-resize
|
|
122
|
-
fixed-col-shadow
|
|
123
|
-
:col-min-width="10"
|
|
124
|
-
:headless="false"
|
|
125
|
-
:data-source="dataSource"
|
|
126
|
-
@current-change="onCurrentChange"
|
|
127
|
-
@row-menu="onRowMenu"
|
|
128
|
-
@header-row-menu="onHeaderRowMenu"
|
|
129
|
-
@row-click="onRowClick"
|
|
130
|
-
@row-dblclick="onRowDblclick"
|
|
131
|
-
@sort-change="handleSortChange"
|
|
132
|
-
@cell-click="onCellClick"
|
|
133
|
-
@header-cell-click="onHeaderCellClick"
|
|
134
|
-
@scroll="onTableScroll"
|
|
135
|
-
@scroll-x="onTableScrollX"
|
|
136
|
-
@col-order-change="onColOrderChange"
|
|
137
|
-
/>
|
|
138
|
-
</template>
|
|
139
|
-
<script setup>
|
|
140
|
-
import { h, defineComponent } from 'vue';
|
|
141
|
-
const columns = [
|
|
142
|
-
{
|
|
143
|
-
title: 'Name',
|
|
144
|
-
dataIndex: 'name',
|
|
145
|
-
fixed: 'left',
|
|
146
|
-
width: '200px',
|
|
147
|
-
headerClassName: 'my-th',
|
|
148
|
-
className: 'my-td',
|
|
149
|
-
sorter: true,
|
|
150
|
-
customHeaderCell: function FunctionalComponent(props){
|
|
151
|
-
return h(
|
|
152
|
-
'span',
|
|
153
|
-
{ style: 'overflow:hidden;text-overflow:ellipsis;white-space:nowrap' },
|
|
154
|
-
props.col.title + '(render) text-overflow,',
|
|
155
|
-
);
|
|
156
|
-
},
|
|
157
|
-
customCell: defineComponent({
|
|
158
|
-
setup(){
|
|
159
|
-
//...
|
|
160
|
-
return () => <div></div> // vue jsx
|
|
161
|
-
}
|
|
162
|
-
})
|
|
163
|
-
},
|
|
164
|
-
]
|
|
165
|
-
</script>
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
## Compare
|
|
169
|
-
Compare performance with other vue table [vue-table-compare](https://github.com/ja-plus/vue-table-compare)
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
## Other
|
|
173
|
-
* `$*$`
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://ja-plus.github.io/stk-table-vue/">
|
|
3
|
+
<img src="./docs-src/public/assets/logo.svg" width="152">
|
|
4
|
+
</a>
|
|
5
|
+
<h3 align='center'>Stk Table Vue</h3>
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="https://www.npmjs.com/package/stk-table-vue"><img src="https://img.shields.io/npm/v/stk-table-vue"></a>
|
|
8
|
+
<a href="https://www.npmjs.com/package/stk-table-vue"><img src="https://img.shields.io/npm/dw/stk-table-vue"></a>
|
|
9
|
+
<a href="https://github.com/ja-plus/stk-table-vue/stargazers"><img src="https://img.shields.io/github/stars/ja-plus/stk-table-vue.svg"></a>
|
|
10
|
+
<a href="https://raw.githubusercontent.com/ja-plus/stk-table-vue/master/LICENSE"><img src="https://img.shields.io/npm/l/stk-table-vue"></a>
|
|
11
|
+
<a href="https://github.com/ja-plus/stk-table-vue"><img src="https://img.shields.io/npm/types/stk-table-vue"></a>
|
|
12
|
+
</p>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
Stk Table Vue(Sticky Table) is a high-performance virtual list component based on Vue.
|
|
16
|
+
|
|
17
|
+
Smooth performance with tens of thousands of rows
|
|
18
|
+
|
|
19
|
+
Used for real-time data display, with data highlighting and dynamic effects.
|
|
20
|
+
|
|
21
|
+
Support Vue3 and Vue2.7
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## Documentation
|
|
25
|
+
### [Stk Table Vue Official](https://ja-plus.github.io/stk-table-vue/)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## Repo:
|
|
29
|
+
- [Github](https://github.com/ja-plus/stk-table-vue)
|
|
30
|
+
- [Gitee](https://gitee.com/japlus/stk-table-vue)
|
|
31
|
+
|
|
32
|
+
## Demo
|
|
33
|
+
[<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)
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
> npm install stk-table-vue
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<script setup>
|
|
40
|
+
import { StkTable } from 'stk-table-vue'
|
|
41
|
+
import { ref, useTemplateRef } from 'vue'
|
|
42
|
+
const stkTableRef = ref<InstanceType<typeof StkTable>>();
|
|
43
|
+
// or Vue 3.5 useTemplateRef
|
|
44
|
+
const stkTableRef = useTemplateRef('stkTableRef');
|
|
45
|
+
|
|
46
|
+
// highlight row
|
|
47
|
+
stkTableRef.value.setHighlightDimRow([rowKey], {
|
|
48
|
+
method: 'css' | 'animation', // default animation
|
|
49
|
+
className: 'custom-class-name', // for method 'css'
|
|
50
|
+
keyframe: [{ backgroundColor: '#aaa' }, { backgroundColor: '#222' }], // same as https://developer.mozilla.org/zh-CN/docs/Web/API/Web_Animations_API/Keyframe_Formats
|
|
51
|
+
duration: 2000,
|
|
52
|
+
});
|
|
53
|
+
// highlight cell
|
|
54
|
+
stkTableRef.value.setHighlightDimCell(rowKey, colDataIndex, {
|
|
55
|
+
method: 'css' | 'animation',
|
|
56
|
+
className: 'custom-class-name', // for method 'css'
|
|
57
|
+
keyframe: [{ backgroundColor: '#aaa' }, { backgroundColor: '#222' }], // for method 'animation'
|
|
58
|
+
duration: 2000,
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const columns = [
|
|
62
|
+
{title: 'name', dataIndex: 'name'},
|
|
63
|
+
{title: 'age', dataIndex: 'age'},
|
|
64
|
+
{title: 'address', dataIndex: 'address'},
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
const dataSource = [
|
|
68
|
+
{id: 1, name: 'John', age: 32, address: 'New York'},
|
|
69
|
+
{id: 2, name: 'Jim', age: 42, address: 'London'},
|
|
70
|
+
{id: 3, name: 'Joe', age: 52, address: 'Tokyo'},
|
|
71
|
+
{id: 4, name: 'Jack', age: 62, address: 'Sydney'},
|
|
72
|
+
{id: 5, name: 'Jill', age: 72, address: 'Paris'},
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
</script>
|
|
76
|
+
|
|
77
|
+
<template>
|
|
78
|
+
<StkTable ref='stkTableRef' row-key="id" :data-source="dataSource" :columns="columns"></StkTable>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Vue2.7 Usage
|
|
84
|
+
[Vue2.7 Usage](https://ja-plus.github.io/stk-table-vue/main/start/vue2-usage.html)
|
|
85
|
+
|
|
86
|
+
## API
|
|
87
|
+
* [Props](https://ja-plus.github.io/stk-table-vue/main/api/table-props.html)
|
|
88
|
+
|
|
89
|
+
* [Emits](https://ja-plus.github.io/stk-table-vue/main/api/emits.html)
|
|
90
|
+
|
|
91
|
+
* [Slots](https://ja-plus.github.io/stk-table-vue/main/api/slots.html)
|
|
92
|
+
|
|
93
|
+
* [Expose](https://ja-plus.github.io/stk-table-vue/main/api/expose.html)
|
|
94
|
+
|
|
95
|
+
* [StkTableColumn: Define column type](https://ja-plus.github.io/stk-table-vue/main/api/stk-table-column.html)
|
|
96
|
+
|
|
97
|
+
* [Highlight: setHighlightDimCell & setHighlightDimRow](https://ja-plus.github.io/stk-table-vue/main/api/expose.html#sethighlightdimcell)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Example
|
|
101
|
+
```vue
|
|
102
|
+
<template>
|
|
103
|
+
<StkTable
|
|
104
|
+
ref="stkTable"
|
|
105
|
+
row-key="name"
|
|
106
|
+
v-model:columns="columns"
|
|
107
|
+
:style="{height:props.height}"
|
|
108
|
+
theme='dark'
|
|
109
|
+
height='200px'
|
|
110
|
+
bordered="h"
|
|
111
|
+
:row-height="28"
|
|
112
|
+
:show-overflow="false"
|
|
113
|
+
:show-header-overflow="false"
|
|
114
|
+
:sort-remote="false"
|
|
115
|
+
col-resizable
|
|
116
|
+
header-drag
|
|
117
|
+
virtual
|
|
118
|
+
virtual-x
|
|
119
|
+
no-data-full
|
|
120
|
+
col-resizable
|
|
121
|
+
auto-resize
|
|
122
|
+
fixed-col-shadow
|
|
123
|
+
:col-min-width="10"
|
|
124
|
+
:headless="false"
|
|
125
|
+
:data-source="dataSource"
|
|
126
|
+
@current-change="onCurrentChange"
|
|
127
|
+
@row-menu="onRowMenu"
|
|
128
|
+
@header-row-menu="onHeaderRowMenu"
|
|
129
|
+
@row-click="onRowClick"
|
|
130
|
+
@row-dblclick="onRowDblclick"
|
|
131
|
+
@sort-change="handleSortChange"
|
|
132
|
+
@cell-click="onCellClick"
|
|
133
|
+
@header-cell-click="onHeaderCellClick"
|
|
134
|
+
@scroll="onTableScroll"
|
|
135
|
+
@scroll-x="onTableScrollX"
|
|
136
|
+
@col-order-change="onColOrderChange"
|
|
137
|
+
/>
|
|
138
|
+
</template>
|
|
139
|
+
<script setup>
|
|
140
|
+
import { h, defineComponent } from 'vue';
|
|
141
|
+
const columns = [
|
|
142
|
+
{
|
|
143
|
+
title: 'Name',
|
|
144
|
+
dataIndex: 'name',
|
|
145
|
+
fixed: 'left',
|
|
146
|
+
width: '200px',
|
|
147
|
+
headerClassName: 'my-th',
|
|
148
|
+
className: 'my-td',
|
|
149
|
+
sorter: true,
|
|
150
|
+
customHeaderCell: function FunctionalComponent(props){
|
|
151
|
+
return h(
|
|
152
|
+
'span',
|
|
153
|
+
{ style: 'overflow:hidden;text-overflow:ellipsis;white-space:nowrap' },
|
|
154
|
+
props.col.title + '(render) text-overflow,',
|
|
155
|
+
);
|
|
156
|
+
},
|
|
157
|
+
customCell: defineComponent({
|
|
158
|
+
setup(){
|
|
159
|
+
//...
|
|
160
|
+
return () => <div></div> // vue jsx
|
|
161
|
+
}
|
|
162
|
+
})
|
|
163
|
+
},
|
|
164
|
+
]
|
|
165
|
+
</script>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Compare
|
|
169
|
+
Compare performance with other vue table [vue-table-compare](https://github.com/ja-plus/vue-table-compare)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
## Other
|
|
173
|
+
* `$*$`
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* homepage: https://ja-plus.github.io/stk-table-vue/
|
|
7
7
|
* license: MIT
|
|
8
8
|
*/
|
|
9
|
-
import { t as StkTable_default } from "./StkTable-
|
|
9
|
+
import { t as StkTable_default } from "./StkTable-QUd4TJCF.js";
|
|
10
10
|
import { createElementBlock, createElementVNode, createVNode, defineComponent, h, nextTick, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, reactive, ref, withModifiers } from "vue";
|
|
11
11
|
//#region src/StkTable/custom-cells/FilterCell/Dropdown/index.vue?vue&type=script&setup=true&lang.ts
|
|
12
12
|
var DROPDOWN_DEFAULT_WIDTH = 300;
|
|
@@ -543,6 +543,7 @@ function useAreaSelection(props, emits, tableContainerRef, dataSourceCopy, table
|
|
|
543
543
|
return [
|
|
544
544
|
ranges.length,
|
|
545
545
|
ranges.length > 0 ? JSON.stringify(ranges.map((r) => r.index)) : "",
|
|
546
|
+
vsx.scrollLeft,
|
|
546
547
|
vs.startIndex,
|
|
547
548
|
vs.endIndex,
|
|
548
549
|
vsx.startIndex,
|
|
@@ -3201,7 +3202,10 @@ function useVirtualScroll(props, tableContainerRef, trRef, dataSourceCopy, table
|
|
|
3201
3202
|
updateVirtualScrollX(scrollLeft);
|
|
3202
3203
|
}
|
|
3203
3204
|
let vue2ScrollYTimeout = null;
|
|
3204
|
-
/**
|
|
3205
|
+
/**
|
|
3206
|
+
* every row actual height.
|
|
3207
|
+
* FIXME: use a weak map instead of a plain map
|
|
3208
|
+
*/
|
|
3205
3209
|
const autoRowHeightMap = /* @__PURE__ */ new Map();
|
|
3206
3210
|
/** 如果行高度有变化,则要调用此方法清除保存的行高 */
|
|
3207
3211
|
function setAutoHeight(rowKey, height) {
|
|
@@ -4631,8 +4635,8 @@ var StkTable_default = /* @__PURE__ */ defineComponent({
|
|
|
4631
4635
|
class: "vt-x-left",
|
|
4632
4636
|
style: normalizeStyle(`min-width:${unref(theadVirtualX).offsetLeft}px;width:${unref(theadVirtualX).offsetLeft}px`)
|
|
4633
4637
|
}, null, 4)) : createCommentVNode("", true),
|
|
4634
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(virtualX_columnPart), (col) => {
|
|
4635
|
-
return openBlock(), createElementBlock(Fragment, { key: col.__VT_C_SP__ ?
|
|
4638
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(virtualX_columnPart), (col, _colIdx) => {
|
|
4639
|
+
return openBlock(), createElementBlock(Fragment, { key: col.__VT_C_SP__ ? `spacer-${_colIdx}` : colKeyGen.value(col) }, [col.__VT_C_SP__ ? (openBlock(), createElementBlock("td", {
|
|
4636
4640
|
key: 0,
|
|
4637
4641
|
class: "vt-x-spacer",
|
|
4638
4642
|
colspan: col.__VT_C_SP__
|
|
@@ -4686,8 +4690,8 @@ var StkTable_default = /* @__PURE__ */ defineComponent({
|
|
|
4686
4690
|
class: "vt-x-left",
|
|
4687
4691
|
style: normalizeStyle(`min-width:${unref(theadVirtualX).offsetLeft}px;width:${unref(theadVirtualX).offsetLeft}px`)
|
|
4688
4692
|
}, null, 4)) : createCommentVNode("", true),
|
|
4689
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(virtualX_columnPart), (col) => {
|
|
4690
|
-
return openBlock(), createElementBlock(Fragment, { key: col.__VT_C_SP__ ?
|
|
4693
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(virtualX_columnPart), (col, _colIdx) => {
|
|
4694
|
+
return openBlock(), createElementBlock(Fragment, { key: col.__VT_C_SP__ ? `spacer-${_colIdx}` : colKeyGen.value(col) }, [col.__VT_C_SP__ ? (openBlock(), createElementBlock("td", {
|
|
4691
4695
|
key: 0,
|
|
4692
4696
|
class: "vt-x-spacer",
|
|
4693
4697
|
colspan: col.__VT_C_SP__
|
|
@@ -4716,8 +4720,8 @@ var StkTable_default = /* @__PURE__ */ defineComponent({
|
|
|
4716
4720
|
col: row.__EXP_C__
|
|
4717
4721
|
}, () => [createTextVNode(toDisplayString(row.__EXP_R__ && row.__EXP_C__ && row.__EXP_R__[row.__EXP_C__.dataIndex] || ""), 1)])])], 8, _hoisted_12)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4718
4722
|
unref(virtualX_on) ? (openBlock(), createElementBlock("td", _hoisted_14)) : createCommentVNode("", true),
|
|
4719
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(virtualX_columnPart), (col) => {
|
|
4720
|
-
return openBlock(), createElementBlock(Fragment, { key: col.__VT_C_SP__ ?
|
|
4723
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(virtualX_columnPart), (col, _colIdx) => {
|
|
4724
|
+
return openBlock(), createElementBlock(Fragment, { key: col.__VT_C_SP__ ? `spacer-${_colIdx}` : colKeyGen.value(col) }, [col.__VT_C_SP__ ? (openBlock(), createElementBlock("td", {
|
|
4721
4725
|
key: 0,
|
|
4722
4726
|
class: "vt-x-spacer",
|
|
4723
4727
|
colspan: col.__VT_C_SP__
|
package/lib/stk-table-vue.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* homepage: https://ja-plus.github.io/stk-table-vue/
|
|
7
7
|
* license: MIT
|
|
8
8
|
*/
|
|
9
|
-
import { a as insertToOrderedArray, i as binarySearch, n as registerFeature, o as strCompare, r as useAreaSelection, s as tableSort, t as StkTable_default } from "./StkTable-
|
|
9
|
+
import { a as insertToOrderedArray, i as binarySearch, n as registerFeature, o as strCompare, r as useAreaSelection, s as tableSort, t as StkTable_default } from "./StkTable-QUd4TJCF.js";
|
|
10
10
|
import { Fragment, computed, createApp, createBlock, createElementBlock, createElementVNode, createTextVNode, defineComponent, getCurrentInstance, h, markRaw, nextTick, normalizeClass, openBlock, ref, renderSlot, resolveDynamicComponent, toDisplayString, watch, withModifiers } from "vue";
|
|
11
11
|
//#region src/StkTable/custom-cells/FilterCell/Dropdown/index.ts
|
|
12
12
|
var DropdownIns = null;
|
|
@@ -15,7 +15,7 @@ async function getDropdownIns() {
|
|
|
15
15
|
const div = document.createElement("div");
|
|
16
16
|
div.classList.add("stk-filter-dropdown-wrapper");
|
|
17
17
|
document.body.appendChild(div);
|
|
18
|
-
DropdownIns = createApp(await import("./Dropdown-
|
|
18
|
+
DropdownIns = createApp(await import("./Dropdown-Clc70S1z.js").then((module) => module.default)).mount(div);
|
|
19
19
|
}
|
|
20
20
|
return DropdownIns;
|
|
21
21
|
}
|
package/package.json
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "stk-table-vue",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
4
|
-
"description": "High performance realtime virtual table for vue3 and vue2.7",
|
|
5
|
-
"main": "./lib/stk-table-vue.js",
|
|
6
|
-
"types": "./lib/src/StkTable/index.d.ts",
|
|
7
|
-
"homepage": "https://ja-plus.github.io/stk-table-vue/",
|
|
8
|
-
"author": "japlus",
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://github.com/ja-plus/stk-table-vue"
|
|
13
|
-
},
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/ja-plus/stk-table-vue/issues"
|
|
16
|
-
},
|
|
17
|
-
"packageManager": "pnpm@10.7.0",
|
|
18
|
-
"directories": {
|
|
19
|
-
"test": "test"
|
|
20
|
-
},
|
|
21
|
-
"type": "module",
|
|
22
|
-
"scripts": {
|
|
23
|
-
"dev": "vite",
|
|
24
|
-
"build": "vite build",
|
|
25
|
-
"test": "vitest",
|
|
26
|
-
"docs:dev": "vitepress dev docs-src",
|
|
27
|
-
"docs:build": "vitepress build docs-src",
|
|
28
|
-
"docs:preview": "vitepress preview docs-src",
|
|
29
|
-
"docs:update": "cp -rf ./docs-src/.vitepress/dist/* ./docs"
|
|
30
|
-
},
|
|
31
|
-
"keywords": [
|
|
32
|
-
"vue",
|
|
33
|
-
"table",
|
|
34
|
-
"vue-table",
|
|
35
|
-
"virtual table",
|
|
36
|
-
"virtual-scroll",
|
|
37
|
-
"data-table",
|
|
38
|
-
"vue-component",
|
|
39
|
-
"grid",
|
|
40
|
-
"vue2",
|
|
41
|
-
"vue3",
|
|
42
|
-
"highlight",
|
|
43
|
-
"sticky",
|
|
44
|
-
"virtual",
|
|
45
|
-
"list"
|
|
46
|
-
],
|
|
47
|
-
"files": [
|
|
48
|
-
"lib",
|
|
49
|
-
"src"
|
|
50
|
-
],
|
|
51
|
-
"devDependencies": {
|
|
52
|
-
"@chenglou/pretext": "^0.0.8",
|
|
53
|
-
"@types/mockjs": "^1.0.10",
|
|
54
|
-
"@types/node": "^22.18.10",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
|
56
|
-
"@typescript-eslint/parser": "^7.7.0",
|
|
57
|
-
"@vitejs/plugin-vue": "^6.0.5",
|
|
58
|
-
"@vue/test-utils": "^2.4.6",
|
|
59
|
-
"eslint": "^8.57.0",
|
|
60
|
-
"eslint-config-prettier": "^9.1.0",
|
|
61
|
-
"eslint-plugin-html": "^8.1.0",
|
|
62
|
-
"eslint-plugin-prettier": "^5.1.3",
|
|
63
|
-
"eslint-plugin-vue": "^9.25.0",
|
|
64
|
-
"happy-dom": "^18.0.1",
|
|
65
|
-
"ja-contextmenu": "^1.11.0",
|
|
66
|
-
"less": "^4.2.0",
|
|
67
|
-
"mitt": "^3.0.1",
|
|
68
|
-
"mockjs": "^1.1.0",
|
|
69
|
-
"postcss": "^8.4.47",
|
|
70
|
-
"postcss-discard-comments": "^6.0.2",
|
|
71
|
-
"postcss-preset-env": "^9.5.11",
|
|
72
|
-
"prettier": "^3.2.5",
|
|
73
|
-
"stk-table-vue": "^0.11.15",
|
|
74
|
-
"typescript": "^5.8.3",
|
|
75
|
-
"vite": "^8.1.2",
|
|
76
|
-
"vite-plugin-banner": "^0.8.1",
|
|
77
|
-
"vite-plugin-dts": "3.9.1",
|
|
78
|
-
"vitepress": "^1.6.4",
|
|
79
|
-
"vitepress-demo-plugin": "^1.5.1",
|
|
80
|
-
"vitepress-plugin-llms": "^1.13.2",
|
|
81
|
-
"vitest": "^4.1.9",
|
|
82
|
-
"vue": "^3.5.39",
|
|
83
|
-
"vue-eslint-parser": "^9.4.2"
|
|
84
|
-
}
|
|
85
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "stk-table-vue",
|
|
3
|
+
"version": "1.0.0-beta.5",
|
|
4
|
+
"description": "High performance realtime virtual table for vue3 and vue2.7",
|
|
5
|
+
"main": "./lib/stk-table-vue.js",
|
|
6
|
+
"types": "./lib/src/StkTable/index.d.ts",
|
|
7
|
+
"homepage": "https://ja-plus.github.io/stk-table-vue/",
|
|
8
|
+
"author": "japlus",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/ja-plus/stk-table-vue"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/ja-plus/stk-table-vue/issues"
|
|
16
|
+
},
|
|
17
|
+
"packageManager": "pnpm@10.7.0",
|
|
18
|
+
"directories": {
|
|
19
|
+
"test": "test"
|
|
20
|
+
},
|
|
21
|
+
"type": "module",
|
|
22
|
+
"scripts": {
|
|
23
|
+
"dev": "vite",
|
|
24
|
+
"build": "vite build",
|
|
25
|
+
"test": "vitest",
|
|
26
|
+
"docs:dev": "vitepress dev docs-src",
|
|
27
|
+
"docs:build": "vitepress build docs-src",
|
|
28
|
+
"docs:preview": "vitepress preview docs-src",
|
|
29
|
+
"docs:update": "cp -rf ./docs-src/.vitepress/dist/* ./docs"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"vue",
|
|
33
|
+
"table",
|
|
34
|
+
"vue-table",
|
|
35
|
+
"virtual table",
|
|
36
|
+
"virtual-scroll",
|
|
37
|
+
"data-table",
|
|
38
|
+
"vue-component",
|
|
39
|
+
"grid",
|
|
40
|
+
"vue2",
|
|
41
|
+
"vue3",
|
|
42
|
+
"highlight",
|
|
43
|
+
"sticky",
|
|
44
|
+
"virtual",
|
|
45
|
+
"list"
|
|
46
|
+
],
|
|
47
|
+
"files": [
|
|
48
|
+
"lib",
|
|
49
|
+
"src"
|
|
50
|
+
],
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@chenglou/pretext": "^0.0.8",
|
|
53
|
+
"@types/mockjs": "^1.0.10",
|
|
54
|
+
"@types/node": "^22.18.10",
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
|
56
|
+
"@typescript-eslint/parser": "^7.7.0",
|
|
57
|
+
"@vitejs/plugin-vue": "^6.0.5",
|
|
58
|
+
"@vue/test-utils": "^2.4.6",
|
|
59
|
+
"eslint": "^8.57.0",
|
|
60
|
+
"eslint-config-prettier": "^9.1.0",
|
|
61
|
+
"eslint-plugin-html": "^8.1.0",
|
|
62
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
63
|
+
"eslint-plugin-vue": "^9.25.0",
|
|
64
|
+
"happy-dom": "^18.0.1",
|
|
65
|
+
"ja-contextmenu": "^1.11.0",
|
|
66
|
+
"less": "^4.2.0",
|
|
67
|
+
"mitt": "^3.0.1",
|
|
68
|
+
"mockjs": "^1.1.0",
|
|
69
|
+
"postcss": "^8.4.47",
|
|
70
|
+
"postcss-discard-comments": "^6.0.2",
|
|
71
|
+
"postcss-preset-env": "^9.5.11",
|
|
72
|
+
"prettier": "^3.2.5",
|
|
73
|
+
"stk-table-vue": "^0.11.15",
|
|
74
|
+
"typescript": "^5.8.3",
|
|
75
|
+
"vite": "^8.1.2",
|
|
76
|
+
"vite-plugin-banner": "^0.8.1",
|
|
77
|
+
"vite-plugin-dts": "3.9.1",
|
|
78
|
+
"vitepress": "^1.6.4",
|
|
79
|
+
"vitepress-demo-plugin": "^1.5.1",
|
|
80
|
+
"vitepress-plugin-llms": "^1.13.2",
|
|
81
|
+
"vitest": "^4.1.9",
|
|
82
|
+
"vue": "^3.5.39",
|
|
83
|
+
"vue-eslint-parser": "^9.4.2"
|
|
84
|
+
}
|
|
85
|
+
}
|