stk-table-vue 0.8.14 → 0.9.0-beta.1

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.
Files changed (38) hide show
  1. package/README.md +172 -172
  2. package/lib/src/StkTable/StkTable.vue.d.ts +19 -1
  3. package/lib/src/StkTable/useScrollbar.d.ts +57 -0
  4. package/lib/src/StkTable/utils/index.d.ts +7 -0
  5. package/lib/stk-table-vue.js +396 -205
  6. package/lib/style.css +42 -1
  7. package/package.json +74 -74
  8. package/src/StkTable/StkTable.vue +1730 -1665
  9. package/src/StkTable/components/DragHandle.vue +9 -9
  10. package/src/StkTable/components/SortIcon.vue +6 -6
  11. package/src/StkTable/components/TriangleIcon.vue +3 -3
  12. package/src/StkTable/const.ts +50 -50
  13. package/src/StkTable/index.ts +4 -4
  14. package/src/StkTable/style.less +627 -578
  15. package/src/StkTable/types/highlightDimOptions.ts +26 -26
  16. package/src/StkTable/types/index.ts +297 -297
  17. package/src/StkTable/useAutoResize.ts +91 -91
  18. package/src/StkTable/useColResize.ts +216 -216
  19. package/src/StkTable/useFixedCol.ts +150 -150
  20. package/src/StkTable/useFixedStyle.ts +75 -75
  21. package/src/StkTable/useGetFixedColPosition.ts +65 -65
  22. package/src/StkTable/useHighlight.ts +257 -257
  23. package/src/StkTable/useKeyboardArrowScroll.ts +112 -112
  24. package/src/StkTable/useMaxRowSpan.ts +55 -55
  25. package/src/StkTable/useMergeCells.ts +120 -120
  26. package/src/StkTable/useRowExpand.ts +88 -88
  27. package/src/StkTable/useScrollRowByRow.ts +113 -113
  28. package/src/StkTable/useScrollbar.ts +187 -0
  29. package/src/StkTable/useThDrag.ts +102 -102
  30. package/src/StkTable/useTrDrag.ts +113 -113
  31. package/src/StkTable/useTree.ts +161 -161
  32. package/src/StkTable/useVirtualScroll.ts +494 -494
  33. package/src/StkTable/utils/constRefUtils.ts +29 -29
  34. package/src/StkTable/utils/index.ts +287 -258
  35. package/src/StkTable/utils/useTriggerRef.ts +33 -33
  36. package/src/VirtualTree.vue +622 -622
  37. package/src/VirtualTreeSelect.vue +367 -367
  38. package/src/vite-env.d.ts +10 -10
package/lib/style.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: stk-table-vue
3
- * version: v0.8.13
3
+ * version: v0.9.0-beta.1
4
4
  * description: High performance realtime virtual table for vue3 and vue2.7
5
5
  * author: japlus
6
6
  * homepage: https://ja-plus.github.io/stk-table-vue/
@@ -44,6 +44,8 @@
44
44
  --fixed-col-shadow-color-from:rgba(0, 0, 0, 0.1);
45
45
  --fixed-col-shadow-color-to:rgba(0, 0, 0, 0);
46
46
  --drag-handle-hover-color:#d0d1e0;
47
+ --sb-thumb-color:#c1c1d7;
48
+ --sb-thumb-hover-color:#a8a8c1;
47
49
  position:relative;
48
50
  overflow:auto;
49
51
  display:flex;
@@ -72,8 +74,13 @@
72
74
  --fixed-col-shadow-color-from:rgba(135, 135, 156, 0.1);
73
75
  --fixed-col-shadow-color-to:rgba(135, 135, 156, 0);
74
76
  --drag-handle-hover-color:#5d6064;
77
+ --sb-thumb-color:rgba(93, 96, 100, 0.9);
78
+ --sb-thumb-hover-color:#727782;
75
79
  color:#d1d1e0;
76
80
  }
