@cyberpunk-vue/theme-chalk 1.14.0 → 1.14.2
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/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +1 -1
- package/src/common/var.scss +247 -247
- package/src/components/avatar-group.scss +113 -113
- package/src/components/avatar.scss +123 -123
- package/src/components/badge.scss +210 -210
- package/src/components/breadcrumb.scss +203 -203
- package/src/components/button.scss +975 -975
- package/src/components/card.scss +699 -696
- package/src/components/checkbox-group.scss +22 -22
- package/src/components/checkbox.scss +320 -320
- package/src/components/col.scss +43 -43
- package/src/components/dialog.scss +360 -360
- package/src/components/divider.scss +250 -250
- package/src/components/empty.scss +99 -99
- package/src/components/form-item.scss +189 -189
- package/src/components/form.scss +59 -59
- package/src/components/icon.scss +83 -83
- package/src/components/image-preview.scss +147 -147
- package/src/components/image.scss +351 -351
- package/src/components/input-number.scss +129 -129
- package/src/components/input.scss +362 -362
- package/src/components/loading.scss +64 -64
- package/src/components/notification.scss +348 -348
- package/src/components/pagination.scss +287 -280
- package/src/components/pattern-background.scss +18 -18
- package/src/components/popover.scss +438 -438
- package/src/components/progress.scss +438 -438
- package/src/components/radio-group.scss +22 -22
- package/src/components/radio.scss +286 -286
- package/src/components/row.scss +12 -12
- package/src/components/scrollbar.scss +40 -40
- package/src/components/segmented.scss +566 -566
- package/src/components/select.scss +15 -1
- package/src/components/slider.scss +421 -421
- package/src/components/status-indicator.scss +206 -206
- package/src/components/switch.scss +405 -405
- package/src/components/table.scss +474 -474
- package/src/components/tag.scss +416 -416
- package/src/components/text.scss +310 -271
- package/src/components/textarea.scss +106 -104
- package/src/components/timeline.scss +379 -379
- package/src/components/tree.scss +397 -397
- package/src/components/upload.scss +509 -509
- package/src/index.scss +60 -60
- package/src/mixins/mixins.scss +156 -156
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
// CpTable 组件样式
|
|
2
|
-
// 赛博朋克/机甲风格数据表格
|
|
3
|
-
|
|
4
|
-
@use "sass:map";
|
|
5
|
-
@use "../common/var" as *;
|
|
6
|
-
@use "../mixins/mixins" as *;
|
|
7
|
-
|
|
8
|
-
// 颜色映射
|
|
9
|
-
$table-types: (
|
|
10
|
-
default: var(--cp-text-muted),
|
|
11
|
-
primary: var(--cp-color-primary),
|
|
12
|
-
success: var(--cp-color-success),
|
|
13
|
-
warning: var(--cp-color-warning),
|
|
14
|
-
error: var(--cp-color-error),
|
|
15
|
-
info: var(--cp-color-info),
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
// 尺寸配置
|
|
19
|
-
$table-sizes: (
|
|
20
|
-
sm: (
|
|
21
|
-
cell-padding: 6px 10px,
|
|
22
|
-
font-size: 12px,
|
|
23
|
-
header-height: 32px,
|
|
24
|
-
),
|
|
25
|
-
md: (
|
|
26
|
-
cell-padding: 10px 14px,
|
|
27
|
-
font-size: 13px,
|
|
28
|
-
header-height: 40px,
|
|
29
|
-
),
|
|
30
|
-
lg: (
|
|
31
|
-
cell-padding: 14px 18px,
|
|
32
|
-
font-size: 14px,
|
|
33
|
-
header-height: 48px,
|
|
34
|
-
),
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
@include b(table) {
|
|
38
|
-
--cp-table-color: var(--cp-text-secondary);
|
|
39
|
-
--cp-table-border: var(--cp-border);
|
|
40
|
-
--cp-table-header-bg: linear-gradient(
|
|
41
|
-
180deg,
|
|
42
|
-
rgba(255, 255, 255, 0.05) 0%,
|
|
43
|
-
rgba(255, 255, 255, 0.02) 100%
|
|
44
|
-
);
|
|
45
|
-
--cp-table-header-border-color: var(--cp-border);
|
|
46
|
-
--cp-table-row-bg: transparent;
|
|
47
|
-
--cp-table-row-stripe-bg: var(--cp-surface-variant);
|
|
48
|
-
--cp-table-row-hover-bg: var(--cp-state-hover);
|
|
49
|
-
--cp-table-row-current-bg: var(--cp-state-selected);
|
|
50
|
-
--cp-table-row-selected-bg: var(--cp-state-selected);
|
|
51
|
-
--cp-table-cell-padding: 10px 14px;
|
|
52
|
-
--cp-table-font-size: 13px;
|
|
53
|
-
--cp-table-header-height: 40px;
|
|
54
|
-
|
|
55
|
-
position: relative;
|
|
56
|
-
width: 100%;
|
|
57
|
-
overflow: hidden;
|
|
58
|
-
font-family: var(--cp-font-family-ui);
|
|
59
|
-
font-size: var(--cp-table-font-size);
|
|
60
|
-
color: var(--cp-text-primary);
|
|
61
|
-
|
|
62
|
-
// ===== 尺寸 =====
|
|
63
|
-
@each $size-name, $size-config in $table-sizes {
|
|
64
|
-
@include m(#{$size-name}) {
|
|
65
|
-
--cp-table-cell-padding: #{map.get($size-config, cell-padding)};
|
|
66
|
-
--cp-table-font-size: #{map.get($size-config, font-size)};
|
|
67
|
-
--cp-table-header-height: #{map.get($size-config, header-height)};
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// ===== 颜色类型 =====
|
|
72
|
-
@each $type-name, $type-color in $table-types {
|
|
73
|
-
@include m(type-#{$type-name}) {
|
|
74
|
-
--cp-table-color: #{$type-color};
|
|
75
|
-
--cp-table-header-bg: linear-gradient(
|
|
76
|
-
180deg,
|
|
77
|
-
color-mix(in srgb, #{$type-color} 18%, transparent) 0%,
|
|
78
|
-
color-mix(in srgb, #{$type-color} 6%, transparent) 100%
|
|
79
|
-
);
|
|
80
|
-
--cp-table-header-border-color: color-mix(in srgb, #{$type-color} 40%, transparent);
|
|
81
|
-
--cp-table-row-hover-bg: color-mix(in srgb, #{$type-color} 6%, transparent);
|
|
82
|
-
--cp-table-row-current-bg: color-mix(in srgb, #{$type-color} 10%, transparent);
|
|
83
|
-
--cp-table-row-selected-bg: color-mix(in srgb, #{$type-color} 8%, transparent);
|
|
84
|
-
|
|
1
|
+
// CpTable 组件样式
|
|
2
|
+
// 赛博朋克/机甲风格数据表格
|
|
3
|
+
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
@use "../common/var" as *;
|
|
6
|
+
@use "../mixins/mixins" as *;
|
|
7
|
+
|
|
8
|
+
// 颜色映射
|
|
9
|
+
$table-types: (
|
|
10
|
+
default: var(--cp-text-muted),
|
|
11
|
+
primary: var(--cp-color-primary),
|
|
12
|
+
success: var(--cp-color-success),
|
|
13
|
+
warning: var(--cp-color-warning),
|
|
14
|
+
error: var(--cp-color-error),
|
|
15
|
+
info: var(--cp-color-info),
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
// 尺寸配置
|
|
19
|
+
$table-sizes: (
|
|
20
|
+
sm: (
|
|
21
|
+
cell-padding: 6px 10px,
|
|
22
|
+
font-size: 12px,
|
|
23
|
+
header-height: 32px,
|
|
24
|
+
),
|
|
25
|
+
md: (
|
|
26
|
+
cell-padding: 10px 14px,
|
|
27
|
+
font-size: 13px,
|
|
28
|
+
header-height: 40px,
|
|
29
|
+
),
|
|
30
|
+
lg: (
|
|
31
|
+
cell-padding: 14px 18px,
|
|
32
|
+
font-size: 14px,
|
|
33
|
+
header-height: 48px,
|
|
34
|
+
),
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
@include b(table) {
|
|
38
|
+
--cp-table-color: var(--cp-text-secondary);
|
|
39
|
+
--cp-table-border: var(--cp-border);
|
|
40
|
+
--cp-table-header-bg: linear-gradient(
|
|
41
|
+
180deg,
|
|
42
|
+
rgba(255, 255, 255, 0.05) 0%,
|
|
43
|
+
rgba(255, 255, 255, 0.02) 100%
|
|
44
|
+
);
|
|
45
|
+
--cp-table-header-border-color: var(--cp-border);
|
|
46
|
+
--cp-table-row-bg: transparent;
|
|
47
|
+
--cp-table-row-stripe-bg: var(--cp-surface-variant);
|
|
48
|
+
--cp-table-row-hover-bg: var(--cp-state-hover);
|
|
49
|
+
--cp-table-row-current-bg: var(--cp-state-selected);
|
|
50
|
+
--cp-table-row-selected-bg: var(--cp-state-selected);
|
|
51
|
+
--cp-table-cell-padding: 10px 14px;
|
|
52
|
+
--cp-table-font-size: 13px;
|
|
53
|
+
--cp-table-header-height: 40px;
|
|
54
|
+
|
|
55
|
+
position: relative;
|
|
56
|
+
width: 100%;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
font-family: var(--cp-font-family-ui);
|
|
59
|
+
font-size: var(--cp-table-font-size);
|
|
60
|
+
color: var(--cp-text-primary);
|
|
61
|
+
|
|
62
|
+
// ===== 尺寸 =====
|
|
63
|
+
@each $size-name, $size-config in $table-sizes {
|
|
64
|
+
@include m(#{$size-name}) {
|
|
65
|
+
--cp-table-cell-padding: #{map.get($size-config, cell-padding)};
|
|
66
|
+
--cp-table-font-size: #{map.get($size-config, font-size)};
|
|
67
|
+
--cp-table-header-height: #{map.get($size-config, header-height)};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// ===== 颜色类型 =====
|
|
72
|
+
@each $type-name, $type-color in $table-types {
|
|
73
|
+
@include m(type-#{$type-name}) {
|
|
74
|
+
--cp-table-color: #{$type-color};
|
|
75
|
+
--cp-table-header-bg: linear-gradient(
|
|
76
|
+
180deg,
|
|
77
|
+
color-mix(in srgb, #{$type-color} 18%, transparent) 0%,
|
|
78
|
+
color-mix(in srgb, #{$type-color} 6%, transparent) 100%
|
|
79
|
+
);
|
|
80
|
+
--cp-table-header-border-color: color-mix(in srgb, #{$type-color} 40%, transparent);
|
|
81
|
+
--cp-table-row-hover-bg: color-mix(in srgb, #{$type-color} 6%, transparent);
|
|
82
|
+
--cp-table-row-current-bg: color-mix(in srgb, #{$type-color} 10%, transparent);
|
|
83
|
+
--cp-table-row-selected-bg: color-mix(in srgb, #{$type-color} 8%, transparent);
|
|
84
|
+
|
|
85
85
|
.cp-table__sort-caret {
|
|
86
86
|
&.is-active {
|
|
87
87
|
color: #{$type-color};
|
|
@@ -89,17 +89,17 @@ $table-sizes: (
|
|
|
89
89
|
filter: drop-shadow(0 0 6px #{$type-color});
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// ===== Wrapper =====
|
|
96
|
-
@include e(wrapper) {
|
|
97
|
-
width: 100%;
|
|
98
|
-
overflow: auto;
|
|
99
|
-
@include scrollbar('thin');
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// ===== Inner Table =====
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// ===== Wrapper =====
|
|
96
|
+
@include e(wrapper) {
|
|
97
|
+
width: 100%;
|
|
98
|
+
overflow: auto;
|
|
99
|
+
@include scrollbar('thin');
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// ===== Inner Table =====
|
|
103
103
|
@include e(inner) {
|
|
104
104
|
width: 100%;
|
|
105
105
|
border-collapse: collapse;
|
|
@@ -110,75 +110,75 @@ $table-sizes: (
|
|
|
110
110
|
table-layout: fixed;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
|
|
114
|
-
// ===== 表头 =====
|
|
115
|
-
@include e(header) {
|
|
116
|
-
position: sticky;
|
|
117
|
-
top: 0;
|
|
118
|
-
z-index: 2;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
@include e(header-row) {
|
|
122
|
-
background: var(--cp-table-header-bg);
|
|
123
|
-
position: relative;
|
|
124
|
-
border-top: 1px solid var(--cp-table-header-border-color);
|
|
125
|
-
|
|
126
|
-
// 赛博朋克扫描线纹理 - 使用多重背景实现,避免 ::before 破坏 tr 布局
|
|
127
|
-
background-image: repeating-linear-gradient(
|
|
128
|
-
0deg,
|
|
129
|
-
transparent,
|
|
130
|
-
transparent 2px,
|
|
131
|
-
rgba(255, 255, 255, 0.015) 2px,
|
|
132
|
-
rgba(255, 255, 255, 0.015) 4px
|
|
133
|
-
),
|
|
134
|
-
var(--cp-table-header-bg);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
@include e(header-cell) {
|
|
138
|
-
padding: var(--cp-table-cell-padding);
|
|
139
|
-
height: var(--cp-table-header-height);
|
|
140
|
-
font-weight: 600;
|
|
141
|
-
text-align: left;
|
|
142
|
-
white-space: nowrap;
|
|
143
|
-
border-bottom: 1px solid var(--cp-table-header-border-color);
|
|
144
|
-
color: var(--cp-text-primary);
|
|
145
|
-
text-transform: uppercase;
|
|
146
|
-
font-size: 0.85em;
|
|
147
|
-
letter-spacing: 0.08em;
|
|
148
|
-
transition: color 0.2s ease, background 0.2s ease, text-shadow 0.2s ease;
|
|
149
|
-
user-select: none;
|
|
150
|
-
vertical-align: middle;
|
|
151
|
-
background: transparent; // 确保透过背景看背景图
|
|
152
|
-
position: relative;
|
|
153
|
-
z-index: 1;
|
|
154
|
-
|
|
155
|
-
// 排序激活状态 - 表头文字
|
|
156
|
-
&.is-ascending,
|
|
157
|
-
&.is-descending {
|
|
158
|
-
color: var(--cp-text-primary);
|
|
159
|
-
text-shadow: 0 0 8px var(--cp-table-color);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
// 排序激活的 caret
|
|
163
|
-
&.is-ascending {
|
|
164
|
-
.cp-table__sort-caret.is-ascending {
|
|
165
|
-
opacity: 1;
|
|
166
|
-
color: var(--cp-table-color);
|
|
167
|
-
filter: drop-shadow(0 0 4px var(--cp-table-color));
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
&.is-descending {
|
|
172
|
-
.cp-table__sort-caret.is-descending {
|
|
173
|
-
opacity: 1;
|
|
174
|
-
color: var(--cp-table-color);
|
|
175
|
-
filter: drop-shadow(0 0 4px var(--cp-table-color));
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
113
|
+
|
|
114
|
+
// ===== 表头 =====
|
|
115
|
+
@include e(header) {
|
|
116
|
+
position: sticky;
|
|
117
|
+
top: 0;
|
|
118
|
+
z-index: 2;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@include e(header-row) {
|
|
122
|
+
background: var(--cp-table-header-bg);
|
|
123
|
+
position: relative;
|
|
124
|
+
border-top: 1px solid var(--cp-table-header-border-color);
|
|
125
|
+
|
|
126
|
+
// 赛博朋克扫描线纹理 - 使用多重背景实现,避免 ::before 破坏 tr 布局
|
|
127
|
+
background-image: repeating-linear-gradient(
|
|
128
|
+
0deg,
|
|
129
|
+
transparent,
|
|
130
|
+
transparent 2px,
|
|
131
|
+
rgba(255, 255, 255, 0.015) 2px,
|
|
132
|
+
rgba(255, 255, 255, 0.015) 4px
|
|
133
|
+
),
|
|
134
|
+
var(--cp-table-header-bg);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@include e(header-cell) {
|
|
138
|
+
padding: var(--cp-table-cell-padding);
|
|
139
|
+
height: var(--cp-table-header-height);
|
|
140
|
+
font-weight: 600;
|
|
141
|
+
text-align: left;
|
|
142
|
+
white-space: nowrap;
|
|
143
|
+
border-bottom: 1px solid var(--cp-table-header-border-color);
|
|
144
|
+
color: var(--cp-text-primary);
|
|
145
|
+
text-transform: uppercase;
|
|
146
|
+
font-size: 0.85em;
|
|
147
|
+
letter-spacing: 0.08em;
|
|
148
|
+
transition: color 0.2s ease, background 0.2s ease, text-shadow 0.2s ease;
|
|
149
|
+
user-select: none;
|
|
150
|
+
vertical-align: middle;
|
|
151
|
+
background: transparent; // 确保透过背景看背景图
|
|
152
|
+
position: relative;
|
|
153
|
+
z-index: 1;
|
|
154
|
+
|
|
155
|
+
// 排序激活状态 - 表头文字
|
|
156
|
+
&.is-ascending,
|
|
157
|
+
&.is-descending {
|
|
158
|
+
color: var(--cp-text-primary);
|
|
159
|
+
text-shadow: 0 0 8px var(--cp-table-color);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// 排序激活的 caret
|
|
163
|
+
&.is-ascending {
|
|
164
|
+
.cp-table__sort-caret.is-ascending {
|
|
165
|
+
opacity: 1;
|
|
166
|
+
color: var(--cp-table-color);
|
|
167
|
+
filter: drop-shadow(0 0 4px var(--cp-table-color));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&.is-descending {
|
|
172
|
+
.cp-table__sort-caret.is-descending {
|
|
173
|
+
opacity: 1;
|
|
174
|
+
color: var(--cp-table-color);
|
|
175
|
+
filter: drop-shadow(0 0 4px var(--cp-table-color));
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
179
|
@include when(sortable) {
|
|
180
180
|
cursor: pointer;
|
|
181
|
-
|
|
181
|
+
|
|
182
182
|
&:hover {
|
|
183
183
|
color: var(--cp-text-primary);
|
|
184
184
|
text-shadow: 0 0 12px var(--cp-table-color);
|
|
@@ -218,28 +218,28 @@ $table-sizes: (
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
|
|
222
|
-
@include e(header-label) {
|
|
223
|
-
display: inline-flex;
|
|
224
|
-
align-items: center;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// ===== 排序图标 =====
|
|
228
|
-
@include e(sort-icon) {
|
|
229
|
-
display: inline-flex;
|
|
230
|
-
flex-direction: column;
|
|
231
|
-
align-items: center;
|
|
232
|
-
margin-left: 4px;
|
|
233
|
-
vertical-align: middle;
|
|
234
|
-
gap: 2px;
|
|
235
|
-
}
|
|
236
|
-
|
|
221
|
+
|
|
222
|
+
@include e(header-label) {
|
|
223
|
+
display: inline-flex;
|
|
224
|
+
align-items: center;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// ===== 排序图标 =====
|
|
228
|
+
@include e(sort-icon) {
|
|
229
|
+
display: inline-flex;
|
|
230
|
+
flex-direction: column;
|
|
231
|
+
align-items: center;
|
|
232
|
+
margin-left: 4px;
|
|
233
|
+
vertical-align: middle;
|
|
234
|
+
gap: 2px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
237
|
@include e(sort-caret) {
|
|
238
238
|
opacity: 0.28;
|
|
239
239
|
transition: opacity 0.2s ease, color 0.2s ease, filter 0.2s ease;
|
|
240
|
-
display: block;
|
|
241
|
-
color: var(--cp-text-muted);
|
|
242
|
-
|
|
240
|
+
display: block;
|
|
241
|
+
color: var(--cp-text-muted);
|
|
242
|
+
|
|
243
243
|
&.is-active {
|
|
244
244
|
opacity: 1;
|
|
245
245
|
color: var(--cp-table-color);
|
|
@@ -303,47 +303,47 @@ $table-sizes: (
|
|
|
303
303
|
user-select: none;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
// ===== 表体 =====
|
|
310
|
-
@include e(body) {
|
|
311
|
-
// 可滚动时
|
|
312
|
-
.cp-table.is-scrollable & {
|
|
313
|
-
overflow-y: auto;
|
|
314
|
-
@include scrollbar('thin');
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
@include e(row) {
|
|
319
|
-
background: var(--cp-table-row-bg);
|
|
320
|
-
transition: background 0.2s ease;
|
|
321
|
-
border-bottom: 1px solid var(--cp-table-border);
|
|
322
|
-
|
|
323
|
-
&:hover {
|
|
324
|
-
background: var(--cp-table-row-hover-bg);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
&:last-child {
|
|
328
|
-
border-bottom: none;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
// 条纹
|
|
332
|
-
@include when(striped) {
|
|
333
|
-
background: var(--cp-table-row-stripe-bg);
|
|
334
|
-
|
|
335
|
-
&:hover {
|
|
336
|
-
background: var(--cp-table-row-hover-bg);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
// 当前行高亮
|
|
341
|
-
@include when(current) {
|
|
342
|
-
background: var(--cp-table-row-current-bg);
|
|
343
|
-
box-shadow: inset 2px 0 0 var(--cp-table-color);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
// 选中行
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
// ===== 表体 =====
|
|
310
|
+
@include e(body) {
|
|
311
|
+
// 可滚动时
|
|
312
|
+
.cp-table.is-scrollable & {
|
|
313
|
+
overflow-y: auto;
|
|
314
|
+
@include scrollbar('thin');
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
@include e(row) {
|
|
319
|
+
background: var(--cp-table-row-bg);
|
|
320
|
+
transition: background 0.2s ease;
|
|
321
|
+
border-bottom: 1px solid var(--cp-table-border);
|
|
322
|
+
|
|
323
|
+
&:hover {
|
|
324
|
+
background: var(--cp-table-row-hover-bg);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
&:last-child {
|
|
328
|
+
border-bottom: none;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// 条纹
|
|
332
|
+
@include when(striped) {
|
|
333
|
+
background: var(--cp-table-row-stripe-bg);
|
|
334
|
+
|
|
335
|
+
&:hover {
|
|
336
|
+
background: var(--cp-table-row-hover-bg);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// 当前行高亮
|
|
341
|
+
@include when(current) {
|
|
342
|
+
background: var(--cp-table-row-current-bg);
|
|
343
|
+
box-shadow: inset 2px 0 0 var(--cp-table-color);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// 选中行
|
|
347
347
|
@include when(selected) {
|
|
348
348
|
background: var(--cp-table-row-selected-bg);
|
|
349
349
|
}
|
|
@@ -367,255 +367,255 @@ $table-sizes: (
|
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
@include e(cell) {
|
|
370
|
-
padding: var(--cp-table-cell-padding);
|
|
371
|
-
vertical-align: middle;
|
|
372
|
-
border-bottom: 1px solid var(--cp-table-border);
|
|
373
|
-
transition: background 0.2s ease;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
// ===== 对齐 =====
|
|
377
|
-
@include m(align-center) {
|
|
378
|
-
text-align: center;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
@include m(align-right) {
|
|
382
|
-
text-align: right;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
// ===== 条纹 =====
|
|
386
|
-
@include when(stripe) {
|
|
387
|
-
// handled via row .is-striped class
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
// ===== 边框 =====
|
|
391
|
-
@include when(border) {
|
|
392
|
-
border: 1px solid var(--cp-table-border);
|
|
393
|
-
|
|
394
|
-
.cp-table__header-cell,
|
|
395
|
-
.cp-table__cell {
|
|
396
|
-
border-right: 1px solid var(--cp-table-border);
|
|
397
|
-
|
|
398
|
-
&:last-child {
|
|
399
|
-
border-right: none;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.cp-table__header-cell {
|
|
404
|
-
border-bottom: 1px solid var(--cp-table-border);
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
// ===== 空状态 =====
|
|
410
|
-
@include e(empty-row) {
|
|
411
|
-
&:hover {
|
|
412
|
-
background: transparent;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
@include e(empty-cell) {
|
|
417
|
-
padding: 40px 0;
|
|
418
|
-
text-align: center;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
@include e(empty) {
|
|
422
|
-
display: flex;
|
|
423
|
-
flex-direction: column;
|
|
424
|
-
align-items: center;
|
|
425
|
-
gap: 12px;
|
|
426
|
-
color: var(--cp-text-muted);
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
@include e(empty-icon) {
|
|
430
|
-
opacity: 0.3;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
@include e(empty-text) {
|
|
434
|
-
font-size: 13px;
|
|
435
|
-
letter-spacing: 0.05em;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
// ===== 高亮当前行 =====
|
|
439
|
-
@include when(highlight-current-row) {
|
|
440
|
-
.cp-table__row {
|
|
441
|
-
cursor: pointer;
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
// ===== 加载遮罩 (Loading Overlay) =====
|
|
446
|
-
@include e(loading-overlay) {
|
|
447
|
-
position: absolute;
|
|
448
|
-
inset: 0;
|
|
449
|
-
z-index: 12;
|
|
450
|
-
display: flex;
|
|
451
|
-
flex-direction: column;
|
|
452
|
-
align-items: center;
|
|
453
|
-
justify-content: center;
|
|
454
|
-
gap: var(--cp-spacing-sm);
|
|
455
|
-
background: var(--cp-table-loading-bg,
|
|
456
|
-
backdrop-filter: var(--cp-table-loading-backdrop, blur(4px));
|
|
457
|
-
pointer-events: auto;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
@include e(loading-text) {
|
|
461
|
-
font-size: var(--cp-font-size-sm);
|
|
462
|
-
color: var(--cp-table-loading-text-color, var(--cp-text-secondary));
|
|
463
|
-
letter-spacing: 0.05em;
|
|
464
|
-
user-select: none;
|
|
465
|
-
margin-top: var(--cp-spacing-xs);
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
// ===== 加载遮罩过渡动画 =====
|
|
469
|
-
.cp-table-loading-enter-active,
|
|
470
|
-
.cp-table-loading-leave-active {
|
|
471
|
-
transition: opacity 0.3s ease;
|
|
472
|
-
}
|
|
473
|
-
.cp-table-loading-enter-from,
|
|
474
|
-
.cp-table-loading-leave-to {
|
|
475
|
-
opacity: 0;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
// ===== 加载状态 (Loading) =====
|
|
479
|
-
@include when(loading) {
|
|
480
|
-
// loading 时仍可看到表格,但内容被遮罩阻挡
|
|
481
|
-
position: relative;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
// ===== 禁用状态 (Disabled) =====
|
|
485
|
-
@include when(disabled) {
|
|
486
|
-
pointer-events: none;
|
|
487
|
-
cursor: not-allowed;
|
|
488
|
-
user-select: none;
|
|
489
|
-
|
|
490
|
-
.cp-table__wrapper {
|
|
491
|
-
opacity: 0.5;
|
|
492
|
-
filter: grayscale(0.6);
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
// 禁止所有 hover 视觉反馈
|
|
496
|
-
.cp-table__row {
|
|
497
|
-
&:hover {
|
|
498
|
-
background: var(--cp-table-row-bg);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
// 加载遮罩也必须禁止 pointer-events
|
|
503
|
-
.cp-table__loading-overlay {
|
|
504
|
-
pointer-events: none !important;
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
// ===== 树形表格 (Tree) =====
|
|
509
|
-
|
|
510
|
-
@include e(tree-cell) {
|
|
511
|
-
display: flex;
|
|
512
|
-
align-items: center;
|
|
513
|
-
width: 100%;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
@include e(tree-indent) {
|
|
517
|
-
display: inline-block;
|
|
518
|
-
flex-shrink: 0;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
@include e(expand-icon) {
|
|
522
|
-
display: inline-flex;
|
|
523
|
-
align-items: center;
|
|
524
|
-
justify-content: center;
|
|
525
|
-
width: 16px;
|
|
526
|
-
height: 16px;
|
|
527
|
-
flex-shrink: 0;
|
|
528
|
-
margin-right: 4px;
|
|
529
|
-
cursor: pointer;
|
|
530
|
-
color: var(--cp-text-muted);
|
|
531
|
-
transition: transform 0.25s ease, color 0.2s ease;
|
|
532
|
-
transform: rotate(0deg);
|
|
533
|
-
|
|
534
|
-
&:hover {
|
|
535
|
-
color: var(--cp-table-color, var(--cp-text-primary));
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
@include when(expanded) {
|
|
539
|
-
transform: rotate(90deg);
|
|
540
|
-
color: var(--cp-table-color, var(--cp-text-secondary));
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
svg {
|
|
544
|
-
display: block;
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
@include e(expand-placeholder) {
|
|
549
|
-
display: inline-block;
|
|
550
|
-
width: 16px;
|
|
551
|
-
height: 16px;
|
|
552
|
-
flex-shrink: 0;
|
|
553
|
-
margin-right: 4px;
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
@include e(tree-content) {
|
|
557
|
-
flex: 1;
|
|
558
|
-
min-width: 0;
|
|
559
|
-
overflow: hidden;
|
|
560
|
-
text-overflow: ellipsis;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
// ===== 行展开(expand 列) =====
|
|
564
|
-
|
|
565
|
-
@include e(expand-trigger) {
|
|
566
|
-
display: inline-flex;
|
|
567
|
-
align-items: center;
|
|
568
|
-
justify-content: center;
|
|
569
|
-
width: 16px;
|
|
570
|
-
height: 16px;
|
|
571
|
-
cursor: pointer;
|
|
572
|
-
color: var(--cp-text-muted);
|
|
573
|
-
transition: transform 0.25s ease, color 0.2s ease;
|
|
574
|
-
transform: rotate(0deg);
|
|
575
|
-
|
|
576
|
-
&:hover {
|
|
577
|
-
color: var(--cp-table-color, var(--cp-text-primary));
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
@include when(expanded) {
|
|
581
|
-
transform: rotate(90deg);
|
|
582
|
-
color: var(--cp-table-color, var(--cp-text-secondary));
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
svg {
|
|
586
|
-
display: block;
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
@include e(expanded-row) {
|
|
591
|
-
background: color-mix(in srgb, var(--cp-table-color) 4%, transparent);
|
|
592
|
-
border-bottom: 1px solid var(--cp-table-border);
|
|
593
|
-
|
|
594
|
-
&:hover {
|
|
595
|
-
background: color-mix(in srgb, var(--cp-table-color) 6%, transparent);
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
@include e(expanded-cell) {
|
|
600
|
-
padding: 0 !important;
|
|
601
|
-
position: relative;
|
|
602
|
-
|
|
603
|
-
// 左侧发光边线
|
|
604
|
-
&::before {
|
|
605
|
-
content: '';
|
|
606
|
-
position: absolute;
|
|
607
|
-
left: 0;
|
|
608
|
-
top: 0;
|
|
609
|
-
bottom: 0;
|
|
610
|
-
width: 2px;
|
|
611
|
-
background: var(--cp-table-color);
|
|
612
|
-
box-shadow: 0 0 6px var(--cp-table-color);
|
|
613
|
-
opacity: 0.6;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
@include e(expanded-content) {
|
|
618
|
-
padding: var(--cp-table-cell-padding);
|
|
619
|
-
padding-left: 24px;
|
|
620
|
-
}
|
|
621
|
-
}
|
|
370
|
+
padding: var(--cp-table-cell-padding);
|
|
371
|
+
vertical-align: middle;
|
|
372
|
+
border-bottom: 1px solid var(--cp-table-border);
|
|
373
|
+
transition: background 0.2s ease;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// ===== 对齐 =====
|
|
377
|
+
@include m(align-center) {
|
|
378
|
+
text-align: center;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
@include m(align-right) {
|
|
382
|
+
text-align: right;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// ===== 条纹 =====
|
|
386
|
+
@include when(stripe) {
|
|
387
|
+
// handled via row .is-striped class
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// ===== 边框 =====
|
|
391
|
+
@include when(border) {
|
|
392
|
+
border: 1px solid var(--cp-table-border);
|
|
393
|
+
|
|
394
|
+
.cp-table__header-cell,
|
|
395
|
+
.cp-table__cell {
|
|
396
|
+
border-right: 1px solid var(--cp-table-border);
|
|
397
|
+
|
|
398
|
+
&:last-child {
|
|
399
|
+
border-right: none;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.cp-table__header-cell {
|
|
404
|
+
border-bottom: 1px solid var(--cp-table-border);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
// ===== 空状态 =====
|
|
410
|
+
@include e(empty-row) {
|
|
411
|
+
&:hover {
|
|
412
|
+
background: transparent;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
@include e(empty-cell) {
|
|
417
|
+
padding: 40px 0;
|
|
418
|
+
text-align: center;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
@include e(empty) {
|
|
422
|
+
display: flex;
|
|
423
|
+
flex-direction: column;
|
|
424
|
+
align-items: center;
|
|
425
|
+
gap: 12px;
|
|
426
|
+
color: var(--cp-text-muted);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
@include e(empty-icon) {
|
|
430
|
+
opacity: 0.3;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
@include e(empty-text) {
|
|
434
|
+
font-size: 13px;
|
|
435
|
+
letter-spacing: 0.05em;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
// ===== 高亮当前行 =====
|
|
439
|
+
@include when(highlight-current-row) {
|
|
440
|
+
.cp-table__row {
|
|
441
|
+
cursor: pointer;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// ===== 加载遮罩 (Loading Overlay) =====
|
|
446
|
+
@include e(loading-overlay) {
|
|
447
|
+
position: absolute;
|
|
448
|
+
inset: 0;
|
|
449
|
+
z-index: 12;
|
|
450
|
+
display: flex;
|
|
451
|
+
flex-direction: column;
|
|
452
|
+
align-items: center;
|
|
453
|
+
justify-content: center;
|
|
454
|
+
gap: var(--cp-spacing-sm);
|
|
455
|
+
background: var(--cp-table-loading-bg, color-mix(in srgb, var(--cp-bg-elevated) 86%, transparent));
|
|
456
|
+
backdrop-filter: var(--cp-table-loading-backdrop, blur(4px));
|
|
457
|
+
pointer-events: auto;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
@include e(loading-text) {
|
|
461
|
+
font-size: var(--cp-font-size-sm);
|
|
462
|
+
color: var(--cp-table-loading-text-color, var(--cp-text-secondary));
|
|
463
|
+
letter-spacing: 0.05em;
|
|
464
|
+
user-select: none;
|
|
465
|
+
margin-top: var(--cp-spacing-xs);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
// ===== 加载遮罩过渡动画 =====
|
|
469
|
+
.cp-table-loading-enter-active,
|
|
470
|
+
.cp-table-loading-leave-active {
|
|
471
|
+
transition: opacity 0.3s ease;
|
|
472
|
+
}
|
|
473
|
+
.cp-table-loading-enter-from,
|
|
474
|
+
.cp-table-loading-leave-to {
|
|
475
|
+
opacity: 0;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// ===== 加载状态 (Loading) =====
|
|
479
|
+
@include when(loading) {
|
|
480
|
+
// loading 时仍可看到表格,但内容被遮罩阻挡
|
|
481
|
+
position: relative;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
// ===== 禁用状态 (Disabled) =====
|
|
485
|
+
@include when(disabled) {
|
|
486
|
+
pointer-events: none;
|
|
487
|
+
cursor: not-allowed;
|
|
488
|
+
user-select: none;
|
|
489
|
+
|
|
490
|
+
.cp-table__wrapper {
|
|
491
|
+
opacity: 0.5;
|
|
492
|
+
filter: grayscale(0.6);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
// 禁止所有 hover 视觉反馈
|
|
496
|
+
.cp-table__row {
|
|
497
|
+
&:hover {
|
|
498
|
+
background: var(--cp-table-row-bg);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
// 加载遮罩也必须禁止 pointer-events
|
|
503
|
+
.cp-table__loading-overlay {
|
|
504
|
+
pointer-events: none !important;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// ===== 树形表格 (Tree) =====
|
|
509
|
+
|
|
510
|
+
@include e(tree-cell) {
|
|
511
|
+
display: flex;
|
|
512
|
+
align-items: center;
|
|
513
|
+
width: 100%;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
@include e(tree-indent) {
|
|
517
|
+
display: inline-block;
|
|
518
|
+
flex-shrink: 0;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
@include e(expand-icon) {
|
|
522
|
+
display: inline-flex;
|
|
523
|
+
align-items: center;
|
|
524
|
+
justify-content: center;
|
|
525
|
+
width: 16px;
|
|
526
|
+
height: 16px;
|
|
527
|
+
flex-shrink: 0;
|
|
528
|
+
margin-right: 4px;
|
|
529
|
+
cursor: pointer;
|
|
530
|
+
color: var(--cp-text-muted);
|
|
531
|
+
transition: transform 0.25s ease, color 0.2s ease;
|
|
532
|
+
transform: rotate(0deg);
|
|
533
|
+
|
|
534
|
+
&:hover {
|
|
535
|
+
color: var(--cp-table-color, var(--cp-text-primary));
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
@include when(expanded) {
|
|
539
|
+
transform: rotate(90deg);
|
|
540
|
+
color: var(--cp-table-color, var(--cp-text-secondary));
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
svg {
|
|
544
|
+
display: block;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
@include e(expand-placeholder) {
|
|
549
|
+
display: inline-block;
|
|
550
|
+
width: 16px;
|
|
551
|
+
height: 16px;
|
|
552
|
+
flex-shrink: 0;
|
|
553
|
+
margin-right: 4px;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
@include e(tree-content) {
|
|
557
|
+
flex: 1;
|
|
558
|
+
min-width: 0;
|
|
559
|
+
overflow: hidden;
|
|
560
|
+
text-overflow: ellipsis;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
// ===== 行展开(expand 列) =====
|
|
564
|
+
|
|
565
|
+
@include e(expand-trigger) {
|
|
566
|
+
display: inline-flex;
|
|
567
|
+
align-items: center;
|
|
568
|
+
justify-content: center;
|
|
569
|
+
width: 16px;
|
|
570
|
+
height: 16px;
|
|
571
|
+
cursor: pointer;
|
|
572
|
+
color: var(--cp-text-muted);
|
|
573
|
+
transition: transform 0.25s ease, color 0.2s ease;
|
|
574
|
+
transform: rotate(0deg);
|
|
575
|
+
|
|
576
|
+
&:hover {
|
|
577
|
+
color: var(--cp-table-color, var(--cp-text-primary));
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
@include when(expanded) {
|
|
581
|
+
transform: rotate(90deg);
|
|
582
|
+
color: var(--cp-table-color, var(--cp-text-secondary));
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
svg {
|
|
586
|
+
display: block;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
@include e(expanded-row) {
|
|
591
|
+
background: color-mix(in srgb, var(--cp-table-color) 4%, transparent);
|
|
592
|
+
border-bottom: 1px solid var(--cp-table-border);
|
|
593
|
+
|
|
594
|
+
&:hover {
|
|
595
|
+
background: color-mix(in srgb, var(--cp-table-color) 6%, transparent);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
@include e(expanded-cell) {
|
|
600
|
+
padding: 0 !important;
|
|
601
|
+
position: relative;
|
|
602
|
+
|
|
603
|
+
// 左侧发光边线
|
|
604
|
+
&::before {
|
|
605
|
+
content: '';
|
|
606
|
+
position: absolute;
|
|
607
|
+
left: 0;
|
|
608
|
+
top: 0;
|
|
609
|
+
bottom: 0;
|
|
610
|
+
width: 2px;
|
|
611
|
+
background: var(--cp-table-color);
|
|
612
|
+
box-shadow: 0 0 6px var(--cp-table-color);
|
|
613
|
+
opacity: 0.6;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
@include e(expanded-content) {
|
|
618
|
+
padding: var(--cp-table-cell-padding);
|
|
619
|
+
padding-left: 24px;
|
|
620
|
+
}
|
|
621
|
+
}
|