stk-table-vue 0.0.1-beta.3 → 0.0.1-beta.4
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/LICENSE +21 -0
- package/README.md +6 -0
- package/lib/src/StkTable/StkTable.vue.d.ts +5 -5
- package/lib/src/StkTable/types/index.d.ts +4 -2
- package/lib/stk-table-vue.js +7 -5
- package/lib/style.css +63 -57
- package/package.json +1 -1
- package/src/StkTable/StkTable.vue +16 -4
- package/src/StkTable/types/index.ts +4 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 JA+
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -151,6 +151,12 @@ export type StkTableColumn<T extends Record<string, any>> = {
|
|
|
151
151
|
customHeaderCell?: Component | VNode | CustomHeaderCellFunc<T>;
|
|
152
152
|
/** 二级表头 */
|
|
153
153
|
children?: StkTableColumn<T>[];
|
|
154
|
+
/**
|
|
155
|
+
* 单元格分割线。
|
|
156
|
+
* 默认横竖都有
|
|
157
|
+
* horizontal - 仅展示横线
|
|
158
|
+
*/
|
|
159
|
+
border: boolean | 'horizontal';
|
|
154
160
|
};
|
|
155
161
|
```
|
|
156
162
|
|
|
@@ -62,7 +62,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
62
62
|
rowClassName: (row: any, i: number) => string;
|
|
63
63
|
colResizable: boolean;
|
|
64
64
|
colMinWidth: number;
|
|
65
|
-
|
|
65
|
+
bordered: boolean | "h" | "v" | "body-v";
|
|
66
66
|
}>>, {
|
|
67
67
|
width: string;
|
|
68
68
|
fixedMode: boolean;
|
|
@@ -87,7 +87,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
87
87
|
rowClassName: () => "";
|
|
88
88
|
colResizable: boolean;
|
|
89
89
|
colMinWidth: number;
|
|
90
|
-
|
|
90
|
+
bordered: boolean;
|
|
91
91
|
}>, {
|
|
92
92
|
setCurrentRow: typeof setCurrentRow;
|
|
93
93
|
setHighlightDimCell: (rowKeyValue: string, dataIndex: string) => void;
|
|
@@ -134,7 +134,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
134
134
|
rowClassName: (row: any, i: number) => string;
|
|
135
135
|
colResizable: boolean;
|
|
136
136
|
colMinWidth: number;
|
|
137
|
-
|
|
137
|
+
bordered: boolean | "h" | "v" | "body-v";
|
|
138
138
|
}>>, {
|
|
139
139
|
width: string;
|
|
140
140
|
fixedMode: boolean;
|
|
@@ -159,7 +159,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
159
159
|
rowClassName: () => "";
|
|
160
160
|
colResizable: boolean;
|
|
161
161
|
colMinWidth: number;
|
|
162
|
-
|
|
162
|
+
bordered: boolean;
|
|
163
163
|
}>>> & {
|
|
164
164
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
165
165
|
"onTh-drag-start"?: ((...args: any[]) => any) | undefined;
|
|
@@ -198,7 +198,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
198
198
|
rowClassName: (row: any, i: number) => string;
|
|
199
199
|
colResizable: boolean;
|
|
200
200
|
colMinWidth: number;
|
|
201
|
-
|
|
201
|
+
bordered: boolean | "h" | "v" | "body-v";
|
|
202
202
|
}, {}>, {
|
|
203
203
|
tableHeader?(_: {
|
|
204
204
|
column: StkTableColumn<any>;
|
|
@@ -113,8 +113,10 @@ export type StkProps = Partial<{
|
|
|
113
113
|
/**
|
|
114
114
|
* 单元格分割线。
|
|
115
115
|
* 默认横竖都有
|
|
116
|
-
*
|
|
116
|
+
* "h" - 仅展示横线
|
|
117
|
+
* "v" - 仅展示竖线
|
|
118
|
+
* "body-v" - 仅表体展示竖线
|
|
117
119
|
*/
|
|
118
|
-
|
|
120
|
+
bordered: boolean | 'h' | 'v' | 'body-v';
|
|
119
121
|
}>;
|
|
120
122
|
export {};
|
package/lib/stk-table-vue.js
CHANGED
|
@@ -492,7 +492,7 @@ function howDeepTheColumn(arr, level = 1) {
|
|
|
492
492
|
});
|
|
493
493
|
return Math.max(...levels);
|
|
494
494
|
}
|
|
495
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
495
|
+
const _withScopeId = (n) => (pushScopeId("data-v-0aa41491"), n = n(), popScopeId(), n);
|
|
496
496
|
const _hoisted_1 = { key: 0 };
|
|
497
497
|
const _hoisted_2 = ["data-col-key", "draggable", "rowspan", "colspan", "title", "onClick"];
|
|
498
498
|
const _hoisted_3 = { class: "table-header-cell-wrapper" };
|
|
@@ -564,7 +564,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
564
564
|
rowClassName: { type: Function, default: () => "" },
|
|
565
565
|
colResizable: { type: Boolean, default: false },
|
|
566
566
|
colMinWidth: { default: 10 },
|
|
567
|
-
|
|
567
|
+
bordered: { type: [Boolean, String], default: true }
|
|
568
568
|
},
|
|
569
569
|
emits: [
|
|
570
570
|
"sort-change",
|
|
@@ -922,8 +922,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
922
922
|
dark: _ctx.theme === "dark",
|
|
923
923
|
headless: _ctx.headless,
|
|
924
924
|
"is-col-resizing": unref(isColResizing),
|
|
925
|
-
border: props.
|
|
926
|
-
"border-
|
|
925
|
+
border: props.bordered,
|
|
926
|
+
"border-h": props.bordered === "h",
|
|
927
|
+
"border-v": props.bordered === "v",
|
|
928
|
+
"border-body-v": props.bordered === "body-v"
|
|
927
929
|
}]),
|
|
928
930
|
style: normalizeStyle(_ctx.virtual && { "--row-height": unref(virtualScroll).rowHeight + "px" }),
|
|
929
931
|
onScroll: onTableScroll,
|
|
@@ -1096,7 +1098,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
1096
1098
|
}
|
|
1097
1099
|
return target;
|
|
1098
1100
|
};
|
|
1099
|
-
const StkTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1101
|
+
const StkTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0aa41491"]]);
|
|
1100
1102
|
export {
|
|
1101
1103
|
StkTable,
|
|
1102
1104
|
insertToOrderedArray,
|
package/lib/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.stk-table[data-v-
|
|
1
|
+
.stk-table[data-v-0aa41491] {
|
|
2
2
|
--row-height: 28px;
|
|
3
3
|
--cell-padding-x: 8px;
|
|
4
4
|
--resize-handle-width: 4px;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
/** 列宽调整指示器 */
|
|
29
29
|
/**虚拟滚动模式 */
|
|
30
30
|
}
|
|
31
|
-
.stk-table.dark[data-v-
|
|
31
|
+
.stk-table.dark[data-v-0aa41491] {
|
|
32
32
|
--th-bgc: #181c21;
|
|
33
33
|
--td-bgc: #181c21;
|
|
34
34
|
--border-color: #26292e;
|
|
@@ -43,39 +43,45 @@
|
|
|
43
43
|
--col-resize-indicator-color: #5d6064;
|
|
44
44
|
color: #d0d1d2;
|
|
45
45
|
}
|
|
46
|
-
.stk-table.headless[data-v-
|
|
46
|
+
.stk-table.headless[data-v-0aa41491] {
|
|
47
47
|
border-top: 1px solid var(--border-color);
|
|
48
48
|
}
|
|
49
|
-
.stk-table.is-col-resizing th[data-v-
|
|
49
|
+
.stk-table.is-col-resizing th[data-v-0aa41491] {
|
|
50
50
|
pointer-events: none;
|
|
51
51
|
}
|
|
52
|
-
.stk-table.border-
|
|
52
|
+
.stk-table.border-h[data-v-0aa41491] {
|
|
53
53
|
--bg-border-right: linear-gradient(transparent, transparent);
|
|
54
54
|
--bg-border-left: linear-gradient(transparent, transparent);
|
|
55
55
|
}
|
|
56
|
-
.stk-table.border
|
|
57
|
-
|
|
56
|
+
.stk-table.border-v[data-v-0aa41491] {
|
|
57
|
+
--bg-border-bottom: linear-gradient(transparent, transparent);
|
|
58
|
+
}
|
|
59
|
+
.stk-table.border .stk-table-main th[data-v-0aa41491],
|
|
60
|
+
.stk-table.border .stk-table-main td[data-v-0aa41491] {
|
|
58
61
|
background-image: var(--bg-border-right), var(--bg-border-bottom);
|
|
59
62
|
}
|
|
60
|
-
.stk-table.border .stk-table-main thead tr:first-child th[data-v-
|
|
63
|
+
.stk-table.border .stk-table-main thead tr:first-child th[data-v-0aa41491] {
|
|
61
64
|
background-image: var(--bg-border-top), var(--bg-border-right), var(--bg-border-bottom);
|
|
62
65
|
}
|
|
63
|
-
.stk-table.border .stk-table-main thead tr:first-child th[data-v-
|
|
66
|
+
.stk-table.border .stk-table-main thead tr:first-child th[data-v-0aa41491]:first-child {
|
|
64
67
|
background-image: var(--bg-border-top), var(--bg-border-right), var(--bg-border-bottom), var(--bg-border-left);
|
|
65
68
|
}
|
|
66
|
-
.stk-table.border .stk-table-main thead tr th[data-v-
|
|
69
|
+
.stk-table.border .stk-table-main thead tr th[data-v-0aa41491]:first-child {
|
|
67
70
|
background-image: var(--bg-border-right), var(--bg-border-bottom), var(--bg-border-left);
|
|
68
71
|
}
|
|
69
|
-
.stk-table.border .stk-table-main tbody td[data-v-
|
|
72
|
+
.stk-table.border .stk-table-main tbody td[data-v-0aa41491]:first-child {
|
|
70
73
|
background-image: var(--bg-border-right), var(--bg-border-bottom), var(--bg-border-left);
|
|
71
74
|
}
|
|
72
|
-
.stk-table.border.virtual-x .stk-table-main thead tr:first-child .virtual-x-left + th[data-v-
|
|
75
|
+
.stk-table.border.virtual-x .stk-table-main thead tr:first-child .virtual-x-left + th[data-v-0aa41491] {
|
|
73
76
|
background-image: var(--bg-border-top), var(--bg-border-right), var(--bg-border-bottom), var(--bg-border-left);
|
|
74
77
|
}
|
|
75
|
-
.stk-table.border.virtual-x .stk-table-main tr .virtual-x-left + th[data-v-
|
|
78
|
+
.stk-table.border.virtual-x .stk-table-main tr .virtual-x-left + th[data-v-0aa41491] {
|
|
76
79
|
background-image: var(--bg-border-right), var(--bg-border-bottom), var(--bg-border-left);
|
|
77
80
|
}
|
|
78
|
-
.stk-table .
|
|
81
|
+
.stk-table.border-body-v .stk-table-main tbody[data-v-0aa41491] {
|
|
82
|
+
--bg-border-bottom: linear-gradient(transparent, transparent);
|
|
83
|
+
}
|
|
84
|
+
.stk-table .column-resize-indicator[data-v-0aa41491] {
|
|
79
85
|
width: 0;
|
|
80
86
|
height: 100%;
|
|
81
87
|
border-left: 1px dashed var(--col-resize-indicator-color);
|
|
@@ -84,122 +90,122 @@
|
|
|
84
90
|
display: none;
|
|
85
91
|
pointer-events: none;
|
|
86
92
|
}
|
|
87
|
-
.stk-table .stk-table-main[data-v-
|
|
93
|
+
.stk-table .stk-table-main[data-v-0aa41491] {
|
|
88
94
|
border-spacing: 0;
|
|
89
95
|
border-collapse: separate;
|
|
90
96
|
}
|
|
91
|
-
.stk-table .stk-table-main.fixed-mode[data-v-
|
|
97
|
+
.stk-table .stk-table-main.fixed-mode[data-v-0aa41491] {
|
|
92
98
|
table-layout: fixed;
|
|
93
99
|
}
|
|
94
|
-
.stk-table .stk-table-main th[data-v-
|
|
95
|
-
.stk-table .stk-table-main td[data-v-
|
|
100
|
+
.stk-table .stk-table-main th[data-v-0aa41491],
|
|
101
|
+
.stk-table .stk-table-main td[data-v-0aa41491] {
|
|
96
102
|
z-index: 1;
|
|
97
103
|
height: var(--row-height);
|
|
98
104
|
font-size: 14px;
|
|
99
105
|
box-sizing: border-box;
|
|
100
106
|
padding: 0 var(--cell-padding-x);
|
|
101
107
|
}
|
|
102
|
-
.stk-table .stk-table-main thead tr:first-child th[data-v-
|
|
108
|
+
.stk-table .stk-table-main thead tr:first-child th[data-v-0aa41491] {
|
|
103
109
|
position: sticky;
|
|
104
110
|
top: 0;
|
|
105
111
|
}
|
|
106
|
-
.stk-table .stk-table-main thead tr th[data-v-
|
|
112
|
+
.stk-table .stk-table-main thead tr th[data-v-0aa41491] {
|
|
107
113
|
background-color: var(--th-bgc);
|
|
108
114
|
}
|
|
109
|
-
.stk-table .stk-table-main thead tr th.sortable[data-v-
|
|
115
|
+
.stk-table .stk-table-main thead tr th.sortable[data-v-0aa41491] {
|
|
110
116
|
cursor: pointer;
|
|
111
117
|
}
|
|
112
|
-
.stk-table .stk-table-main thead tr th.text-overflow .table-header-cell-wrapper[data-v-
|
|
118
|
+
.stk-table .stk-table-main thead tr th.text-overflow .table-header-cell-wrapper[data-v-0aa41491] {
|
|
113
119
|
white-space: nowrap;
|
|
114
120
|
overflow: hidden;
|
|
115
121
|
}
|
|
116
|
-
.stk-table .stk-table-main thead tr th.text-overflow .table-header-cell-wrapper .table-header-title[data-v-
|
|
122
|
+
.stk-table .stk-table-main thead tr th.text-overflow .table-header-cell-wrapper .table-header-title[data-v-0aa41491] {
|
|
117
123
|
text-overflow: ellipsis;
|
|
118
124
|
overflow: hidden;
|
|
119
125
|
}
|
|
120
|
-
.stk-table .stk-table-main thead tr th:not(.sorter-desc):not(.sorter-asc):hover .table-header-cell-wrapper .table-header-sorter #arrow-up[data-v-
|
|
126
|
+
.stk-table .stk-table-main thead tr th:not(.sorter-desc):not(.sorter-asc):hover .table-header-cell-wrapper .table-header-sorter #arrow-up[data-v-0aa41491] {
|
|
121
127
|
fill: var(--sort-arrow-hover-color);
|
|
122
128
|
}
|
|
123
|
-
.stk-table .stk-table-main thead tr th:not(.sorter-desc):not(.sorter-asc):hover .table-header-cell-wrapper .table-header-sorter #arrow-down[data-v-
|
|
129
|
+
.stk-table .stk-table-main thead tr th:not(.sorter-desc):not(.sorter-asc):hover .table-header-cell-wrapper .table-header-sorter #arrow-down[data-v-0aa41491] {
|
|
124
130
|
fill: var(--sort-arrow-hover-color);
|
|
125
131
|
}
|
|
126
|
-
.stk-table .stk-table-main thead tr th.sorter-desc .table-header-cell-wrapper .table-header-sorter #arrow-up[data-v-
|
|
132
|
+
.stk-table .stk-table-main thead tr th.sorter-desc .table-header-cell-wrapper .table-header-sorter #arrow-up[data-v-0aa41491] {
|
|
127
133
|
fill: var(--sort-arrow-active-sub-color);
|
|
128
134
|
}
|
|
129
|
-
.stk-table .stk-table-main thead tr th.sorter-desc .table-header-cell-wrapper .table-header-sorter #arrow-down[data-v-
|
|
135
|
+
.stk-table .stk-table-main thead tr th.sorter-desc .table-header-cell-wrapper .table-header-sorter #arrow-down[data-v-0aa41491] {
|
|
130
136
|
fill: var(--sort-arrow-active-color);
|
|
131
137
|
}
|
|
132
|
-
.stk-table .stk-table-main thead tr th.sorter-asc .table-header-cell-wrapper .table-header-sorter #arrow-up[data-v-
|
|
138
|
+
.stk-table .stk-table-main thead tr th.sorter-asc .table-header-cell-wrapper .table-header-sorter #arrow-up[data-v-0aa41491] {
|
|
133
139
|
fill: var(--sort-arrow-active-color);
|
|
134
140
|
}
|
|
135
|
-
.stk-table .stk-table-main thead tr th.sorter-asc .table-header-cell-wrapper .table-header-sorter #arrow-down[data-v-
|
|
141
|
+
.stk-table .stk-table-main thead tr th.sorter-asc .table-header-cell-wrapper .table-header-sorter #arrow-down[data-v-0aa41491] {
|
|
136
142
|
fill: var(--sort-arrow-active-sub-color);
|
|
137
143
|
}
|
|
138
|
-
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper[data-v-
|
|
144
|
+
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper[data-v-0aa41491] {
|
|
139
145
|
max-width: 100%;
|
|
140
146
|
display: inline-flex;
|
|
141
147
|
align-items: center;
|
|
142
148
|
}
|
|
143
|
-
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper .table-header-title[data-v-
|
|
149
|
+
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper .table-header-title[data-v-0aa41491] {
|
|
144
150
|
overflow: hidden;
|
|
145
151
|
align-self: flex-start;
|
|
146
152
|
}
|
|
147
|
-
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper .table-header-sorter[data-v-
|
|
153
|
+
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper .table-header-sorter[data-v-0aa41491] {
|
|
148
154
|
flex-shrink: 0;
|
|
149
155
|
margin-left: 4px;
|
|
150
156
|
width: 16px;
|
|
151
157
|
height: 16px;
|
|
152
158
|
}
|
|
153
|
-
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper .table-header-sorter #arrow-up[data-v-
|
|
154
|
-
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper .table-header-sorter #arrow-down[data-v-
|
|
159
|
+
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper .table-header-sorter #arrow-up[data-v-0aa41491],
|
|
160
|
+
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper .table-header-sorter #arrow-down[data-v-0aa41491] {
|
|
155
161
|
fill: var(--sort-arrow-color);
|
|
156
162
|
}
|
|
157
|
-
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper .table-header-resizer[data-v-
|
|
163
|
+
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper .table-header-resizer[data-v-0aa41491] {
|
|
158
164
|
position: absolute;
|
|
159
165
|
top: 0;
|
|
160
166
|
bottom: 0;
|
|
161
167
|
cursor: col-resize;
|
|
162
168
|
width: var(--resize-handle-width);
|
|
163
169
|
}
|
|
164
|
-
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper .table-header-resizer.left[data-v-
|
|
170
|
+
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper .table-header-resizer.left[data-v-0aa41491] {
|
|
165
171
|
left: 0;
|
|
166
172
|
}
|
|
167
|
-
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper .table-header-resizer.right[data-v-
|
|
173
|
+
.stk-table .stk-table-main thead tr th .table-header-cell-wrapper .table-header-resizer.right[data-v-0aa41491] {
|
|
168
174
|
right: 0;
|
|
169
175
|
}
|
|
170
|
-
.stk-table .stk-table-main tbody[data-v-
|
|
176
|
+
.stk-table .stk-table-main tbody[data-v-0aa41491] {
|
|
171
177
|
/**高亮渐暗 */
|
|
172
178
|
}
|
|
173
|
-
@keyframes dim-
|
|
179
|
+
@keyframes dim-0aa41491 {
|
|
174
180
|
from {
|
|
175
181
|
background-color: var(--highlight-color);
|
|
176
182
|
}
|
|
177
183
|
}
|
|
178
|
-
.stk-table .stk-table-main tbody tr[data-v-
|
|
184
|
+
.stk-table .stk-table-main tbody tr[data-v-0aa41491] {
|
|
179
185
|
background-color: var(--td-bgc);
|
|
180
186
|
}
|
|
181
|
-
.stk-table .stk-table-main tbody tr.highlight-row[data-v-
|
|
182
|
-
animation: dim-
|
|
187
|
+
.stk-table .stk-table-main tbody tr.highlight-row[data-v-0aa41491] {
|
|
188
|
+
animation: dim-0aa41491 2s linear;
|
|
183
189
|
}
|
|
184
|
-
.stk-table .stk-table-main tbody tr.hover[data-v-
|
|
185
|
-
.stk-table .stk-table-main tbody tr[data-v-
|
|
190
|
+
.stk-table .stk-table-main tbody tr.hover[data-v-0aa41491],
|
|
191
|
+
.stk-table .stk-table-main tbody tr[data-v-0aa41491]:hover {
|
|
186
192
|
background-color: var(--tr-hover-bgc);
|
|
187
193
|
}
|
|
188
|
-
.stk-table .stk-table-main tbody tr.active[data-v-
|
|
194
|
+
.stk-table .stk-table-main tbody tr.active[data-v-0aa41491] {
|
|
189
195
|
background-color: var(--tr-active-bgc);
|
|
190
196
|
}
|
|
191
|
-
.stk-table .stk-table-main tbody tr td.fixed-cell[data-v-
|
|
197
|
+
.stk-table .stk-table-main tbody tr td.fixed-cell[data-v-0aa41491] {
|
|
192
198
|
background-color: inherit;
|
|
193
199
|
}
|
|
194
|
-
.stk-table .stk-table-main tbody tr td.highlight-cell[data-v-
|
|
195
|
-
animation: dim-
|
|
200
|
+
.stk-table .stk-table-main tbody tr td.highlight-cell[data-v-0aa41491] {
|
|
201
|
+
animation: dim-0aa41491 2s linear;
|
|
196
202
|
}
|
|
197
|
-
.stk-table .stk-table-main tbody tr td.text-overflow .table-cell-wrapper[data-v-
|
|
203
|
+
.stk-table .stk-table-main tbody tr td.text-overflow .table-cell-wrapper[data-v-0aa41491] {
|
|
198
204
|
white-space: nowrap;
|
|
199
205
|
overflow: hidden;
|
|
200
206
|
text-overflow: ellipsis;
|
|
201
207
|
}
|
|
202
|
-
.stk-table .stk-table-no-data[data-v-
|
|
208
|
+
.stk-table .stk-table-no-data[data-v-0aa41491] {
|
|
203
209
|
background-color: var(--table-bgc);
|
|
204
210
|
line-height: var(--row-height);
|
|
205
211
|
text-align: center;
|
|
@@ -214,27 +220,27 @@ from {
|
|
|
214
220
|
align-items: center;
|
|
215
221
|
justify-content: center;
|
|
216
222
|
}
|
|
217
|
-
.stk-table .stk-table-no-data.no-data-full[data-v-
|
|
223
|
+
.stk-table .stk-table-no-data.no-data-full[data-v-0aa41491] {
|
|
218
224
|
flex: 1;
|
|
219
225
|
}
|
|
220
|
-
.stk-table.virtual .stk-table-main thead tr th .table-header-cell-wrapper[data-v-
|
|
226
|
+
.stk-table.virtual .stk-table-main thead tr th .table-header-cell-wrapper[data-v-0aa41491] {
|
|
221
227
|
overflow: hidden;
|
|
222
228
|
max-height: var(--row-height);
|
|
223
229
|
}
|
|
224
|
-
.stk-table.virtual .stk-table-main tbody[data-v-
|
|
230
|
+
.stk-table.virtual .stk-table-main tbody[data-v-0aa41491] {
|
|
225
231
|
position: relative;
|
|
226
232
|
}
|
|
227
|
-
.stk-table.virtual .stk-table-main tbody tr.padding-top-tr td[data-v-
|
|
233
|
+
.stk-table.virtual .stk-table-main tbody tr.padding-top-tr td[data-v-0aa41491] {
|
|
228
234
|
height: 0;
|
|
229
235
|
}
|
|
230
|
-
.stk-table.virtual .stk-table-main tbody tr td[data-v-
|
|
236
|
+
.stk-table.virtual .stk-table-main tbody tr td[data-v-0aa41491] {
|
|
231
237
|
height: var(--row-height);
|
|
232
238
|
line-height: 1;
|
|
233
239
|
}
|
|
234
|
-
.stk-table.virtual .stk-table-main tbody tr td .table-cell-wrapper[data-v-
|
|
240
|
+
.stk-table.virtual .stk-table-main tbody tr td .table-cell-wrapper[data-v-0aa41491] {
|
|
235
241
|
max-height: var(--row-height);
|
|
236
242
|
overflow: hidden;
|
|
237
243
|
}
|
|
238
|
-
.stk-table.virtual-x .stk-table-main .virtual-x-left[data-v-
|
|
244
|
+
.stk-table.virtual-x .stk-table-main .virtual-x-left[data-v-0aa41491] {
|
|
239
245
|
padding: 0;
|
|
240
246
|
}
|
package/package.json
CHANGED
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
dark: theme === 'dark',
|
|
9
9
|
headless,
|
|
10
10
|
'is-col-resizing': isColResizing,
|
|
11
|
-
border: props.
|
|
12
|
-
'border-
|
|
11
|
+
border: props.bordered,
|
|
12
|
+
'border-h': props.bordered === 'h',
|
|
13
|
+
'border-v': props.bordered === 'v',
|
|
14
|
+
'border-body-v': props.bordered === 'body-v',
|
|
13
15
|
}"
|
|
14
16
|
:style="virtual && { '--row-height': virtualScroll.rowHeight + 'px' }"
|
|
15
17
|
@scroll="onTableScroll"
|
|
@@ -220,7 +222,7 @@ const props = withDefaults(defineProps<StkProps>(), {
|
|
|
220
222
|
rowClassName: () => '',
|
|
221
223
|
colResizable: false,
|
|
222
224
|
colMinWidth: 10,
|
|
223
|
-
|
|
225
|
+
bordered: true,
|
|
224
226
|
});
|
|
225
227
|
|
|
226
228
|
const emit = defineEmits([
|
|
@@ -770,10 +772,13 @@ defineExpose({
|
|
|
770
772
|
&.is-col-resizing th {
|
|
771
773
|
pointer-events: none;
|
|
772
774
|
}
|
|
773
|
-
&.border-
|
|
775
|
+
&.border-h {
|
|
774
776
|
--bg-border-right: linear-gradient(transparent, transparent);
|
|
775
777
|
--bg-border-left: linear-gradient(transparent, transparent);
|
|
776
778
|
}
|
|
779
|
+
&.border-v {
|
|
780
|
+
--bg-border-bottom: linear-gradient(transparent, transparent);
|
|
781
|
+
}
|
|
777
782
|
|
|
778
783
|
&.border {
|
|
779
784
|
.stk-table-main {
|
|
@@ -819,6 +824,13 @@ defineExpose({
|
|
|
819
824
|
}
|
|
820
825
|
}
|
|
821
826
|
}
|
|
827
|
+
&.border-body-v {
|
|
828
|
+
.stk-table-main {
|
|
829
|
+
tbody {
|
|
830
|
+
--bg-border-bottom: linear-gradient(transparent, transparent);
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
}
|
|
822
834
|
|
|
823
835
|
/** 列宽调整指示器 */
|
|
824
836
|
.column-resize-indicator {
|
|
@@ -135,7 +135,9 @@ export type StkProps = Partial<{
|
|
|
135
135
|
/**
|
|
136
136
|
* 单元格分割线。
|
|
137
137
|
* 默认横竖都有
|
|
138
|
-
*
|
|
138
|
+
* "h" - 仅展示横线
|
|
139
|
+
* "v" - 仅展示竖线
|
|
140
|
+
* "body-v" - 仅表体展示竖线
|
|
139
141
|
*/
|
|
140
|
-
|
|
142
|
+
bordered: boolean | 'h' | 'v' | 'body-v';
|
|
141
143
|
}>;
|