1 Star 0 Fork 2

onlycharlie/互联网+车联网

forked from zmy/互联网+车联网 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.umirc.ts 2.97 KB
一键复制 编辑 原始数据 按行查看 历史
zmy 提交于 2021-09-15 16:23 . 校赛最终版本
import { defineConfig } from 'umi';
import defaultSettings from './src/defaultSetting.js';
export default defineConfig({
nodeModulesTransform: {
type: 'none',
},
// "theme": "",
// layout: {}, //antd-pro
antd: {},
dva: {
hmr: true,
},
layout: {
// https://umijs.org/zh-CN/plugins/plugin-layout
locale: true,
siderWidth: 208,
...defaultSettings,
},
icon: '@/public/icon/gongdi.svg',
routes: [
{ path: '/', redirect: '/user/login' },
{
path: '/user',
// component: '@/layout/BlankLayout',
layout: false,
routes: [
{
name: 'login',
path: '/user/login',
component: '@/pages/login',
},
],
},
{
name: 'home',
path: '/home',
icon: 'home',
component: '@/pages/home',
},
{
name: 'vehicle',
path: '/vehicle',
icon: 'car',
routes: [
{
path: '/vehicle/',
component: '@/pages/vehicle',
},
{
path: '/vehicle/:vehicleId',
component: '@/pages/dataCollection',
},
{
path: '/vehicle/:vehicleId/forCars',
component: '@/pages/dataforCars',
},
],
},
{
name: 'warning',
path: '/warning',
icon: 'warning',
component: '@/pages/warning',
},
{
name: 'repair',
path: '/repair',
icon: 'Tool',
// component: '@/pages/repair',
routes: [
{
path: '/repair/detail/:maintenanceId',
component: '@/pages/repair/detail',
},
{
path: '/repair/',
component: '@/pages/repair',
},
],
},
// {},
// {
// path: '/repair/reset',
// component:'@/pages/repair/reset'
// },
{
name: 'accident',
path: '/accident',
icon: 'schedule',
//component: '@/pages/accident',
component: '@/pages/accident/index.jsx',
},
],
fastRefresh: {},
locale: {
// default zh-CN
default: 'zh-CN',
antd: true,
// default true, when it is true, will use `navigator.language` overwrite default
baseNavigator: true,
},
dynamicImport: {
loading: '@ant-design/pro-layout/es/PageLoading',
},
targets: {
ie: 11,
},
// Theme for antd: https://ant.design/docs/react/customize-theme-cn
theme: {
'primary-color': defaultSettings.primaryColor,
},
cssLoader: {
localsConvention: 'camelCase', //驼峰命名
},
lessLoader: {},
cssModulesTypescriptLoader: {}, //对按照css modules方式引入的css或less等样式文件,自动生成ts类型定义文件
// favicon: '', //配置favicon地址
hash: true, //避免浏览器加载缓存
webpack5: {},
exportStatic: {},
history: {
type: 'hash', //哈希路由
},
proxy: {
'/api/': {
target: 'http://192.168.1.106:8888',
changeOrigin: true,
pathRewrite: {
'^/api': '', //会对请求地址截取,将api替换为target
},
},
},
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/onlychar/internet-vehicle-networking.git
git@gitee.com:onlychar/internet-vehicle-networking.git
onlychar
internet-vehicle-networking
互联网+车联网
master

搜索帮助