|
@@ -1,36 +1,41 @@
|
|
|
<script setup lang="ts">
|
|
|
-import {onMounted, ref} from 'vue'
|
|
|
+import { onMounted, ref } from "vue";
|
|
|
import useRotateCanvas from "./scripts/rotateCanvas";
|
|
|
-import usePreloadImg from './scripts/preloadImg'
|
|
|
-import useModuleItem from './scripts/moduleItem'
|
|
|
+import usePreloadImg from "./scripts/preloadImg";
|
|
|
+import useModuleItem from "./scripts/moduleItem";
|
|
|
|
|
|
// video 元素的模板引用
|
|
|
-const loginVideoRef = ref<HTMLVideoElement>()
|
|
|
+const loginVideoRef = ref<HTMLVideoElement>();
|
|
|
+
|
|
|
// 设置视频播放速度
|
|
|
const setVideoRate = (rate = 0.75) => {
|
|
|
- if (loginVideoRef.value)
|
|
|
- loginVideoRef.value.playbackRate = rate
|
|
|
-}
|
|
|
+ if (loginVideoRef.value) loginVideoRef.value.playbackRate = rate;
|
|
|
+};
|
|
|
|
|
|
onMounted(() => {
|
|
|
// 设置视频播放速度
|
|
|
- setVideoRate()
|
|
|
+ setVideoRate();
|
|
|
// 预加载 模块item hover图片
|
|
|
- usePreloadImg()
|
|
|
-})
|
|
|
+ usePreloadImg();
|
|
|
+});
|
|
|
|
|
|
// 底部旋转 canvas
|
|
|
-const {canvasRef} = useRotateCanvas()
|
|
|
-const {
|
|
|
- moduleRef,
|
|
|
-} = useModuleItem()
|
|
|
+const { canvasRef } = useRotateCanvas();
|
|
|
+const { moduleRef } = useModuleItem();
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<article class="login-page">
|
|
|
<!-- 视频背景 -->
|
|
|
- <video ref="loginVideoRef" class="video-bg" poster="@/assets/login-bg-poster.jpg" autoplay loop muted>
|
|
|
- <source src="@/assets/login-bg-video.mp4" type="video/mp4"/>
|
|
|
+ <video
|
|
|
+ ref="loginVideoRef"
|
|
|
+ class="video-bg"
|
|
|
+ poster="@/assets/login-bg-poster.jpg"
|
|
|
+ autoplay
|
|
|
+ loop
|
|
|
+ muted
|
|
|
+ >
|
|
|
+ <source src="@/assets/login-bg-video.mp4" type="video/mp4" />
|
|
|
</video>
|
|
|
|
|
|
<!-- 标题 -->
|
|
@@ -47,13 +52,13 @@ const {
|
|
|
<div class="panel">
|
|
|
<!-- 用户名 -->
|
|
|
<div class="input-wrap username">
|
|
|
- <input class="input" type="text" placeholder="用户名">
|
|
|
- <i class="line"/>
|
|
|
+ <input class="input" type="text" placeholder="用户名" />
|
|
|
+ <i class="line" />
|
|
|
</div>
|
|
|
<!-- 密码 -->
|
|
|
<div class="input-wrap password">
|
|
|
- <input class="input" type="password" placeholder="密码">
|
|
|
- <i class="line"/>
|
|
|
+ <input class="input" type="password" placeholder="密码" />
|
|
|
+ <i class="line" />
|
|
|
</div>
|
|
|
<!-- 登录按钮 -->
|
|
|
<div class="login-btn">
|
|
@@ -71,15 +76,41 @@ const {
|
|
|
</div>
|
|
|
<!-- 功能模块 -->
|
|
|
<ul class="module" ref="moduleRef">
|
|
|
- <li class="item budget animate__animated animate__bounceIn" ref="budgetRef">预算审核模块</li>
|
|
|
- <li class="item estimate animate__animated animate__bounceIn" ref="estimateRef">估/概算模块</li>
|
|
|
- <li class="item util animate__animated animate__bounceIn" ref="utilRef">基础工具模块</li>
|
|
|
- <li class="item settlement animate__animated animate__bounceIn" ref="settlementRef">结算审核模块</li>
|
|
|
- <li class="item final animate__animated animate__bounceIn" ref="finalRef">决算审核模块</li>
|
|
|
- <li class="item check animate__animated animate__bounceIn" ref="checkRef">检测功能模块</li>
|
|
|
+ <li
|
|
|
+ class="item budget animate__animated animate__bounceIn"
|
|
|
+ ref="budgetRef"
|
|
|
+ >
|
|
|
+ 预算审核模块
|
|
|
+ </li>
|
|
|
+ <li
|
|
|
+ class="item estimate animate__animated animate__bounceIn"
|
|
|
+ ref="estimateRef"
|
|
|
+ >
|
|
|
+ 估/概算模块
|
|
|
+ </li>
|
|
|
+ <li class="item util animate__animated animate__bounceIn" ref="utilRef">
|
|
|
+ 基础工具模块
|
|
|
+ </li>
|
|
|
+ <li
|
|
|
+ class="item settlement animate__animated animate__bounceIn"
|
|
|
+ ref="settlementRef"
|
|
|
+ >
|
|
|
+ 结算审核模块
|
|
|
+ </li>
|
|
|
+ <li
|
|
|
+ class="item final animate__animated animate__bounceIn"
|
|
|
+ ref="finalRef"
|
|
|
+ >
|
|
|
+ 决算审核模块
|
|
|
+ </li>
|
|
|
+ <li
|
|
|
+ class="item check animate__animated animate__bounceIn"
|
|
|
+ ref="checkRef"
|
|
|
+ >
|
|
|
+ 检测功能模块
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
</main>
|
|
|
-
|
|
|
</article>
|
|
|
</template>
|
|
|
|
|
@@ -198,7 +229,7 @@ const {
|
|
|
.line {
|
|
|
@apply absolute w-0;
|
|
|
height: 2px;
|
|
|
- content: ' ';
|
|
|
+ content: " ";
|
|
|
bottom: -2px;
|
|
|
background-color: #459ef7;
|
|
|
transition: width 0.2s;
|
|
@@ -213,7 +244,7 @@ const {
|
|
|
width: 120px;
|
|
|
height: 40px;
|
|
|
line-height: 40px;
|
|
|
- background: url('@/assets/login-btn.png') no-repeat;
|
|
|
+ background: url("@/assets/login-btn.png") no-repeat;
|
|
|
background-size: 100%;
|
|
|
color: #9ae1f9;
|
|
|
font-size: 18px;
|
|
@@ -233,7 +264,12 @@ const {
|
|
|
.flash {
|
|
|
@apply absolute top-0 w-1/3 h-full;
|
|
|
left: -100%;
|
|
|
- background: linear-gradient(to right, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
|
|
|
+ background: linear-gradient(
|
|
|
+ to right,
|
|
|
+ rgba(255, 255, 255, 0) 0,
|
|
|
+ rgba(255, 255, 255, 0.4) 50%,
|
|
|
+ rgba(255, 255, 255, 0) 100%
|
|
|
+ );
|
|
|
transform: skewX(-45deg);
|
|
|
animation-iteration-count: infinite;
|
|
|
}
|
|
@@ -268,10 +304,11 @@ const {
|
|
|
@apply absolute flex justify-center cursor-pointer transform-gpu select-none opacity-95;
|
|
|
width: 180px;
|
|
|
height: 156px;
|
|
|
- color: #44C4EF;
|
|
|
+ color: #44c4ef;
|
|
|
font-size: 22px;
|
|
|
padding-top: 40px;
|
|
|
- background: url("@/assets/login-module-item-normal.png") no-repeat center;
|
|
|
+ background: url("@/assets/login-module-item-normal.png") no-repeat
|
|
|
+ center;
|
|
|
background-size: cover;
|
|
|
transition: all 0.26s;
|
|
|
|