修复了一些问题

This commit is contained in:
kate522 committed 2026-08-25 17:15:28 +08:00
1 parent 59a393bf27
commit 8eb0079bc4
2 files changed
+16 -7

No files matched your search

+14 -6
View File
@@ -79,15 +79,23 @@
flex: 0 0 44px; flex: 0 0 44px;
} }
.uc-notification-switch input { .uc-notification-switch input[type='checkbox'] {
position: absolute; position: absolute;
width: 1px; inset: 0;
height: 1px; z-index: 1;
opacity: 0; width: 100%;
min-width: 0;
height: 100%;
margin: 0;
border: 0;
background: transparent;
box-shadow: none;
opacity: 0 !important;
cursor: pointer;
} }
.uc-notification-switch input::before, .uc-notification-switch input[type='checkbox']::before,
.uc-notification-switch input::after { .uc-notification-switch input[type='checkbox']::after {
display: none !important; display: none !important;
content: none !important; content: none !important;
} }
@@ -50,7 +50,8 @@ test('notification preference UI uses the global toast lifecycle', () => {
assert.ok(template.includes(text)); assert.ok(template.includes(text));
} }
assert.match(template, /role="switch"/); assert.match(template, /role="switch"/);
assert.match(styles, /\.uc-notification-switch input::before,[\s\S]*?\.uc-notification-switch input::after[\s\S]*?content: none !important/); assert.match(styles, /\.uc-notification-switch input\[type='checkbox'\][\s\S]*?opacity: 0 !important/);
assert.match(styles, /\.uc-notification-switch input\[type='checkbox'\]::before,[\s\S]*?\.uc-notification-switch input\[type='checkbox'\]::after[\s\S]*?content: none !important/);
assert.match(script, /aksrt-notification-preferences-toast/); assert.match(script, /aksrt-notification-preferences-toast/);
assert.match(script, /notyf\([^;]+?'load'[^;]+?toastId/); assert.match(script, /notyf\([^;]+?'load'[^;]+?toastId/);
assert.match(script, /notyf\([^;]+?'success'[^;]+?toastId/); assert.match(script, /notyf\([^;]+?'success'[^;]+?toastId/);