ab4f40ba5d
- 克隆 art-design-pro v3.0.2(GitHub depth1),rm .git,pnpm clean:dev 精简演示页(92 文件) - .env.development/.env.production 均设 VITE_API_URL=/api,代理目标 127.0.0.1:8000(移除 Apifox Mock) - http 封装信封适配:code===200 解包 data;msg/message 字段兼容(拦截器/error/类型) - /api/admin/auth/token 登录适配(access->Bearer token, refresh->refreshToken);/api/admin/auth/me 映射 UserInfo(userName/roles/is_admin) - 登录页演示账号替换为真实 admin;logOut 按路由名判登录页修复 redirect 嵌套 - 根 .gitignore 补 !admin/.env(模板公共 env 非密钥,需入库) - 验证:Playwright 全链路(错误密码 401 留登页/正确登录进工作台/登出/受保护路由重定向/redirect 回跳)+ pnpm build(vue-tsc 通过,产物无 mock 域名) Co-Authored-By: Claude Code <noreply@anthropic.com>
64 lines
1.1 KiB
SCSS
64 lines
1.1 KiB
SCSS
// 定义基础变量
|
|
$bg-animation-color-light: #000;
|
|
$bg-animation-color-dark: #fff;
|
|
$bg-animation-duration: 0.5s;
|
|
|
|
html {
|
|
--bg-animation-color: $bg-animation-color-light;
|
|
|
|
&.dark {
|
|
--bg-animation-color: $bg-animation-color-dark;
|
|
}
|
|
|
|
// View transition styles
|
|
&::view-transition-old(*) {
|
|
animation: none;
|
|
}
|
|
|
|
&::view-transition-new(*) {
|
|
animation: clip $bg-animation-duration ease-in both;
|
|
}
|
|
|
|
&::view-transition-old(root) {
|
|
z-index: 1;
|
|
}
|
|
|
|
&::view-transition-new(root) {
|
|
z-index: 9999;
|
|
}
|
|
|
|
&.dark {
|
|
&::view-transition-old(*) {
|
|
animation: clip $bg-animation-duration ease-in reverse both;
|
|
}
|
|
|
|
&::view-transition-new(*) {
|
|
animation: none;
|
|
}
|
|
|
|
&::view-transition-old(root) {
|
|
z-index: 9999;
|
|
}
|
|
|
|
&::view-transition-new(root) {
|
|
z-index: 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
// 定义动画
|
|
@keyframes clip {
|
|
from {
|
|
clip-path: circle(0% at var(--x) var(--y));
|
|
}
|
|
|
|
to {
|
|
clip-path: circle(var(--r) at var(--x) var(--y));
|
|
}
|
|
}
|
|
|
|
// body 相关样式
|
|
body {
|
|
background-color: var(--bg-animation-color);
|
|
}
|