@robot-admin/layout 2.0.2 → 2.2.0

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.
@@ -1,385 +1,385 @@
1
- /**
2
- * SettingsDrawer 组件样式
3
- */
4
-
5
- // Tab 样式
6
- .settings-tabs {
7
- :deep(.n-tabs-nav) {
8
- padding: 0 4px;
9
- }
10
- }
11
-
12
- // 章节样式
13
- .settings-section {
14
- margin-bottom: 24px;
15
- padding-bottom: 20px;
16
- border-bottom: 1px solid var(--n-border-color);
17
-
18
- &:last-child {
19
- border-bottom: none;
20
- }
21
- }
22
-
23
- .section-title {
24
- display: flex;
25
- justify-content: space-between;
26
- align-items: center;
27
- font-size: 14px;
28
- font-weight: 600;
29
- margin-bottom: 8px;
30
- color: var(--n-text-color);
31
- }
32
-
33
- // 预设方案网格
34
- .preset-grid {
35
- display: grid;
36
- grid-template-columns: repeat(3, 1fr);
37
- gap: 16px;
38
- margin-top: 12px;
39
- }
40
-
41
- .preset-card {
42
- position: relative;
43
- padding: 18px 14px;
44
- border-radius: 12px;
45
- border: 2px solid var(--n-border-color);
46
- background: var(--n-color);
47
- cursor: pointer;
48
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
49
- text-align: center;
50
- overflow: hidden;
51
-
52
- &::before {
53
- content: '';
54
- position: absolute;
55
- top: 0;
56
- left: 0;
57
- right: 0;
58
- height: 3px;
59
- background: linear-gradient(90deg, var(--n-color-target), var(--n-color-target));
60
- opacity: 0;
61
- transition: opacity 0.3s ease;
62
- border-radius: 3px 3px 0 0;
63
- }
64
-
65
- &:hover {
66
- border-color: var(--n-color-target);
67
- transform: translateY(-4px);
68
- box-shadow: 0 8px 16px var(--primary-color-shadow, rgba(32, 128, 240, 0.12));
69
-
70
- &::before {
71
- opacity: 1;
72
- }
73
-
74
- .preset-icon {
75
- transform: scale(1.1);
76
- }
77
-
78
- .preset-name {
79
- color: var(--n-color-target);
80
- }
81
- }
82
-
83
- &.active {
84
- border-color: var(--n-color-target);
85
- background: var(--n-color-target-light);
86
- box-shadow: 0 8px 20px var(--primary-color-shadow, rgba(32, 128, 240, 0.2));
87
-
88
- &::before {
89
- opacity: 1;
90
- }
91
-
92
- .preset-name {
93
- color: var(--n-color-target);
94
- font-weight: 600;
95
- }
96
- }
97
- }
98
-
99
- .preset-icon {
100
- font-size: 36px;
101
- margin-bottom: 10px;
102
- transition: all 0.3s ease;
103
- }
104
-
105
- .preset-name {
106
- font-size: 14px;
107
- font-weight: 500;
108
- margin-bottom: 8px;
109
- color: var(--n-text-color);
110
- transition: all 0.3s ease;
111
- }
112
-
113
- .preset-color {
114
- display: flex;
115
- justify-content: center;
116
- }
117
-
118
- .color-dot {
119
- width: 24px;
120
- height: 24px;
121
- border-radius: 50%;
122
- border: 2px solid #fff;
123
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
124
- transition: all 0.3s ease;
125
-
126
- &:hover {
127
- transform: scale(1.1);
128
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
129
- }
130
- }
131
-
132
- // 主题模式
133
- .mode-group {
134
- width: 100%;
135
-
136
- :deep(.n-radio-button) {
137
- flex: 1;
138
- }
139
- }
140
-
141
- // 颜色选择器
142
- .color-picker-wrapper {
143
- display: flex;
144
- align-items: center;
145
- gap: 12px;
146
- }
147
-
148
- .color-value {
149
- width: 80px;
150
- font-size: 13px;
151
- font-family: 'Courier New', monospace;
152
- color: var(--n-text-color-2);
153
- }
154
-
155
- // 圆角/动画选择
156
- .radius-group,
157
- .transition-group {
158
- width: 100%;
159
-
160
- :deep(.n-radio-button) {
161
- flex: 1;
162
- }
163
- }
164
-
165
- // 布局模式网格
166
- .layout-grid {
167
- display: grid;
168
- grid-template-columns: repeat(3, 1fr);
169
- gap: 16px;
170
- }
171
-
172
- .layout-item {
173
- position: relative;
174
- display: flex;
175
- flex-direction: column;
176
- align-items: center;
177
- gap: 10px;
178
- padding: 16px 12px;
179
- border-radius: 12px;
180
- border: 2px solid var(--n-border-color);
181
- background: var(--n-color);
182
- cursor: pointer;
183
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
184
- overflow: hidden;
185
-
186
- &::before {
187
- content: '';
188
- position: absolute;
189
- top: 0;
190
- left: 0;
191
- right: 0;
192
- height: 3px;
193
- background: linear-gradient(90deg, var(--n-color-target), var(--n-color-target));
194
- opacity: 0;
195
- transition: opacity 0.3s ease;
196
- border-radius: 3px 3px 0 0;
197
- }
198
-
199
- &:hover:not(.disabled) {
200
- border-color: var(--n-color-target);
201
- box-shadow: 0 8px 16px var(--primary-color-shadow, rgba(32, 128, 240, 0.12));
202
- transform: translateY(-4px);
203
-
204
- &::before {
205
- opacity: 1;
206
- }
207
-
208
- .layout-svg {
209
- transform: scale(1.05);
210
- color: var(--n-color-target);
211
- }
212
-
213
- .layout-label {
214
- color: var(--n-color-target);
215
- }
216
- }
217
-
218
- &.active {
219
- border-color: var(--n-color-target);
220
- background: var(--n-color-target-light);
221
- box-shadow: 0 8px 20px var(--primary-color-shadow, rgba(32, 128, 240, 0.2));
222
-
223
- &::before {
224
- opacity: 1;
225
- }
226
-
227
- // 选中状态:图标和文字都变主题色
228
- .layout-svg {
229
- color: var(--primary-color, #409eff) !important;
230
- }
231
-
232
- .layout-label {
233
- color: var(--primary-color, #409eff) !important;
234
- font-weight: 600;
235
- }
236
- }
237
-
238
- &.disabled {
239
- cursor: not-allowed;
240
- opacity: 0.5;
241
- filter: grayscale(0.8);
242
-
243
- &:hover {
244
- transform: none;
245
- box-shadow: none;
246
- border-color: var(--n-border-color);
247
-
248
- &::before {
249
- opacity: 0;
250
- }
251
- }
252
- }
253
- }
254
-
255
- .layout-screenshot {
256
- width: 100%;
257
- height: 56px;
258
- display: flex;
259
- align-items: center;
260
- justify-content: center;
261
- background: var(--n-color-modal);
262
- border-radius: 8px;
263
- padding: 8px;
264
- transition: all 0.3s ease;
265
- }
266
-
267
- .layout-svg {
268
- width: 64px;
269
- height: 48px;
270
- color: #999; // 默认:灰色
271
- transition: all 0.3s ease;
272
-
273
- // SVG rect 强制继承 color
274
- :deep(rect) {
275
- fill: currentColor !important;
276
- }
277
- }
278
- .layout-label {
279
- font-size: 13px;
280
- color: var(--n-text-color);
281
- font-weight: 500;
282
- text-align: center;
283
- transition: all 0.3s ease;
284
- display: flex;
285
- flex-direction: column;
286
- align-items: center;
287
- gap: 6px;
288
- line-height: 1.4;
289
- }
290
-
291
- .badge-soon {
292
- font-size: 10px;
293
- padding: 1px 5px;
294
- border-radius: 3px;
295
- background: linear-gradient(135deg, #faad14 0%, #fa8c16 100%);
296
- color: #fff;
297
- font-weight: 600;
298
- white-space: nowrap;
299
- box-shadow: 0 1px 3px rgba(250, 173, 20, 0.3);
300
- }
301
-
302
- // 设置项
303
- .setting-item {
304
- display: flex;
305
- justify-content: space-between;
306
- align-items: center;
307
- padding: 10px 0;
308
- font-size: 13px;
309
- color: var(--n-text-color);
310
- }
311
-
312
- // 滑块
313
- .slider-item {
314
- margin-bottom: 20px;
315
- }
316
-
317
- .slider-label {
318
- display: flex;
319
- justify-content: space-between;
320
- margin-bottom: 8px;
321
- font-size: 13px;
322
- color: var(--n-text-color);
323
- }
324
-
325
- .slider-value {
326
- font-weight: 600;
327
- color: var(--n-color-target);
328
- }
329
-
330
- // 操作按钮网格布局
331
- .action-buttons-grid {
332
- display: grid;
333
- grid-template-columns: repeat(2, 1fr);
334
- gap: 10px;
335
- }
336
-
337
- // 设置项标签
338
- .setting-label {
339
- display: flex;
340
- flex-direction: column;
341
- gap: 4px;
342
-
343
- .setting-desc {
344
- font-size: 12px;
345
- color: var(--n-text-color-2);
346
- opacity: 0.8;
347
- }
348
- }
349
-
350
- // 系统信息
351
- .system-info {
352
- display: flex;
353
- flex-direction: column;
354
- gap: 12px;
355
- margin-top: 12px;
356
- }
357
-
358
- .info-item {
359
- display: flex;
360
- justify-content: space-between;
361
- align-items: center;
362
- padding: 10px 12px;
363
- background: var(--n-color);
364
- border-radius: 8px;
365
- border: 1px solid var(--n-border-color);
366
- transition: all 0.2s ease;
367
-
368
- &:hover {
369
- border-color: var(--n-color-target);
370
- background: var(--n-color-target-light);
371
- }
372
- }
373
-
374
- .info-label {
375
- font-size: 13px;
376
- color: var(--n-text-color-2);
377
- font-weight: 500;
378
- }
379
-
380
- .info-value {
381
- font-size: 13px;
382
- color: var(--n-text-color);
383
- font-weight: 600;
384
- font-family: 'Consolas', 'Monaco', monospace;
385
- }
1
+ /**
2
+ * SettingsDrawer 组件样式
3
+ */
4
+
5
+ // Tab 样式
6
+ .settings-tabs {
7
+ :deep(.n-tabs-nav) {
8
+ padding: 0 4px;
9
+ }
10
+ }
11
+
12
+ // 章节样式
13
+ .settings-section {
14
+ margin-bottom: 24px;
15
+ padding-bottom: 20px;
16
+ border-bottom: 1px solid var(--n-border-color);
17
+
18
+ &:last-child {
19
+ border-bottom: none;
20
+ }
21
+ }
22
+
23
+ .section-title {
24
+ display: flex;
25
+ justify-content: space-between;
26
+ align-items: center;
27
+ font-size: 14px;
28
+ font-weight: 600;
29
+ margin-bottom: 8px;
30
+ color: var(--n-text-color);
31
+ }
32
+
33
+ // 预设方案网格
34
+ .preset-grid {
35
+ display: grid;
36
+ grid-template-columns: repeat(3, 1fr);
37
+ gap: 16px;
38
+ margin-top: 12px;
39
+ }
40
+
41
+ .preset-card {
42
+ position: relative;
43
+ padding: 18px 14px;
44
+ border-radius: 12px;
45
+ border: 2px solid var(--n-border-color);
46
+ background: var(--n-color);
47
+ cursor: pointer;
48
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
49
+ text-align: center;
50
+ overflow: hidden;
51
+
52
+ &::before {
53
+ content: '';
54
+ position: absolute;
55
+ top: 0;
56
+ left: 0;
57
+ right: 0;
58
+ height: 3px;
59
+ background: linear-gradient(90deg, var(--n-color-target), var(--n-color-target));
60
+ opacity: 0;
61
+ transition: opacity 0.3s ease;
62
+ border-radius: 3px 3px 0 0;
63
+ }
64
+
65
+ &:hover {
66
+ border-color: var(--n-color-target);
67
+ transform: translateY(-4px);
68
+ box-shadow: 0 8px 16px var(--primary-color-shadow, rgba(32, 128, 240, 0.12));
69
+
70
+ &::before {
71
+ opacity: 1;
72
+ }
73
+
74
+ .preset-icon {
75
+ transform: scale(1.1);
76
+ }
77
+
78
+ .preset-name {
79
+ color: var(--n-color-target);
80
+ }
81
+ }
82
+
83
+ &.active {
84
+ border-color: var(--n-color-target);
85
+ background: var(--n-color-target-light);
86
+ box-shadow: 0 8px 20px var(--primary-color-shadow, rgba(32, 128, 240, 0.2));
87
+
88
+ &::before {
89
+ opacity: 1;
90
+ }
91
+
92
+ .preset-name {
93
+ color: var(--n-color-target);
94
+ font-weight: 600;
95
+ }
96
+ }
97
+ }
98
+
99
+ .preset-icon {
100
+ font-size: 36px;
101
+ margin-bottom: 10px;
102
+ transition: all 0.3s ease;
103
+ }
104
+
105
+ .preset-name {
106
+ font-size: 14px;
107
+ font-weight: 500;
108
+ margin-bottom: 8px;
109
+ color: var(--n-text-color);
110
+ transition: all 0.3s ease;
111
+ }
112
+
113
+ .preset-color {
114
+ display: flex;
115
+ justify-content: center;
116
+ }
117
+
118
+ .color-dot {
119
+ width: 24px;
120
+ height: 24px;
121
+ border-radius: 50%;
122
+ border: 2px solid #fff;
123
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
124
+ transition: all 0.3s ease;
125
+
126
+ &:hover {
127
+ transform: scale(1.1);
128
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
129
+ }
130
+ }
131
+
132
+ // 主题模式
133
+ .mode-group {
134
+ width: 100%;
135
+
136
+ :deep(.n-radio-button) {
137
+ flex: 1;
138
+ }
139
+ }
140
+
141
+ // 颜色选择器
142
+ .color-picker-wrapper {
143
+ display: flex;
144
+ align-items: center;
145
+ gap: 12px;
146
+ }
147
+
148
+ .color-value {
149
+ width: 80px;
150
+ font-size: 13px;
151
+ font-family: 'Courier New', monospace;
152
+ color: var(--n-text-color-2);
153
+ }
154
+
155
+ // 圆角/动画选择
156
+ .radius-group,
157
+ .transition-group {
158
+ width: 100%;
159
+
160
+ :deep(.n-radio-button) {
161
+ flex: 1;
162
+ }
163
+ }
164
+
165
+ // 布局模式网格
166
+ .layout-grid {
167
+ display: grid;
168
+ grid-template-columns: repeat(3, 1fr);
169
+ gap: 16px;
170
+ }
171
+
172
+ .layout-item {
173
+ position: relative;
174
+ display: flex;
175
+ flex-direction: column;
176
+ align-items: center;
177
+ gap: 10px;
178
+ padding: 16px 12px;
179
+ border-radius: 12px;
180
+ border: 2px solid var(--n-border-color);
181
+ background: var(--n-color);
182
+ cursor: pointer;
183
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
184
+ overflow: hidden;
185
+
186
+ &::before {
187
+ content: '';
188
+ position: absolute;
189
+ top: 0;
190
+ left: 0;
191
+ right: 0;
192
+ height: 3px;
193
+ background: linear-gradient(90deg, var(--n-color-target), var(--n-color-target));
194
+ opacity: 0;
195
+ transition: opacity 0.3s ease;
196
+ border-radius: 3px 3px 0 0;
197
+ }
198
+
199
+ &:hover:not(.disabled) {
200
+ border-color: var(--n-color-target);
201
+ box-shadow: 0 8px 16px var(--primary-color-shadow, rgba(32, 128, 240, 0.12));
202
+ transform: translateY(-4px);
203
+
204
+ &::before {
205
+ opacity: 1;
206
+ }
207
+
208
+ .layout-svg {
209
+ transform: scale(1.05);
210
+ color: var(--n-color-target);
211
+ }
212
+
213
+ .layout-label {
214
+ color: var(--n-color-target);
215
+ }
216
+ }
217
+
218
+ &.active {
219
+ border-color: var(--n-color-target);
220
+ background: var(--n-color-target-light);
221
+ box-shadow: 0 8px 20px var(--primary-color-shadow, rgba(32, 128, 240, 0.2));
222
+
223
+ &::before {
224
+ opacity: 1;
225
+ }
226
+
227
+ // 选中状态:图标和文字都变主题色
228
+ .layout-svg {
229
+ color: var(--primary-color, #409eff) !important;
230
+ }
231
+
232
+ .layout-label {
233
+ color: var(--primary-color, #409eff) !important;
234
+ font-weight: 600;
235
+ }
236
+ }
237
+
238
+ &.disabled {
239
+ cursor: not-allowed;
240
+ opacity: 0.5;
241
+ filter: grayscale(0.8);
242
+
243
+ &:hover {
244
+ transform: none;
245
+ box-shadow: none;
246
+ border-color: var(--n-border-color);
247
+
248
+ &::before {
249
+ opacity: 0;
250
+ }
251
+ }
252
+ }
253
+ }
254
+
255
+ .layout-screenshot {
256
+ width: 100%;
257
+ height: 56px;
258
+ display: flex;
259
+ align-items: center;
260
+ justify-content: center;
261
+ background: var(--n-color-modal);
262
+ border-radius: 8px;
263
+ padding: 8px;
264
+ transition: all 0.3s ease;
265
+ }
266
+
267
+ .layout-svg {
268
+ width: 64px;
269
+ height: 48px;
270
+ color: #999; // 默认:灰色
271
+ transition: all 0.3s ease;
272
+
273
+ // SVG rect 强制继承 color
274
+ :deep(rect) {
275
+ fill: currentColor !important;
276
+ }
277
+ }
278
+ .layout-label {
279
+ font-size: 13px;
280
+ color: var(--n-text-color);
281
+ font-weight: 500;
282
+ text-align: center;
283
+ transition: all 0.3s ease;
284
+ display: flex;
285
+ flex-direction: column;
286
+ align-items: center;
287
+ gap: 6px;
288
+ line-height: 1.4;
289
+ }
290
+
291
+ .badge-soon {
292
+ font-size: 10px;
293
+ padding: 1px 5px;
294
+ border-radius: 3px;
295
+ background: linear-gradient(135deg, #faad14 0%, #fa8c16 100%);
296
+ color: #fff;
297
+ font-weight: 600;
298
+ white-space: nowrap;
299
+ box-shadow: 0 1px 3px rgba(250, 173, 20, 0.3);
300
+ }
301
+
302
+ // 设置项
303
+ .setting-item {
304
+ display: flex;
305
+ justify-content: space-between;
306
+ align-items: center;
307
+ padding: 10px 0;
308
+ font-size: 13px;
309
+ color: var(--n-text-color);
310
+ }
311
+
312
+ // 滑块
313
+ .slider-item {
314
+ margin-bottom: 20px;
315
+ }
316
+
317
+ .slider-label {
318
+ display: flex;
319
+ justify-content: space-between;
320
+ margin-bottom: 8px;
321
+ font-size: 13px;
322
+ color: var(--n-text-color);
323
+ }
324
+
325
+ .slider-value {
326
+ font-weight: 600;
327
+ color: var(--n-color-target);
328
+ }
329
+
330
+ // 操作按钮网格布局
331
+ .action-buttons-grid {
332
+ display: grid;
333
+ grid-template-columns: repeat(2, 1fr);
334
+ gap: 10px;
335
+ }
336
+
337
+ // 设置项标签
338
+ .setting-label {
339
+ display: flex;
340
+ flex-direction: column;
341
+ gap: 4px;
342
+
343
+ .setting-desc {
344
+ font-size: 12px;
345
+ color: var(--n-text-color-2);
346
+ opacity: 0.8;
347
+ }
348
+ }
349
+
350
+ // 系统信息
351
+ .system-info {
352
+ display: flex;
353
+ flex-direction: column;
354
+ gap: 12px;
355
+ margin-top: 12px;
356
+ }
357
+
358
+ .info-item {
359
+ display: flex;
360
+ justify-content: space-between;
361
+ align-items: center;
362
+ padding: 10px 12px;
363
+ background: var(--n-color);
364
+ border-radius: 8px;
365
+ border: 1px solid var(--n-border-color);
366
+ transition: all 0.2s ease;
367
+
368
+ &:hover {
369
+ border-color: var(--n-color-target);
370
+ background: var(--n-color-target-light);
371
+ }
372
+ }
373
+
374
+ .info-label {
375
+ font-size: 13px;
376
+ color: var(--n-text-color-2);
377
+ font-weight: 500;
378
+ }
379
+
380
+ .info-value {
381
+ font-size: 13px;
382
+ color: var(--n-text-color);
383
+ font-weight: 600;
384
+ font-family: 'Consolas', 'Monaco', monospace;
385
+ }