From 477176c1b92c8b8eb20ad44d9eab8a4b6d8b36b6 Mon Sep 17 00:00:00 2001 From: zhanglipeng <chinazhanglipeng@qq.com> Date: Mon, 16 Nov 2020 14:10:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E4=BC=B0-=E9=A2=86=E5=9F=9F-=E6=96=B0?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E6=95=B0=E6=8D=AE=E5=8C=96-=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/benyi/checkindetail/index.vue | 4 +- ruoyi-ui/src/views/benyi/child/index.vue | 4 +- .../src/views/benyi/halfdayplan/index.vue | 2 +- .../src/views/benyi/healthcheck/index.vue | 4 +- .../benyi/learndevelopmentfamily/index.vue | 4 +- .../benyi/learndevelopmentteacher/index.vue | 4 +- .../benyi/recruitstudentsnotice/index.vue | 6 +- .../src/views/benyi/schoolcalendar/index.vue | 4 +- .../src/views/benyi_train/lecturer/index.vue | 4 +- .../src/views/benyi_train/video/index.vue | 4 +- ruoyi-ui/src/views/dashboard/RadarChart.vue | 10 +- .../src/views/dashboard/RadarChart_jk.vue | 10 +- .../src/views/dashboard/RadarChart_kx.vue | 10 +- .../src/views/dashboard/RadarChart_sh.vue | 10 +- .../src/views/dashboard/RadarChart_ys.vue | 10 +- .../src/views/dashboard/RadarChart_yy.vue | 10 +- ruoyi-ui/src/views/system/class/index.vue | 4 +- ruoyi-ui/src/views/system/teacher/index.vue | 4 +- ruoyi-ui/src/views/system/user/index.vue | 4 +- ruoyi-ui/vue.config.js | 226 +++++++++--------- 20 files changed, 169 insertions(+), 169 deletions(-) diff --git a/ruoyi-ui/src/views/benyi/checkindetail/index.vue b/ruoyi-ui/src/views/benyi/checkindetail/index.vue index 755348b5f..560b22e1a 100644 --- a/ruoyi-ui/src/views/benyi/checkindetail/index.vue +++ b/ruoyi-ui/src/views/benyi/checkindetail/index.vue @@ -74,14 +74,14 @@ v-hasPermi="['benyi:checkindetail:add']" >新增</el-button > - <!-- <el-button + <el-button type="success" icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['benyi:checkindetail:edit']" - >修改</el-button> --> + >修改</el-button> <el-button type="danger" icon="el-icon-delete" diff --git a/ruoyi-ui/src/views/benyi/child/index.vue b/ruoyi-ui/src/views/benyi/child/index.vue index c7db80647..92467184c 100644 --- a/ruoyi-ui/src/views/benyi/child/index.vue +++ b/ruoyi-ui/src/views/benyi/child/index.vue @@ -70,7 +70,7 @@ v-hasPermi="['benyi:child:add']" >新增</el-button > - <!-- <el-button + <el-button type="success" icon="el-icon-edit" size="mini" @@ -78,7 +78,7 @@ @click="handleUpdate" v-hasPermi="['benyi:child:edit']" >修改</el-button - > --> + > <el-button type="danger" icon="el-icon-delete" diff --git a/ruoyi-ui/src/views/benyi/halfdayplan/index.vue b/ruoyi-ui/src/views/benyi/halfdayplan/index.vue index f1d67530c..99b1fc909 100644 --- a/ruoyi-ui/src/views/benyi/halfdayplan/index.vue +++ b/ruoyi-ui/src/views/benyi/halfdayplan/index.vue @@ -6,7 +6,7 @@ :inline="true" label-width="68px" > - <el-form-item label="标题" prop="title"> + <el-form-item label="体验标题" prop="title"> <el-input v-model="queryParams.title" placeholder="请输入标题" diff --git a/ruoyi-ui/src/views/benyi/healthcheck/index.vue b/ruoyi-ui/src/views/benyi/healthcheck/index.vue index 4850c1c4b..790f732fd 100644 --- a/ruoyi-ui/src/views/benyi/healthcheck/index.vue +++ b/ruoyi-ui/src/views/benyi/healthcheck/index.vue @@ -103,7 +103,7 @@ v-hasPermi="['benyi:healthcheck:add']" >新增</el-button > - <!-- <el-button + <el-button type="success" icon="el-icon-edit" size="mini" @@ -111,7 +111,7 @@ @click="handleUpdate" v-hasPermi="['benyi:healthcheck:edit']" >修改</el-button - > --> + > <el-button type="danger" icon="el-icon-delete" diff --git a/ruoyi-ui/src/views/benyi/learndevelopmentfamily/index.vue b/ruoyi-ui/src/views/benyi/learndevelopmentfamily/index.vue index 3a076d421..e88dffa5e 100644 --- a/ruoyi-ui/src/views/benyi/learndevelopmentfamily/index.vue +++ b/ruoyi-ui/src/views/benyi/learndevelopmentfamily/index.vue @@ -49,7 +49,7 @@ v-hasPermi="['benyi:learndevelopmentfamily:add']" >新增</el-button > - <!-- <el-button + <el-button type="success" icon="el-icon-edit" size="mini" @@ -57,7 +57,7 @@ @click="handleUpdate" v-hasPermi="['benyi:learndevelopmentfamily:edit']" >修改</el-button - > --> + > <el-button type="danger" icon="el-icon-delete" diff --git a/ruoyi-ui/src/views/benyi/learndevelopmentteacher/index.vue b/ruoyi-ui/src/views/benyi/learndevelopmentteacher/index.vue index 500127915..5f08608f3 100644 --- a/ruoyi-ui/src/views/benyi/learndevelopmentteacher/index.vue +++ b/ruoyi-ui/src/views/benyi/learndevelopmentteacher/index.vue @@ -49,14 +49,14 @@ v-hasPermi="['benyi:learndevelopmentteacher:add']" >新增</el-button > - <!-- <el-button + <el-button type="success" icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['benyi:learndevelopmentteacher:edit']" - >修改</el-button> --> + >修改</el-button> <el-button type="danger" icon="el-icon-delete" diff --git a/ruoyi-ui/src/views/benyi/recruitstudentsnotice/index.vue b/ruoyi-ui/src/views/benyi/recruitstudentsnotice/index.vue index a06e96c55..ffb1bbff6 100644 --- a/ruoyi-ui/src/views/benyi/recruitstudentsnotice/index.vue +++ b/ruoyi-ui/src/views/benyi/recruitstudentsnotice/index.vue @@ -4,9 +4,9 @@ :model="queryParams" ref="queryForm" :inline="true" - label-width="68px" + label-width="90px" > - <el-form-item label="标题" prop="title"> + <el-form-item label="通知书标题" prop="title"> <el-input v-model="queryParams.title" placeholder="请输入标题" @@ -15,7 +15,7 @@ @keyup.enter.native="handleQuery" /> </el-form-item> - <el-form-item label="类型" prop="type"> + <el-form-item label="通知书类型" prop="type"> <el-select v-model="queryParams.type" placeholder="请选择"> <el-option v-for="dict in typeOptions" diff --git a/ruoyi-ui/src/views/benyi/schoolcalendar/index.vue b/ruoyi-ui/src/views/benyi/schoolcalendar/index.vue index 7b689d86b..3ef4ed76b 100644 --- a/ruoyi-ui/src/views/benyi/schoolcalendar/index.vue +++ b/ruoyi-ui/src/views/benyi/schoolcalendar/index.vue @@ -86,14 +86,14 @@ v-hasPermi="['benyi:schoolcalendar:add']" >新增</el-button > - <!-- <el-button + <el-button type="success" icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['benyi:schoolcalendar:edit']" - >修改</el-button> --> + >修改</el-button> <el-button type="danger" icon="el-icon-delete" diff --git a/ruoyi-ui/src/views/benyi_train/lecturer/index.vue b/ruoyi-ui/src/views/benyi_train/lecturer/index.vue index 8416c9d77..62b0514b0 100644 --- a/ruoyi-ui/src/views/benyi_train/lecturer/index.vue +++ b/ruoyi-ui/src/views/benyi_train/lecturer/index.vue @@ -38,7 +38,7 @@ v-hasPermi="['benyi:lecturer:add']" >新增</el-button > - <!-- <el-button + <el-button type="success" icon="el-icon-edit" size="mini" @@ -46,7 +46,7 @@ @click="handleUpdate" v-hasPermi="['benyi:lecturer:edit']" >修改</el-button - > --> + > <el-button type="danger" icon="el-icon-delete" diff --git a/ruoyi-ui/src/views/benyi_train/video/index.vue b/ruoyi-ui/src/views/benyi_train/video/index.vue index ad30c19aa..ea996edd4 100644 --- a/ruoyi-ui/src/views/benyi_train/video/index.vue +++ b/ruoyi-ui/src/views/benyi_train/video/index.vue @@ -61,7 +61,7 @@ v-hasPermi="['benyi:video:add']" >新增</el-button > - <!-- <el-button + <el-button type="success" icon="el-icon-edit" size="mini" @@ -69,7 +69,7 @@ @click="handleUpdate" v-hasPermi="['benyi:video:edit']" >修改</el-button - > --> + > <el-button type="danger" icon="el-icon-delete" diff --git a/ruoyi-ui/src/views/dashboard/RadarChart.vue b/ruoyi-ui/src/views/dashboard/RadarChart.vue index 21b1f8533..4f2c4bfbf 100644 --- a/ruoyi-ui/src/views/dashboard/RadarChart.vue +++ b/ruoyi-ui/src/views/dashboard/RadarChart.vue @@ -98,7 +98,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' @@ -107,7 +107,7 @@ export default { radar: { radius: "66%", center: ["50%", "52%"], - splitNumber: 8, + splitNumber: 12, splitArea: { areaStyle: { color: "rgba(127,95,132,.3)", @@ -170,7 +170,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' @@ -179,7 +179,7 @@ export default { radar: { radius: "66%", center: ["50%", "52%"], - splitNumber: 8, + splitNumber: 10, splitArea: { areaStyle: { color: "rgba(127,95,132,.3)", @@ -242,7 +242,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' diff --git a/ruoyi-ui/src/views/dashboard/RadarChart_jk.vue b/ruoyi-ui/src/views/dashboard/RadarChart_jk.vue index e1556488d..d369b3147 100644 --- a/ruoyi-ui/src/views/dashboard/RadarChart_jk.vue +++ b/ruoyi-ui/src/views/dashboard/RadarChart_jk.vue @@ -128,7 +128,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' @@ -137,7 +137,7 @@ export default { radar: { radius: "66%", center: ["50%", "50%"], - splitNumber: 8, + splitNumber: 12, splitArea: { areaStyle: { color: "rgba(127,95,132,.3)", @@ -194,7 +194,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' @@ -203,7 +203,7 @@ export default { radar: { radius: "66%", center: ["50%", "50%"], - splitNumber: 8, + splitNumber: 10, splitArea: { areaStyle: { color: "rgba(127,95,132,.3)", @@ -260,7 +260,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: 'item', axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' diff --git a/ruoyi-ui/src/views/dashboard/RadarChart_kx.vue b/ruoyi-ui/src/views/dashboard/RadarChart_kx.vue index 2d986a3db..9b3ff42fb 100644 --- a/ruoyi-ui/src/views/dashboard/RadarChart_kx.vue +++ b/ruoyi-ui/src/views/dashboard/RadarChart_kx.vue @@ -128,7 +128,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' @@ -137,7 +137,7 @@ export default { radar: { radius: "66%", center: ["50%", "50%"], - splitNumber: 8, + splitNumber: 12, splitArea: { areaStyle: { color: "rgba(127,95,132,.3)", @@ -194,7 +194,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' @@ -203,7 +203,7 @@ export default { radar: { radius: "66%", center: ["50%", "50%"], - splitNumber: 8, + splitNumber: 10, splitArea: { areaStyle: { color: "rgba(127,95,132,.3)", @@ -260,7 +260,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' diff --git a/ruoyi-ui/src/views/dashboard/RadarChart_sh.vue b/ruoyi-ui/src/views/dashboard/RadarChart_sh.vue index 9aad095dd..aac579470 100644 --- a/ruoyi-ui/src/views/dashboard/RadarChart_sh.vue +++ b/ruoyi-ui/src/views/dashboard/RadarChart_sh.vue @@ -128,7 +128,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' @@ -137,7 +137,7 @@ export default { radar: { radius: "66%", center: ["50%", "50%"], - splitNumber: 8, + splitNumber: 12, splitArea: { areaStyle: { color: "rgba(127,95,132,.3)", @@ -194,7 +194,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' @@ -203,7 +203,7 @@ export default { radar: { radius: "66%", center: ["50%", "50%"], - splitNumber: 8, + splitNumber: 10, splitArea: { areaStyle: { color: "rgba(127,95,132,.3)", @@ -260,7 +260,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' diff --git a/ruoyi-ui/src/views/dashboard/RadarChart_ys.vue b/ruoyi-ui/src/views/dashboard/RadarChart_ys.vue index 95a568dc0..4fa8d1c2c 100644 --- a/ruoyi-ui/src/views/dashboard/RadarChart_ys.vue +++ b/ruoyi-ui/src/views/dashboard/RadarChart_ys.vue @@ -128,7 +128,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' @@ -137,7 +137,7 @@ export default { radar: { radius: "66%", center: ["50%", "50%"], - splitNumber: 8, + splitNumber: 12, splitArea: { areaStyle: { color: "rgba(127,95,132,.3)", @@ -194,7 +194,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' @@ -203,7 +203,7 @@ export default { radar: { radius: "66%", center: ["50%", "50%"], - splitNumber: 8, + splitNumber: 10, splitArea: { areaStyle: { color: "rgba(127,95,132,.3)", @@ -260,7 +260,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' diff --git a/ruoyi-ui/src/views/dashboard/RadarChart_yy.vue b/ruoyi-ui/src/views/dashboard/RadarChart_yy.vue index 4a80d5583..e71e70fa6 100644 --- a/ruoyi-ui/src/views/dashboard/RadarChart_yy.vue +++ b/ruoyi-ui/src/views/dashboard/RadarChart_yy.vue @@ -128,7 +128,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' @@ -137,7 +137,7 @@ export default { radar: { radius: "66%", center: ["50%", "50%"], - splitNumber: 8, + splitNumber: 12, splitArea: { areaStyle: { color: "rgba(127,95,132,.3)", @@ -194,7 +194,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' @@ -203,7 +203,7 @@ export default { radar: { radius: "66%", center: ["50%", "50%"], - splitNumber: 8, + splitNumber: 10, splitArea: { areaStyle: { color: "rgba(127,95,132,.3)", @@ -260,7 +260,7 @@ export default { left: "center", }, tooltip: { - trigger: "axis", + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' diff --git a/ruoyi-ui/src/views/system/class/index.vue b/ruoyi-ui/src/views/system/class/index.vue index 0c83a8aa4..ca5e3dd14 100644 --- a/ruoyi-ui/src/views/system/class/index.vue +++ b/ruoyi-ui/src/views/system/class/index.vue @@ -98,7 +98,7 @@ v-hasPermi="['system:class:add']" >新增</el-button > - <!-- <el-button + <el-button type="success" icon="el-icon-edit" size="mini" @@ -106,7 +106,7 @@ @click="handleUpdate" v-hasPermi="['system:class:edit']" >修改</el-button - > --> + > <el-button type="danger" icon="el-icon-delete" diff --git a/ruoyi-ui/src/views/system/teacher/index.vue b/ruoyi-ui/src/views/system/teacher/index.vue index 2e13eab09..715d6c6ef 100644 --- a/ruoyi-ui/src/views/system/teacher/index.vue +++ b/ruoyi-ui/src/views/system/teacher/index.vue @@ -59,7 +59,7 @@ </el-form> <div class="mb8 btn-list"> - <!-- <el-button + <el-button type="success" icon="el-icon-edit" size="mini" @@ -67,7 +67,7 @@ @click="handleUpdate" v-hasPermi="['system:teacher:edit']" >修改</el-button - > --> + > <el-button type="danger" icon="el-icon-delete" diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index 3e36d15e5..04b92bba1 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -98,7 +98,7 @@ v-hasPermi="['system:user:add']" >新增</el-button > - <!-- <el-button + <el-button type="success" icon="el-icon-edit" size="mini" @@ -106,7 +106,7 @@ @click="handleUpdate" v-hasPermi="['system:user:edit']" >修改</el-button - > --> + > <el-button type="danger" icon="el-icon-delete" diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index c44a309b9..32815c581 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -3,7 +3,7 @@ const path = require('path') const defaultSettings = require('./src/settings.js') function resolve(dir) { - return path.join(__dirname, dir) + return path.join(__dirname, dir) } const name = defaultSettings.title || '本一智慧平台管理系统' // 标题 @@ -14,118 +14,118 @@ const port = process.env.port || process.env.npm_config_port || 80 // 端口 //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions // 这里只列一部分,具体配置参考文档 module.exports = { - // 部署生产环境和开发环境下的URL。 - // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 - // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 - publicPath: process.env.NODE_ENV === "production" ? "/" : "/", - // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) - outputDir: 'dist', - // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) - assetsDir: 'static', - // 是否开启eslint保存检测,有效值:ture | false | 'error' - lintOnSave: process.env.NODE_ENV === 'development', - // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 - productionSourceMap: false, - // webpack-dev-server 相关配置 - devServer: { - host: '127.0.0.1', - port: port, - proxy: { - // detail: https://cli.vuejs.org/config/#devserver-proxy - [process.env.VUE_APP_BASE_API]: { - target: `http://localhost:8083`, - // target: `http://120.53.14.147:9990/`, - changeOrigin: true, - pathRewrite: { - ['^' + process.env.VUE_APP_BASE_API]: '' - } - } - }, - disableHostCheck: true - }, - configureWebpack: { - name: name, - resolve: { - alias: { - '@': resolve('src') - } + // 部署生产环境和开发环境下的URL。 + // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 + // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 + publicPath: process.env.NODE_ENV === "production" ? "/" : "/", + // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) + outputDir: 'dist', + // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) + assetsDir: 'static', + // 是否开启eslint保存检测,有效值:ture | false | 'error' + lintOnSave: process.env.NODE_ENV === 'development', + // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 + productionSourceMap: false, + // webpack-dev-server 相关配置 + devServer: { + host: '127.0.0.1', + port: port, + proxy: { + // detail: https://cli.vuejs.org/config/#devserver-proxy + [process.env.VUE_APP_BASE_API]: { + target: `http://localhost:8083`, + // target: `http://120.53.14.147:9990/`, + changeOrigin: true, + pathRewrite: { + ['^' + process.env.VUE_APP_BASE_API]: '' } + } }, - chainWebpack(config) { - config.plugins.delete('preload') // TODO: need test - config.plugins.delete('prefetch') // TODO: need test - - // set svg-sprite-loader - config.module - .rule('svg') - .exclude.add(resolve('src/assets/icons')) - .end() - config.module - .rule('icons') - .test(/\.svg$/) - .include.add(resolve('src/assets/icons')) - .end() - .use('svg-sprite-loader') - .loader('svg-sprite-loader') - .options({ - symbolId: 'icon-[name]' - }) - .end() - - // set preserveWhitespace - config.module - .rule('vue') - .use('vue-loader') - .loader('vue-loader') - .tap(options => { - options.compilerOptions.preserveWhitespace = true - return options - }) - .end() - - config - // https://webpack.js.org/configuration/devtool/#development - .when(process.env.NODE_ENV === 'development', - config => config.devtool('cheap-source-map') - ) - - config - .when(process.env.NODE_ENV !== 'development', - config => { - config - .plugin('ScriptExtHtmlWebpackPlugin') - .after('html') - .use('script-ext-html-webpack-plugin', [{ - // `runtime` must same as runtimeChunk name. default is `runtime` - inline: /runtime\..*\.js$/ - }]) - .end() - config - .optimization.splitChunks({ - chunks: 'all', - cacheGroups: { - libs: { - name: 'chunk-libs', - test: /[\\/]node_modules[\\/]/, - priority: 10, - chunks: 'initial' // only package third parties that are initially dependent - }, - elementUI: { - name: 'chunk-elementUI', // split elementUI into a single package - priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app - test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm - }, - commons: { - name: 'chunk-commons', - test: resolve('src/components'), // can customize your rules - minChunks: 3, // minimum common number - priority: 5, - reuseExistingChunk: true - } - } - }) - config.optimization.runtimeChunk('single') - } - ) + disableHostCheck: true + }, + configureWebpack: { + name: name, + resolve: { + alias: { + '@': resolve('src') + } } -} \ No newline at end of file + }, + chainWebpack(config) { + config.plugins.delete('preload') // TODO: need test + config.plugins.delete('prefetch') // TODO: need test + + // set svg-sprite-loader + config.module + .rule('svg') + .exclude.add(resolve('src/assets/icons')) + .end() + config.module + .rule('icons') + .test(/\.svg$/) + .include.add(resolve('src/assets/icons')) + .end() + .use('svg-sprite-loader') + .loader('svg-sprite-loader') + .options({ + symbolId: 'icon-[name]' + }) + .end() + + // set preserveWhitespace + config.module + .rule('vue') + .use('vue-loader') + .loader('vue-loader') + .tap(options => { + options.compilerOptions.preserveWhitespace = true + return options + }) + .end() + + config + // https://webpack.js.org/configuration/devtool/#development + .when(process.env.NODE_ENV === 'development', + config => config.devtool('cheap-source-map') + ) + + config + .when(process.env.NODE_ENV !== 'development', + config => { + config + .plugin('ScriptExtHtmlWebpackPlugin') + .after('html') + .use('script-ext-html-webpack-plugin', [{ + // `runtime` must same as runtimeChunk name. default is `runtime` + inline: /runtime\..*\.js$/ + }]) + .end() + config + .optimization.splitChunks({ + chunks: 'all', + cacheGroups: { + libs: { + name: 'chunk-libs', + test: /[\\/]node_modules[\\/]/, + priority: 10, + chunks: 'initial' // only package third parties that are initially dependent + }, + elementUI: { + name: 'chunk-elementUI', // split elementUI into a single package + priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app + test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm + }, + commons: { + name: 'chunk-commons', + test: resolve('src/components'), // can customize your rules + minChunks: 3, // minimum common number + priority: 5, + reuseExistingChunk: true + } + } + }) + config.optimization.runtimeChunk('single') + } + ) + } +}