From 007c3658c691878020beb49b519d8e13b5fe6378 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Tue, 31 Mar 2020 16:54:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9C=AC=E5=9C=B0=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 24 +++++++++++-------- src/i18n/langs/en/index.js | 7 +++--- src/i18n/langs/zh/index.js | 7 +++--- src/layout/components/Entry.vue | 3 ++- src/main.js | 10 ++++---- src/router/index_HYD.js | 16 ++++++------- src/store/index.js | 4 ++-- src/views/newMap/displayNew/menuSchema.vue | 2 +- .../newMap/jlmapNew/pendant/switchStation.vue | 2 +- vue.config.js | 16 ++++++------- 10 files changed, 50 insertions(+), 41 deletions(-) diff --git a/public/index.html b/public/index.html index 006750293..c5a546f5b 100644 --- a/public/index.html +++ b/public/index.html @@ -6,19 +6,23 @@ - - +
今天是周末
+ + + + + + + + + + + <% } %> diff --git a/src/i18n/langs/en/index.js b/src/i18n/langs/en/index.js index edfbe50bb..dcce3bf53 100644 --- a/src/i18n/langs/en/index.js +++ b/src/i18n/langs/en/index.js @@ -1,5 +1,5 @@ -// import enLocale from 'element-ui/lib/locale/lang/en'; -import ELEMENT from 'element-ui'; +import enLocale from 'element-ui/lib/locale/lang/en'; +// import ELEMENT from 'element-ui'; import map from './map'; import global from './global'; import router from './router'; @@ -31,7 +31,8 @@ import login from './login'; import designPlatform from './designPlatform'; export default { - ...ELEMENT.lang.en, + // ...ELEMENT.lang.en, + enLocale, map, global, router, diff --git a/src/i18n/langs/zh/index.js b/src/i18n/langs/zh/index.js index 14bb3e3ad..94e7b8a5f 100644 --- a/src/i18n/langs/zh/index.js +++ b/src/i18n/langs/zh/index.js @@ -1,5 +1,5 @@ -// import cnLocale from 'element-ui/lib/locale/lang/zh-CN'; -import ELEMENT from 'element-ui'; +import cnLocale from 'element-ui/lib/locale/lang/zh-CN'; +// import ELEMENT from 'element-ui'; import map from './map'; import global from './global'; import router from './router'; @@ -31,7 +31,8 @@ import login from './login'; import designPlatform from './designPlatform'; export default { - ...ELEMENT.lang.zhCN, + // ...ELEMENT.lang.zhCN, + cnLocale, map, global, router, diff --git a/src/layout/components/Entry.vue b/src/layout/components/Entry.vue index 198fe58d3..9d25c3f2e 100644 --- a/src/layout/components/Entry.vue +++ b/src/layout/components/Entry.vue @@ -57,7 +57,7 @@ export default { }, { name: 'global.caseShow', - // handle: this.goToCaseShow, + handle: this.goEmpty, isHelp:true, style:'padding-right:0px;', hidden:getSessionStorage('project').endsWith('hyd') @@ -134,6 +134,7 @@ export default { const href = 'https://joylink.club/helps/help1.pdf'; window.open(href, '_blank'); }, + goEmpty() {}, goToCaseShow() { const href = 'https://joylink.club/helps/西安铁路职业技术学院.pdf'; window.open(href, '_blank'); diff --git a/src/main.js b/src/main.js index 5459a0b5f..1111bc0cd 100644 --- a/src/main.js +++ b/src/main.js @@ -1,8 +1,10 @@ import Vue from 'vue'; import 'normalize.css/normalize.css'; // A modern alternative to CSS resets -import ELEMENT from 'element-ui'; - +// import ELEMENT from 'element-ui'; +import ElementUI from 'element-ui'; +import ElementLocale from 'element-ui/lib/locale'; +import 'element-ui/lib/theme-chalk/index.css'; import '@/styles/index.scss'; // global css import LangStorage from '@/utils/lang'; @@ -27,7 +29,7 @@ import '@/directive/quickMenuDrag/index.js'; import '@/directive/waves/index.js'; import messages from '@/i18n/index'; -Vue.use(ELEMENT); +Vue.use(ElementUI); Vue.use(VueI18n); Vue.config.devtools = true; // 开发环境显示vue控制台 Vue.config.productionTip = false; @@ -37,7 +39,7 @@ export const i18n = new VueI18n({ messages }); -ELEMENT.i18n((key, value) => i18n.t(key, value)); +ElementLocale.i18n((key, value) => i18n.t(key, value)); new Vue({ el: '#app', diff --git a/src/router/index_HYD.js b/src/router/index_HYD.js index 77ffc19e9..f886326a0 100644 --- a/src/router/index_HYD.js +++ b/src/router/index_HYD.js @@ -1,8 +1,8 @@ -// import Vue from 'vue'; -import Router from 'vue-router'; +import Vue from 'vue'; +import VueRouter from 'vue-router'; // import VueRouter from 'vue-router'; -// Vue.use(Router); +Vue.use(VueRouter); /* Layout */ const Layout = () => import('@/layout'); @@ -867,7 +867,7 @@ export const asyncRouter = [ } ]; -const createRouter = () => new Router({ +const createRouter = () => new VueRouter({ mode: 'history', // require service support scrollBehavior: () => ({ y: 0 }), routes: constantRoutes @@ -882,9 +882,9 @@ router.beforeEach((to, from, next) => { }); // 兼容 vue-router在3.1.0版本以上的路由跳转使用的是 promise 的方式 -const originalPush = Router.prototype.push; -Router.prototype.push = function push(location) { - return originalPush.call(this, location).catch(err => err); -}; +// const originalPush = VueRouter.prototype.push; +// VueRouter.prototype.push = function push(location) { +// return originalPush.call(this, location).catch(err => err); +// }; export default router; diff --git a/src/store/index.js b/src/store/index.js index a994e562f..3d4220bed 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,4 +1,4 @@ -// import Vue from 'vue'; +import Vue from 'vue'; import Vuex from 'vuex'; import app from './modules/app'; import settings from './modules/settings'; @@ -19,7 +19,7 @@ import iscs from './modules/iscs'; import getters from './getters'; -// Vue.use(Vuex); +Vue.use(Vuex); const store = new Vuex.Store({ modules: { diff --git a/src/views/newMap/displayNew/menuSchema.vue b/src/views/newMap/displayNew/menuSchema.vue index 4ee53e07e..db1df16b0 100644 --- a/src/views/newMap/displayNew/menuSchema.vue +++ b/src/views/newMap/displayNew/menuSchema.vue @@ -64,7 +64,7 @@ export default { } }, stationList: { - type: Object, + type: Array, default() { return []; } diff --git a/src/views/newMap/jlmapNew/pendant/switchStation.vue b/src/views/newMap/jlmapNew/pendant/switchStation.vue index 7924a4084..99fa14001 100644 --- a/src/views/newMap/jlmapNew/pendant/switchStation.vue +++ b/src/views/newMap/jlmapNew/pendant/switchStation.vue @@ -10,7 +10,7 @@ export default { name: 'SwitchStation', props: { concentrationStationList: { - type: String, + type: Array, default() { return []; } diff --git a/vue.config.js b/vue.config.js index 561d92480..28254dffc 100644 --- a/vue.config.js +++ b/vue.config.js @@ -94,8 +94,8 @@ module.exports = { } }; // var appTarget = 'Common'; - // var appTarget = 'HYD';// 哈尔滨项目打包 - var appTarget = process.env.NODE_ENV === 'Local' ? 'HYD' : 'Common'; + var appTarget = 'HYD';// 哈尔滨项目打包 + // var appTarget = process.env.NODE_ENV === 'Local' ? 'HYD' : 'Common'; config.plugins.push(new webpack.NormalModuleReplacementPlugin(/(.*)_APP_TARGET(\.*)/, function (resourse) { resourse.request = resourse.request.replace(/APP_TARGET/, `${appTarget}`); @@ -110,12 +110,12 @@ module.exports = { ])); config.externals = { // 配置使用CDN - 'vue': 'Vue', - 'vuex': 'Vuex', - 'vue-router': 'VueRouter', - 'nprogress': 'NProgress', - 'echarts': 'echarts', - 'element-ui': 'ELEMENT' + // 'vue': 'Vue', + // 'vuex': 'Vuex', + // 'vue-router': 'VueRouter', + // 'nprogress': 'NProgress', + // 'echarts': 'echarts', + // 'element-ui': 'ELEMENT' }; },