refactor(modules/web): Mirgrat to typescript; fix bugs

This commit is contained in:
Xwite
2024-10-14 21:46:45 +08:00
parent 3eded53041
commit 30b31b9c96
81 changed files with 6396 additions and 3166 deletions
+2 -1
View File
@@ -29,4 +29,5 @@ pnpm build
pnpm lint:fix
#格式化代码
```
- 调试的时候可以修改.env.development里面的地址连接手机端调试
- 调试的时候可以修改.env.development里面的地址连接手机端调试
+10 -10
View File
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!doctype html>
<html lang="zh" class="">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
</head>
</head>
<body>
<div id="app"></div>
<script type="module" src="./main.js"></script>
</body>
</html>
<body>
<div id="app"></div>
<script type="module" src="./main.js"></script>
</body>
</html>
+10 -10
View File
@@ -1,19 +1,19 @@
import { createApp } from "vue";
import App from "@/App.vue";
import bookRouter from "@/router/bookRouter";
import store from "@/store";
import "element-plus/theme-chalk/dark/css-vars.css";
import { createApp } from 'vue'
import App from '@/App.vue'
import bookRouter from '@/router/bookRouter'
import store from '@/store'
import 'element-plus/theme-chalk/dark/css-vars.css'
createApp(App).use(store).use(bookRouter).mount("#app");
createApp(App).use(store).use(bookRouter).mount('#app')
// 同步Element PLUS 夜间模式
watch(
() => useBookStore().isNight,
(isNight) => {
isNight => {
if (isNight) {
document.documentElement.classList.add("dark");
document.documentElement.classList.add('dark')
} else {
document.documentElement.classList.remove("dark");
document.documentElement.classList.remove('dark')
}
},
);
)
+3 -2
View File
@@ -1,6 +1,5 @@
# legado_web_editor
## 🚧开发注意
如果你想要调试项目 请修改文件`.env.development``VITE_API`为阅读web服务ip
@@ -17,17 +16,19 @@ pnpm i
```
### Compiles and hot-reloads for development
```
pnpm dev
```
### Compiles and minifies for production
```
pnpm build
```
### Lints and fixes files
```
pnpm lint:fix
```
+10 -10
View File
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!doctype html>
<html lang="zh" class="">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
</head>
</head>
<body>
<div id="app"></div>
<script type="module" src="./main.js"></script>
</body>
</html>
<body>
<div id="app"></div>
<script type="module" src="./main.js"></script>
</body>
</html>
+6 -6
View File
@@ -1,7 +1,7 @@
import { createApp } from "vue";
import App from "@/App.vue";
import sourceRouter from "@/router/sourceRouter";
import store from "@/store";
import "element-plus/theme-chalk/dark/css-vars.css";
import { createApp } from 'vue'
import App from '@/App.vue'
import sourceRouter from '@/router/sourceRouter'
import store from '@/store'
import 'element-plus/theme-chalk/dark/css-vars.css'
createApp(App).use(store).use(sourceRouter).mount("#app");
createApp(App).use(store).use(sourceRouter).mount('#app')