开源项目分析代码
开源项目分析代码
开源项目分析代码
官网地址: ruoyi
前端代码
首页
1 2
| #首页主界面: src/views/index.vue #布局页面: src/layout/index.vue
|
页面查询缓存
vue-echarts 使用
1 2 3 4 5 6 7 8 9 10 11 12 13
| 01) 安装依赖 vue-echarts 02) main.js 引入
import ECharts from 'vue-echarts' import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers' import { GridComponent } from 'echarts/components' use([CanvasRenderer, GridComponent]) const app = createApp(App) app.component('VChart', ECharts)
|
vite代理图片地址
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
server: { port: 8282, host: true, proxy: { '^/api': { target: 'http://localhost:8182', changeOrigin: true }, '/profilePath': { target: 'http://localhost:8182', changeOrigin: true, rewrite: p => p.replace(/^\/profilePath/, 'api/profilePath') } } },
|
上传图片组件使用
1 2 3 4 5
| const feiUrl = ref('/profilePath/upload/2024/05/19/001_20240519171820A004.png')
图片地址: {{ feiUrl }} <ImageUpload v-model="feiUrl" />
|
按钮主题色
1 2
| theme: storageSetting.theme || '#4180b3',
|
页面名称修改
1 2
| const newRoute = Object.assign({}, route, { title: '编辑标签' }) store.dispatch('tagsView/updateVisitedView', newRoute)
|
底部
没有了