fix: 打包问题
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
dece1db47c
commit
1f1013a173
14
src/App.vue
14
src/App.vue
|
|
@ -1,10 +1,24 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'
|
import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'
|
||||||
|
import { LineChart } from 'echarts/charts'
|
||||||
|
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components'
|
||||||
|
import * as echarts from 'echarts/core'
|
||||||
|
import { CanvasRenderer } from 'echarts/renderers'
|
||||||
|
|
||||||
import { navigateToInterceptor } from '@/router/interceptor'
|
import { navigateToInterceptor } from '@/router/interceptor'
|
||||||
import { useUserStore } from '@/store/user'
|
import { useUserStore } from '@/store/user'
|
||||||
import { tabbarStore } from './tabbar/store'
|
import { tabbarStore } from './tabbar/store'
|
||||||
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'
|
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'
|
||||||
|
|
||||||
|
// 注册 ECharts 组件
|
||||||
|
echarts.use([
|
||||||
|
LineChart,
|
||||||
|
GridComponent,
|
||||||
|
LegendComponent,
|
||||||
|
TooltipComponent,
|
||||||
|
CanvasRenderer,
|
||||||
|
])
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
||||||
// 不需要登录验证的页面路径
|
// 不需要登录验证的页面路径
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,7 @@
|
||||||
import type * as API from '@/service/types'
|
import type * as API from '@/service/types'
|
||||||
|
|
||||||
import { useQuery } from '@tanstack/vue-query'
|
import { useQuery } from '@tanstack/vue-query'
|
||||||
import { LineChart } from 'echarts/charts'
|
import UniEcharts from 'uni-echarts'
|
||||||
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components'
|
|
||||||
import * as echarts from 'echarts/core'
|
|
||||||
import { CanvasRenderer } from 'echarts/renderers'
|
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import { teacherAnalysisTrendUsingPost } from '@/service/laoshichengjifenxi'
|
import { teacherAnalysisTrendUsingPost } from '@/service/laoshichengjifenxi'
|
||||||
import { useHomeStore } from '@/store/home'
|
import { useHomeStore } from '@/store/home'
|
||||||
|
|
@ -19,15 +16,6 @@ const emit = defineEmits<{
|
||||||
openCompareClassDialog: []
|
openCompareClassDialog: []
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
// 注册 ECharts 组件
|
|
||||||
echarts.use([
|
|
||||||
LineChart,
|
|
||||||
GridComponent,
|
|
||||||
LegendComponent,
|
|
||||||
TooltipComponent,
|
|
||||||
CanvasRenderer,
|
|
||||||
])
|
|
||||||
|
|
||||||
// 类型别名
|
// 类型别名
|
||||||
type TrendInfo = API.TrendInfo
|
type TrendInfo = API.TrendInfo
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"lib": ["esnext", "dom"],
|
"lib": ["esnext", "dom"],
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "Node",
|
"moduleResolution": "bundler",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"],
|
"@/*": ["./src/*"],
|
||||||
"@img/*": ["./src/static/*"]
|
"@img/*": ["./src/static/*"]
|
||||||
|
|
@ -16,7 +16,8 @@
|
||||||
"miniprogram-api-typings",
|
"miniprogram-api-typings",
|
||||||
"wot-design-uni/global.d.ts",
|
"wot-design-uni/global.d.ts",
|
||||||
"z-paging/types",
|
"z-paging/types",
|
||||||
"./src/typings.d.ts"
|
"./src/typings.d.ts",
|
||||||
|
"uni-echarts/global"
|
||||||
],
|
],
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"noImplicitThis": true,
|
"noImplicitThis": true,
|
||||||
|
|
@ -35,7 +36,8 @@
|
||||||
"src/**/*.tsx",
|
"src/**/*.tsx",
|
||||||
"src/**/*.jsx",
|
"src/**/*.jsx",
|
||||||
"src/**/*.vue",
|
"src/**/*.vue",
|
||||||
"src/**/*.json"
|
"src/**/*.json",
|
||||||
|
"vite.config.ts"
|
||||||
],
|
],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import Optimization from '@uni-ku/bundle-optimizer'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { visualizer } from 'rollup-plugin-visualizer'
|
import { visualizer } from 'rollup-plugin-visualizer'
|
||||||
import { UniEchartsResolver } from 'uni-echarts/resolver'
|
import { UniEchartsResolver } from 'uni-echarts/resolver'
|
||||||
|
import { UniEcharts } from 'uni-echarts/vite'
|
||||||
import UnoCSS from 'unocss/vite'
|
import UnoCSS from 'unocss/vite'
|
||||||
import AutoImport from 'unplugin-auto-import/vite'
|
import AutoImport from 'unplugin-auto-import/vite'
|
||||||
import { defineConfig, loadEnv } from 'vite'
|
import { defineConfig, loadEnv } from 'vite'
|
||||||
|
|
@ -61,6 +62,7 @@ export default ({ command, mode }) => {
|
||||||
envDir: './env', // 自定义env目录
|
envDir: './env', // 自定义env目录
|
||||||
base: VITE_APP_PUBLIC_BASE,
|
base: VITE_APP_PUBLIC_BASE,
|
||||||
plugins: [
|
plugins: [
|
||||||
|
UniEcharts(),
|
||||||
vueDevTools(),
|
vueDevTools(),
|
||||||
UniPages({
|
UniPages({
|
||||||
exclude: ['**/components/**/**.*'],
|
exclude: ['**/components/**/**.*'],
|
||||||
|
|
@ -91,9 +93,6 @@ export default ({ command, mode }) => {
|
||||||
dts: 'src/types/auto-import.d.ts',
|
dts: 'src/types/auto-import.d.ts',
|
||||||
dirs: ['src/hooks'], // 自动导入 hooks
|
dirs: ['src/hooks'], // 自动导入 hooks
|
||||||
vueTemplate: true, // default false
|
vueTemplate: true, // default false
|
||||||
resolvers: [
|
|
||||||
UniEchartsResolver(),
|
|
||||||
],
|
|
||||||
}),
|
}),
|
||||||
// Optimization 插件需要 page.json 文件,故应在 UniPages 插件之后执行
|
// Optimization 插件需要 page.json 文件,故应在 UniPages 插件之后执行
|
||||||
Optimization({
|
Optimization({
|
||||||
|
|
@ -156,7 +155,9 @@ export default ({ command, mode }) => {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
optimizeDeps: {
|
||||||
|
exclude: ['uni-echarts'],
|
||||||
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': path.join(process.cwd(), './src'),
|
'@': path.join(process.cwd(), './src'),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue