Files
FastapiAdmin/frontend/web/src/main.ts
T
zhangtao d34d4a4c50 chore: 完成多批次代码优化与重构
- 重构工作流模块目录结构,迁移代码文件
- 修复类型断言空值安全问题,添加 ! 操作符
- 优化样式类名,替换 flex-cc 为标准 flex 工具类
- 更新路由标签简化文案,移除冗余注释
- 调整 ruff 配置,放宽行长度限制
- 更新 README 与多语言文案,优化项目描述
- 修复表单、图表组件的类型与样式问题
- 简化搜索表单、数据卡片的布局代码
2026-06-20 05:31:46 +08:00

34 lines
1.4 KiB
TypeScript
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// ---------------------------------------------------------------------------
// 样式(顺序:tailwind 基础 → 项目全局 → Element Plus 暗色 → 动画库)
// ---------------------------------------------------------------------------
import "@styles/tailwind.css";
import "@styles/index.scss";
import "animate.css";
// ---------------------------------------------------------------------------
// 应用初始化
// ---------------------------------------------------------------------------
import App from "./App.vue";
import { createApp } from "vue";
import { printConsoleBanner } from "@utils";
import { initPlugins } from "@/plugins";
/**
* iOS Safari 中 touch 事件默认是 passive 的,导致 `:active` CSS 伪类不生效。
* 注册一个空的 `touchstart` 监听(非 passive)来激活 `:active` 响应。
*/
document.addEventListener("touchstart", function () {}, { passive: false });
/** 启动顺序:
* 1. printConsoleBanner —— 控制台欢迎信息(无依赖)
* 2. initPlugins —— 注册所有 Vue 插件(Pinia → Router → 指令 → 国际化 → Element Plus
* 3. mount —— 挂载根组件
* 挂载后 App.vue 的 onMounted 中初始化站点标题/favicon(需等 Pinia store 就绪)
*/
(async () => {
const app = createApp(App);
printConsoleBanner();
await initPlugins(app);
app.mount("#app");
})();