This commit is contained in:
qumeng039@126.com 2025-09-17 17:20:55 +08:00
parent 8f1af839ce
commit 0a7b9d6f89
3 changed files with 16 additions and 24 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -98,8 +98,6 @@ import { Swiper, SwiperSlide } from "swiper/vue"
import { Navigation, Pagination, EffectCoverflow, Mousewheel } from "swiper/modules"
import { nowSize } from "@/utils/echarts-self-adaption"
import { useRouter } from "vue-router"
// Swiper
import "swiper/css"
import "swiper/css/navigation"
import "swiper/css/pagination"
@ -107,7 +105,7 @@ import "swiper/css/pagination"
const modules = [Navigation, Pagination, EffectCoverflow, Mousewheel]
// 10
const navItems = ref([
const navItems = [
"重大舆情事件锚点",
"传播意见领袖",
"传播桥梁节点",
@ -118,7 +116,7 @@ const navItems = ref([
"群体结构演化",
"群体成员演化",
"异常群体"
])
]
// /src/assets/... URL
const assets = import.meta.glob("/src/assets/images/navigation/nav-item-*.png", {
@ -174,7 +172,7 @@ const onSwiper = (swiper) => {
//
currentTitle.value = "关键节点识别"
//
const initIndex = navItems.value.indexOf("传播意见领袖")
const initIndex = navItems.indexOf("传播意见领袖")
if (initIndex !== -1) {
swiper.slideToLoop(initIndex)
}
@ -196,7 +194,7 @@ const handleCategoryNext = () => {
//
const centerItem = categoryCenterItems[nextCategory]
// navItems
const centerIndex = navItems.value.indexOf(centerItem)
const centerIndex = navItems.indexOf(centerItem)
if (centerIndex !== -1) {
//
swiperRef.value.slideToLoop(centerIndex)
@ -219,7 +217,7 @@ const handleCategoryPrev = () => {
//
const centerItem = categoryCenterItems[prevCategory]
// navItems
const centerIndex = navItems.value.indexOf(centerItem)
const centerIndex = navItems.indexOf(centerItem)
if (centerIndex !== -1) {
//
swiperRef.value.slideToLoop(centerIndex)
@ -228,13 +226,10 @@ const handleCategoryPrev = () => {
const updateCurrentTitle = () => {
if (!swiperRef.value) return
// slide
const activeIndex = swiperRef.value.activeIndex
// loop
const realIndex = swiperRef.value.realIndex
//
const activeItem = navItems.value[realIndex]
const activeItem = navItems[realIndex]
//
for (const [category, items] of Object.entries(navCategories)) {

View File

@ -19,11 +19,7 @@
placeholder="请输入用户名"
>
<template #prefix>
<img
src="@/assets/images/login/user-name.png"
alt="user-name"
style="width: 16px; height: 16px"
/>
<img src="@/assets/images/login/user-name.png" alt="user-name" class="username" />
</template>
</el-input>
</el-form-item>
@ -36,11 +32,7 @@
placeholder="请输入密码"
>
<template #prefix>
<img
src="@/assets/images/login/password.png"
alt="password"
style="width: 16px; height: 16px"
/>
<img src="@/assets/images/login/password.png" alt="password" class="password" />
</template>
</el-input>
</el-form-item>
@ -58,14 +50,14 @@ import { useLoginStore } from "@/store/authentication/index"
const ruleFormRef = ref(null)
const loginStore = useLoginStore()
const validateUsername = (rule, value, callback) => {
const validateUsername = (_, value, callback) => {
if (value === "") {
callback(new Error("账号不得为空!"))
} else {
callback()
}
}
const validatePassword = (rule, value, callback) => {
const validatePassword = (_, value, callback) => {
if (value === "") {
callback(new Error("密码不得为空!"))
} else {
@ -120,6 +112,11 @@ const submitForm = (formEl) => {
margin-bottom: vh(46);
font-size: vw(32);
}
.username,
.password {
width: vw(16);
height: vh(16);
}
/* 修改 el-input 样式 */
:deep(.el-input__wrapper) {
background: rgba(0, 166, 255, 0.1) !important; /* 背景颜色 */
@ -152,7 +149,7 @@ const submitForm = (formEl) => {
radial-gradient(77.05% 52.73% at 50% 131.82%, #00a6ff 12.05%, rgba(63, 129, 207, 0) 95.88%),
rgba(0, 166, 255, 0.3) !important;
border-color: #00a6ff !important;
transform: translateY(1px);
transform: translateY(vw(1));
}
}
}