Merge branch 'master' of https://gitee.com/youlaiorg/vue3-element-admin
Former-commit-id: 26926dfbc9
This commit is contained in:
commit
9bb90a362c
75
index.html
75
index.html
|
|
@ -13,10 +13,83 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="app" class="app"></div>
|
<div id="app" class="app">
|
||||||
|
<!--加载动画-->
|
||||||
|
<div class="cm-spinner"></div>
|
||||||
|
</div>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
<script>
|
<script>
|
||||||
global = globalThis;
|
global = globalThis;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
html,
|
||||||
|
body,
|
||||||
|
#app {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-spinner {
|
||||||
|
position: relative;
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
border: 3px solid transparent;
|
||||||
|
border-top: 4px solid #f15e41;
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: spin 4s linear infinite;
|
||||||
|
animation: spin 4s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-spinner::before,
|
||||||
|
.cm-spinner::after {
|
||||||
|
position: absolute;
|
||||||
|
inset: 6px;
|
||||||
|
content: "";
|
||||||
|
border: 4px solid transparent;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-spinner::before {
|
||||||
|
border-top-color: #bad375;
|
||||||
|
animation: 3s spin linear infinite;
|
||||||
|
animation: 3s spin linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-spinner::after {
|
||||||
|
border-top-color: #26a9e0;
|
||||||
|
animation: spin 1.5s linear infinite;
|
||||||
|
animation: spin 1.5s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
from {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
from {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,17 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="captcha">
|
<div class="captcha">
|
||||||
<img :src="captchaBase64" @click="getCaptcha" />
|
<el-image
|
||||||
|
:src="captchaBase64"
|
||||||
|
@click="getCaptcha"
|
||||||
|
class="w-[120px] h-[48px] cursor-pointer"
|
||||||
|
>
|
||||||
|
<template #error>
|
||||||
|
<div class="image-slot">
|
||||||
|
<i-ep-picture />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-image>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
@ -275,6 +285,16 @@ function handleLogin() {
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getCaptcha();
|
getCaptcha();
|
||||||
|
|
||||||
|
// 主题初始化
|
||||||
|
const theme = useSettingsStore().theme;
|
||||||
|
console.log("登录页面主题", theme);
|
||||||
|
useSettingsStore().changeSetting({ key: "theme", value: theme });
|
||||||
|
if (theme == "dark") {
|
||||||
|
document.documentElement.classList.add("dark");
|
||||||
|
} else {
|
||||||
|
document.documentElement.classList.remove("dark");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -286,6 +306,7 @@ onMounted(() => {
|
||||||
.login-container {
|
.login-container {
|
||||||
@apply w-full h-full flex-center;
|
@apply w-full h-full flex-center;
|
||||||
|
|
||||||
|
overflow-y: auto;
|
||||||
background: url("@/assets/images/login-bg.jpg") no-repeat center right;
|
background: url("@/assets/images/login-bg.jpg") no-repeat center right;
|
||||||
|
|
||||||
.login-form {
|
.login-form {
|
||||||
|
|
@ -296,10 +317,19 @@ onMounted(() => {
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
||||||
img {
|
.image-slot {
|
||||||
width: 120px;
|
display: flex;
|
||||||
height: 48px;
|
align-items: center;
|
||||||
cursor: pointer;
|
justify-content: right;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
font-size: 18px;
|
||||||
|
color: var(--el-text-color-secondary);
|
||||||
|
background: var(--el-fill-color-light);
|
||||||
|
|
||||||
|
svg {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue