perf:基础架构升级
This commit is contained in:
1
auto-imports.d.ts
vendored
1
auto-imports.d.ts
vendored
@@ -3,6 +3,7 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
// noinspection JSUnusedGlobalSymbols
|
// noinspection JSUnusedGlobalSymbols
|
||||||
// Generated by unplugin-auto-import
|
// Generated by unplugin-auto-import
|
||||||
|
// biome-ignore lint: disable
|
||||||
export {}
|
export {}
|
||||||
declare global {
|
declare global {
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
name="viewport"
|
name="viewport"
|
||||||
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"
|
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"
|
||||||
/>
|
/>
|
||||||
<title>Vite App</title>
|
<title>东风猛士agv配置</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<!-- <script type="module" src="/src/main.ts"></script> -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
32
package.json
32
package.json
@@ -2,28 +2,30 @@
|
|||||||
"name": "vue-frame",
|
"name": "vue-frame",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "rsbuild dev",
|
||||||
"build": "vite build",
|
"build": "rsbuild build",
|
||||||
"preview": "vite preview"
|
"preview": "rsbuild preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.7.2",
|
"axios": "^1.7.8",
|
||||||
"dayjs": "^1.11.11",
|
"dayjs": "^1.11.13",
|
||||||
"element-plus": "^2.7.3",
|
"element-plus": "^2.9.0",
|
||||||
"normalize.css": "^8.0.1",
|
"normalize.css": "^8.0.1",
|
||||||
"pinia": "^2.2.2",
|
"pinia": "^2.2.8",
|
||||||
"qs": "^6.11.2",
|
"qs": "^6.11.2",
|
||||||
"vue": "^3.4.27",
|
"vue": "^3.5.13",
|
||||||
"vue-router": "^4.3.2"
|
"vue-router": "^4.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@rsbuild/core": "^1.1.7",
|
||||||
|
"@rsbuild/plugin-sass": "^1.1.1",
|
||||||
|
"@rsbuild/plugin-vue": "^1.0.5",
|
||||||
"@types/node": "^18.17.1",
|
"@types/node": "^18.17.1",
|
||||||
"@vitejs/plugin-vue": "^5.0.4",
|
"@vitejs/plugin-vue": "^5.2.1",
|
||||||
"sass": "^1.77.2",
|
"sass": "^1.81.1",
|
||||||
"typescript": "^5.0.0",
|
"typescript": "^5.0.0",
|
||||||
"unplugin-auto-import": "^0.17.6",
|
"unplugin-auto-import": "^0.18.6",
|
||||||
"unplugin-vue-components": "^0.27.0",
|
"unplugin-vue-components": "^0.27.5",
|
||||||
"vite": "^5.4.2",
|
"vue-tsc": "^2.1.10"
|
||||||
"vue-tsc": "^2.1.4"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
2242
pnpm-lock.yaml
generated
2242
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
36
rsbuild.config.ts
Normal file
36
rsbuild.config.ts
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import { defineConfig } from '@rsbuild/core'
|
||||||
|
import { pluginVue } from '@rsbuild/plugin-vue'
|
||||||
|
import { pluginSass } from '@rsbuild/plugin-sass'
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [pluginVue(), pluginSass()],
|
||||||
|
html: {
|
||||||
|
template: './index.html'
|
||||||
|
},
|
||||||
|
source: {
|
||||||
|
entry: {
|
||||||
|
index: './src/main.ts'
|
||||||
|
},
|
||||||
|
alias: {
|
||||||
|
'@': './src'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
environments: {
|
||||||
|
web: {
|
||||||
|
source: {
|
||||||
|
define: {
|
||||||
|
'import.meta.env.SSR': JSON.stringify(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
node: {
|
||||||
|
source: {
|
||||||
|
define: {
|
||||||
|
'import.meta.env.SSR': JSON.stringify(true)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
target: 'node'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
12
src/main.ts
12
src/main.ts
@@ -1,11 +1,3 @@
|
|||||||
/*
|
|
||||||
* @Description: {{ByRuin}}
|
|
||||||
* @Version: 2.0
|
|
||||||
* @Author: Ruin 🍭
|
|
||||||
* @Date: 2022-01-25 16:22:24
|
|
||||||
* @LastEditors: 刘引 liu.yin.work@foxmail.com
|
|
||||||
* @LastEditTime: 2023-08-01 15:54:28
|
|
||||||
*/
|
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import router from './router/index' //引入vue-router
|
import router from './router/index' //引入vue-router
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
@@ -20,8 +12,8 @@ import 'normalize.css/normalize.css'
|
|||||||
createApp(App)
|
createApp(App)
|
||||||
.use(router)
|
.use(router)
|
||||||
.use(createPinia())
|
.use(createPinia())
|
||||||
.use(ElementPlus,{
|
.use(ElementPlus, {
|
||||||
locale: zhCn,
|
locale: zhCn
|
||||||
})
|
})
|
||||||
.component('Foot', Foot)
|
.component('Foot', Foot)
|
||||||
.component('Head', Head)
|
.component('Head', Head)
|
||||||
|
|||||||
@@ -1,11 +1,3 @@
|
|||||||
/*
|
|
||||||
* @Description: {{ByRuin}}
|
|
||||||
* @Version: 2.0
|
|
||||||
* @Author: Ruin 🍭
|
|
||||||
* @Date: 2022-01-25 16:57:54
|
|
||||||
* @LastEditors: 刘引
|
|
||||||
* @LastEditTime: 2022-03-11 14:26:24
|
|
||||||
*/
|
|
||||||
// import path from 'node:path/win32'
|
// import path from 'node:path/win32'
|
||||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||||
const routes = [
|
const routes = [
|
||||||
|
|||||||
@@ -23,9 +23,4 @@ const getItem = (data: unknown) => {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export { getInfo, getItem }
|
||||||
const HomeApi = {
|
|
||||||
getInfo,
|
|
||||||
getItem
|
|
||||||
}
|
|
||||||
export default HomeApi
|
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, watch, onUpdated, ref, reactive, onBeforeMount } from 'vue'
|
import { computed, watch, onUpdated, ref, reactive, onBeforeMount } from 'vue'
|
||||||
import news from './components/news.vue'
|
import news from './components/news.vue'
|
||||||
import HomeApi from '@/services/home'
|
import { getInfo, getItem } from '@/services/home'
|
||||||
|
|
||||||
// get请求
|
// get请求
|
||||||
const getDataFromApi = async () => {
|
const getDataFromApi = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await HomeApi.getInfo({ type: 'scorpio', time: 'today' })
|
const res = await getInfo({ type: 'scorpio', time: 'today' })
|
||||||
console.debug(res, '获取到的数据')
|
console.debug(res, '获取到的数据')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('get获取星座数据报错', error)
|
console.error('get获取星座数据报错', error)
|
||||||
|
|||||||
@@ -1,11 +1,3 @@
|
|||||||
<!--
|
|
||||||
* @Description: {{ByRuin}}
|
|
||||||
* @Version: 2.0
|
|
||||||
* @Author: Ruin 🍭
|
|
||||||
* @Date: 2022-03-10 10:11:06
|
|
||||||
* @LastEditors: 刘引 liu.yin.work@foxmail.com
|
|
||||||
* @LastEditTime: 2023-08-01 15:45:57
|
|
||||||
-->
|
|
||||||
<template>
|
<template>
|
||||||
<div class="root-home">
|
<div class="root-home">
|
||||||
<news></news>
|
<news></news>
|
||||||
|
|||||||
Reference in New Issue
Block a user