This commit is contained in:
iqudoo
2026-06-05 17:22:32 +08:00
commit eb4e8f1a04
90 changed files with 21224 additions and 0 deletions

247
src/pages/index.css Normal file
View File

@@ -0,0 +1,247 @@
:root {
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}
body {
width: 100%;
height: 100%;
min-width: 100vw;
min-height: 100vh;
}
h1 {
font-size: 3.2em;
line-height: 1.1;
}
button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}
.card {
padding: 2em;
}
#app {
text-align: center;
background-color: #f5f5f5;
}
@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}
.ant-image-preview-mask {
background-color: rgba(0, 0, 0, 0.85) !important;
}
.ant-image-preview-img {
max-width: 75% !important;
max-height: 75% !important;
}
.ant-menu-title-content {
text-align: left;
}
.drawer-footer {
z-index: 10086;
}
.ant-list-split .ant-list-item {
border-block-end: none;
}
.ant-empty-description {
color: #999;
}
.ant-drawer-header {
padding: 14px 24px !important;
padding-right: 10px !important;
background-color: #1677ff;
}
.ant-drawer-close,
.ant-drawer-title {
color: #fff !important;
}
.ant-drawer-header-title {
flex-direction: row-reverse;
}
.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload.ant-upload-select {
width: 120px;
height: 120px;
}
.ant-form-item .ant-form-item-control {
margin-bottom: 10px;
}
.iview-filter-form .ant-form-item .ant-form-item-control {
margin-bottom: 0px;
}
.ant-drawer-close {
margin-inline-end: 0px !important;
}
.del {
text-decoration: line-through;
}
.ant-tag {
margin-inline-end: 0px;
}
.page-header h2 {
font-size: 22px;
font-weight: 500;
margin-bottom: 8px;
text-align: left;
}
.no-data {
color: #999;
font-style: italic;
}
/* 移动端适配 */
@media screen and (max-width: 768px) {
.page-header h2 {
font-size: 1.6rem;
font-weight: 600;
margin: 0;
}
}
.wordwrap {
white-space: normal;
word-break: break-all;
word-wrap: break-word;
}
.ant-message-notice-content {
max-width: 500px;
}
@keyframes shake {
0%,
100% {
transform: translateX(0);
}
10%,
30%,
50%,
70%,
90% {
transform: translateX(-5px);
}
20%,
40%,
60%,
80% {
transform: translateX(5px);
}
}
.shake-animation {
animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
/* border-right: 1px solid red; */
}
:deep(.ant-result .ant-result-title) {
font-size: 16px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #24292e;
}
.ant-tabs .ant-tabs-tab+.ant-tabs-tab {
margin: 0 0 0 20px;
}
@media screen and (max-width: 768px) {
.ant-tabs .ant-tabs-tab+.ant-tabs-tab {
margin: 0 0 0 15px;
}
}
/* 删除状态, 设置划线的颜色 */
.is_delete {
color: #999;
text-decoration: line-through;
text-decoration-color: #333333;
text-decoration-thickness: 1.5px;
text-decoration-style: solid;
text-decoration-skip-ink: none;
text-decoration-skip: none;
text-decoration-skip-ink: none;
opacity: 0.5;
}
.ant-drawer-body::-webkit-scrollbar{
display: none;
width: 0;
height: 0;
}

16
src/pages/index.html Normal file
View File

@@ -0,0 +1,16 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="../assets/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>%VITE_APP_TITLE%</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="./index.js"></script>
</body>
</html>

28
src/pages/index.js Normal file
View File

@@ -0,0 +1,28 @@
import "./index.css";
import { createApp } from "vue";
import { imageDefaultBase64 } from "@/common/image";
import VueLazyload from "vue-lazyload";
import Antd from "ant-design-vue";
import "ant-design-vue/dist/reset.css";
import App from "./index.vue";
import router from "@/config/router";
import config from "@/config/index";
import pinia from "@/store/index";
// 输出当前环境信息
console.log("当前环境:", config.MODE);
console.log("API地址:", config.BASE_URL);
const app = createApp(App);
app.use(router);
app.use(pinia);
app.use(Antd);
app.use(VueLazyload, {
preLoad: 1,
loading: imageDefaultBase64,
error: imageDefaultBase64,
attempt: 1,
});
app.mount("#app");

158
src/pages/index.vue Normal file
View File

@@ -0,0 +1,158 @@
<script setup>
import zhCN from "ant-design-vue/es/locale/zh_CN";
import { useUserStore } from "@/store/user";
import { ref } from "vue";
const locale = zhCN;
const userStore = useUserStore();
const isInitialized = ref(false);
userStore.init().then(() => {
isInitialized.value = true;
userStore.initTokenExpirationListener();
if (userStore.isLoggedIn) {
userStore.getUserProfile();
}
});
</script>
<template>
<a-spin :spinning="!isInitialized">
<a-config-provider :locale="locale" v-if="isInitialized">
<router-view></router-view>
</a-config-provider>
<div v-else class="loading-container"></div>
</a-spin>
</template>
<style>
/* 全局样式和响应式基础设置 */
html,
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
Arial, "Noto Sans", sans-serif;
height: 100%;
width: 100%;
overflow-x: hidden;
overscroll-behavior: none;
}
/* 设置根元素字体大小便于使用rem单位 */
html {
font-size: 16px;
}
/* 移动端适配 - 根据屏幕宽度调整基础字体大小 */
@media screen and (max-width: 768px) {
html {
font-size: 14px;
}
}
@media screen and (max-width: 576px) {
html {
font-size: 12px;
}
}
#app {
width: 100%;
height: 100%;
overscroll-behavior: none;
}
/* 禁止移动端在页面边界和弹窗容器上的上下回弹 */
.layout,
.layout-content,
.content,
.ant-modal-wrap,
.ant-modal-content,
.ant-modal-body,
.ant-drawer-content-wrapper,
.ant-drawer-content,
.ant-drawer-body {
overscroll-behavior: none;
}
/* 让所有滚动条美观 */
::-webkit-scrollbar {
width: 6px;
height: 12px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 3px;
}
::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
}
/* 特定区域隐藏滚动条 */
.hide-scrollbar::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
}
/* 响应式工具类 */
.hidden-xs {
display: block;
}
.visible-xs {
display: none;
}
@media screen and (max-width: 768px) {
.hidden-xs {
display: none !important;
}
.visible-xs {
display: block !important;
}
}
/* Ant Design 表格响应式调整 */
@media screen and (max-width: 768px) {
.ant-table {
width: 100%;
overflow-x: auto;
}
.ant-table-thead > tr > th,
.ant-table-tbody > tr > td {
white-space: nowrap;
padding: 8px;
}
/* 表单在移动端的调整 */
.ant-form-item {
margin-bottom: 12px;
}
.ant-form-item-label {
padding: 0;
}
}
.loading-container {
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
font-size: 20px;
font-weight: bold;
color: #999;
}
</style>