81
+ .stk-table.scrollbar-on{
82
+ overflow:hidden;
83
+ }
77
84
  .stk-table.headless.bordered{
78
85
  border-top:1px solid var(--border-color);
79
86
  background-image:var(--bg-border-right), var(--bg-border-bottom);
@@ -421,3 +428,37 @@
421
428
  .stk-table td.cell-active{
422
429
  background-color:var(--tr-active-bgc);
423
430
  }
431
+ .stk-table:hover .stk-sb-thumb{
432
+ opacity:0.7;
433
+ }
434
+ .stk-sb-thumb{
435
+ z-index:100;
436
+ position:sticky;
437
+ background-color:var(--sb-thumb-color);
438
+ border-radius:4px;
439
+ transition:transform 0.1s ease, opacity 0.5s ease;
440
+ -webkit-user-select:none;
441
+ -moz-user-select:none;
442
+ user-select:none;
443
+ opacity:0;
444
+ flex-shrink:0;
445
+ }
446
+ .stk-sb-thumb:hover{
447
+ background-color:var(--sb-thumb-hover-color);
448
+ }
449
+ .stk-sb-thumb:active{
450
+ opacity:1;
451
+ background-color:var(--sb-thumb-hover-color);
452
+ }
453
+ .stk-sb-thumb.vertical{
454
+ margin-left:auto;
455
+ top:0;
456
+ right:0;
457
+ width:var(--sb-width);
458
+ }
459
+ .stk-sb-thumb.horizontal{
460
+ margin-top:auto;
461
+ bottom:0;
462
+ left:0;
463
+ height:var(--sb-height);
464
+ }
package/package.json CHANGED
@@ -1,75 +1,75 @@
1
- {
2
- "name": "stk-table-vue",
3
- "version": "0.8.14",
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
- "packageManager": "pnpm@10.7.0",
9
- "directories": {
10
- "test": "test"
11
- },
12
- "type": "module",
13
- "scripts": {
14
- "dev": "vite",
15
- "build": "vite build",
16
- "test": "vitest",
17
- "docs:dev": "vitepress dev docs-src",
18
- "docs:build": "vitepress build docs-src",
19
- "docs:preview": "vitepress preview docs-src",
20
- "docs:update": "cp -rf ./docs-src/.vitepress/dist/* ./docs"
21
- },
22
- "keywords": [
23
- "virtual table",
24
- "vue",
25
- "vue2",
26
- "vue3",
27
- "highlight",
28
- "sticky",
29
- "virtual",
30
- "table",
31
- "list"
32
- ],
33
- "files": [
34
- "lib",
35
- "src"
36
- ],
37
- "author": "japlus",
38
- "repository": {
39
- "type": "git",
40
- "url": "https://github.com/ja-plus/stk-table-vue"
41
- },
42
- "license": "MIT",
43
- "devDependencies": {
44
- "@types/mockjs": "^1.0.10",
45
- "@types/node": "^22.18.10",
46
- "@typescript-eslint/eslint-plugin": "^7.7.0",
47
- "@typescript-eslint/parser": "^7.7.0",
48
- "@vitejs/plugin-vue": "^6.0.2",
49
- "@vue/test-utils": "^2.4.6",
50
- "eslint": "^8.57.0",
51
- "eslint-config-prettier": "^9.1.0",
52
- "eslint-plugin-html": "^8.1.0",
53
- "eslint-plugin-prettier": "^5.1.3",
54
- "eslint-plugin-vue": "^9.25.0",
55
- "happy-dom": "^18.0.1",
56
- "less": "^4.2.0",
57
- "mitt": "^3.0.1",
58
- "mockjs": "^1.1.0",
59
- "postcss": "^8.4.47",
60
- "postcss-discard-comments": "^6.0.2",
61
- "postcss-preset-env": "^9.5.11",
62
- "prettier": "^3.2.5",
63
- "stk-table-vue": "^0.8.7",
64
- "typescript": "^5.8.3",
65
- "vite": "^7.2.2",
66
- "vite-plugin-banner": "^0.8.1",
67
- "vite-plugin-dts": "3.9.1",
68
- "vitepress": "^1.6.4",
69
- "vitepress-demo-plugin": "^1.4.7",
70
- "vitepress-plugin-llms": "^1.7.5",
71
- "vitest": "^3.2.4",
72
- "vue": "^3.5.22",
73
- "vue-eslint-parser": "^9.4.2"
74
- }
1
+ {
2
+ "name": "stk-table-vue",
3
+ "version": "0.9.0-beta.1",
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
+ "packageManager": "pnpm@10.7.0",
9
+ "directories": {
10
+ "test": "test"
11
+ },
12
+ "type": "module",
13
+ "scripts": {
14
+ "dev": "vite",
15
+ "build": "vite build",
16
+ "test": "vitest",
17
+ "docs:dev": "vitepress dev docs-src",
18
+ "docs:build": "vitepress build docs-src",
19
+ "docs:preview": "vitepress preview docs-src",
20
+ "docs:update": "cp -rf ./docs-src/.vitepress/dist/* ./docs"
21
+ },
22
+ "keywords": [
23
+ "virtual table",
24
+ "vue",
25
+ "vue2",
26
+ "vue3",
27
+ "highlight",
28
+ "sticky",
29
+ "virtual",
30
+ "table",
31
+ "list"
32
+ ],
33
+ "files": [
34
+ "lib",
35
+ "src"
36
+ ],
37
+ "author": "japlus",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/ja-plus/stk-table-vue"
41
+ },
42
+ "license": "MIT",
43
+ "devDependencies": {
44
+ "@types/mockjs": "^1.0.10",
45
+ "@types/node": "^22.18.10",
46
+ "@typescript-eslint/eslint-plugin": "^7.7.0",
47
+ "@typescript-eslint/parser": "^7.7.0",
48
+ "@vitejs/plugin-vue": "^6.0.2",
49
+ "@vue/test-utils": "^2.4.6",
50
+ "eslint": "^8.57.0",
51
+ "eslint-config-prettier": "^9.1.0",
52
+ "eslint-plugin-html": "^8.1.0",
53
+ "eslint-plugin-prettier": "^5.1.3",
54
+ "eslint-plugin-vue": "^9.25.0",
55
+ "happy-dom": "^18.0.1",
56
+ "less": "^4.2.0",
57
+ "mitt": "^3.0.1",
58
+ "mockjs": "^1.1.0",
59
+ "postcss": "^8.4.47",
60
+ "postcss-discard-comments": "^6.0.2",
61
+ "postcss-preset-env": "^9.5.11",
62
+ "prettier": "^3.2.5",
63
+ "stk-table-vue": "^0.8.14",
64
+ "typescript": "^5.8.3",
65
+ "vite": "^7.2.2",
66
+ "vite-plugin-banner": "^0.8.1",
67
+ "vite-plugin-dts": "3.9.1",
68
+ "vitepress": "^1.6.4",
69
+ "vitepress-demo-plugin": "^1.5.1",
70
+ "vitepress-plugin-llms": "^1.10.0",
71
+ "vitest": "^3.2.4",
72
+ "vue": "^3.5.22",
73
+ "vue-eslint-parser": "^9.4.2"
74
+ }
75
75
  }