stk-table-vue 0.6.8 → 0.6.10
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 +201 -211
- package/lib/src/StkTable/StkTable.vue.d.ts +140 -129
- package/lib/src/StkTable/const.d.ts +2 -0
- package/lib/stk-table-vue.js +158 -154
- package/lib/style.css +11 -2
- package/package.json +74 -74
- package/src/StkTable/StkTable.vue +1541 -1515
- package/src/StkTable/components/DragHandle.vue +9 -9
- package/src/StkTable/components/SortIcon.vue +6 -6
- package/src/StkTable/const.ts +37 -34
- package/src/StkTable/index.ts +4 -4
- package/src/StkTable/style.less +553 -557
- package/src/StkTable/types/highlightDimOptions.ts +26 -26
- package/src/StkTable/types/index.ts +239 -239
- package/src/StkTable/useAutoResize.ts +91 -91
- package/src/StkTable/useColResize.ts +216 -213
- package/src/StkTable/useFixedCol.ts +148 -142
- package/src/StkTable/useFixedStyle.ts +75 -76
- package/src/StkTable/useGetFixedColPosition.ts +65 -64
- package/src/StkTable/useHighlight.ts +318 -318
- package/src/StkTable/useKeyboardArrowScroll.ts +106 -106
- package/src/StkTable/useThDrag.ts +102 -102
- package/src/StkTable/useTrDrag.ts +118 -118
- package/src/StkTable/useVirtualScroll.ts +447 -449
- package/src/StkTable/utils/constRefUtils.ts +29 -29
- package/src/StkTable/utils/index.ts +212 -212
- 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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span class="drag-row-handle" draggable="true">
|
|
3
|
-
<svg viewBox="0 0 1024 1024" width="16" height="16" fill="currentColor">
|
|
4
|
-
<path
|
|
5
|
-
d="M640 853.3a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m-256 0a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m256-256a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m-256 0a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m256-256a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3zM384 341.3a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z"
|
|
6
|
-
></path>
|
|
7
|
-
</svg>
|
|
8
|
-
</span>
|
|
9
|
-
</template>
|
|
1
|
+
<template>
|
|
2
|
+
<span class="drag-row-handle" draggable="true">
|
|
3
|
+
<svg viewBox="0 0 1024 1024" width="16" height="16" fill="currentColor">
|
|
4
|
+
<path
|
|
5
|
+
d="M640 853.3a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m-256 0a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m256-256a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m-256 0a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m256-256a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3zM384 341.3a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z"
|
|
6
|
+
></path>
|
|
7
|
+
</svg>
|
|
8
|
+
</span>
|
|
9
|
+
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 16 16">
|
|
3
|
-
<polygon class="arrow-up" fill="#757699" points="8 2 4.8 6 11.2 6"></polygon>
|
|
4
|
-
<polygon class="arrow-down" transform="translate(8, 12) rotate(-180) translate(-8, -12) " points="8 10 4.8 14 11.2 14"></polygon>
|
|
5
|
-
</svg>
|
|
6
|
-
</template>
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 16 16">
|
|
3
|
+
<polygon class="arrow-up" fill="#757699" points="8 2 4.8 6 11.2 6"></polygon>
|
|
4
|
+
<polygon class="arrow-down" transform="translate(8, 12) rotate(-180) translate(-8, -12) " points="8 10 4.8 14 11.2 14"></polygon>
|
|
5
|
+
</svg>
|
|
6
|
+
</template>
|
package/src/StkTable/const.ts
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
|
-
import { getBrowsersVersion } from './utils';
|
|
2
|
-
|
|
3
|
-
export const DEFAULT_COL_WIDTH = '100';
|
|
4
|
-
|
|
5
|
-
export const DEFAULT_TABLE_HEIGHT = 100;
|
|
6
|
-
export const DEFAULT_TABLE_WIDTH = 200;
|
|
7
|
-
export const DEFAULT_ROW_HEIGHT = 28;
|
|
8
|
-
|
|
9
|
-
/** highlight background */
|
|
10
|
-
export const HIGHLIGHT_COLOR = {
|
|
11
|
-
light: { from: '#71a2fd', to: '#fff' },
|
|
12
|
-
dark: { from: '#1e4c99', to: '#181c21' },
|
|
13
|
-
};
|
|
14
|
-
export const HIGHLIGHT_DURATION = 2000;
|
|
15
|
-
|
|
16
|
-
/** highlight change frequency 1000/30 -> 30FPS */
|
|
17
|
-
export const HIGHLIGHT_FREQ = 1000 / 30;
|
|
18
|
-
|
|
19
|
-
export const HIGHLIGHT_ROW_CLASS = 'highlight-row';
|
|
20
|
-
export const HIGHLIGHT_CELL_CLASS = 'highlight-cell';
|
|
21
|
-
|
|
22
|
-
const _chromeVersion = getBrowsersVersion('chrome');
|
|
23
|
-
const _firefoxVersion = getBrowsersVersion('firefox');
|
|
24
|
-
|
|
25
|
-
/** legacy sticky compatible mode */
|
|
26
|
-
export const IS_LEGACY_MODE = _chromeVersion < 56 || _firefoxVersion < 59;
|
|
27
|
-
|
|
28
|
-
/** default props.smoothDefault */
|
|
29
|
-
export const DEFAULT_SMOOTH_SCROLL = _chromeVersion < 85;
|
|
30
|
-
|
|
31
|
-
export const STK_ID_PREFIX = 'stk';
|
|
32
|
-
|
|
33
|
-
/** expanded row key prefix */
|
|
34
|
-
export const EXPANDED_ROW_KEY_PREFIX = 'expanded-';
|
|
1
|
+
import { getBrowsersVersion } from './utils';
|
|
2
|
+
|
|
3
|
+
export const DEFAULT_COL_WIDTH = '100';
|
|
4
|
+
|
|
5
|
+
export const DEFAULT_TABLE_HEIGHT = 100;
|
|
6
|
+
export const DEFAULT_TABLE_WIDTH = 200;
|
|
7
|
+
export const DEFAULT_ROW_HEIGHT = 28;
|
|
8
|
+
|
|
9
|
+
/** highlight background */
|
|
10
|
+
export const HIGHLIGHT_COLOR = {
|
|
11
|
+
light: { from: '#71a2fd', to: '#fff' },
|
|
12
|
+
dark: { from: '#1e4c99', to: '#181c21' },
|
|
13
|
+
};
|
|
14
|
+
export const HIGHLIGHT_DURATION = 2000;
|
|
15
|
+
|
|
16
|
+
/** highlight change frequency 1000/30 -> 30FPS */
|
|
17
|
+
export const HIGHLIGHT_FREQ = 1000 / 30;
|
|
18
|
+
|
|
19
|
+
export const HIGHLIGHT_ROW_CLASS = 'highlight-row';
|
|
20
|
+
export const HIGHLIGHT_CELL_CLASS = 'highlight-cell';
|
|
21
|
+
|
|
22
|
+
const _chromeVersion = getBrowsersVersion('chrome');
|
|
23
|
+
const _firefoxVersion = getBrowsersVersion('firefox');
|
|
24
|
+
|
|
25
|
+
/** legacy sticky compatible mode */
|
|
26
|
+
export const IS_LEGACY_MODE = _chromeVersion < 56 || _firefoxVersion < 59;
|
|
27
|
+
|
|
28
|
+
/** default props.smoothDefault */
|
|
29
|
+
export const DEFAULT_SMOOTH_SCROLL = _chromeVersion < 85;
|
|
30
|
+
|
|
31
|
+
export const STK_ID_PREFIX = 'stk';
|
|
32
|
+
|
|
33
|
+
/** expanded row key prefix */
|
|
34
|
+
export const EXPANDED_ROW_KEY_PREFIX = 'expanded-';
|
|
35
|
+
|
|
36
|
+
/** cell key 的分隔符 */
|
|
37
|
+
export const CELL_KEY_SEPARATE = '--';
|
package/src/StkTable/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as StkTable } from './StkTable.vue';
|
|
2
|
-
export { tableSort, insertToOrderedArray, strCompare, binarySearch } from './utils';
|
|
3
|
-
export type { StkTableColumn } from './types/index';
|
|
4
|
-
import './style.less';
|
|
1
|
+
export { default as StkTable } from './StkTable.vue';
|
|
2
|
+
export { tableSort, insertToOrderedArray, strCompare, binarySearch } from './utils';
|
|
3
|
+
export type { StkTableColumn } from './types/index';
|
|
4
|
+
import './style.less';
|