From 2959acf35dbe85c5b92e3b29e45f306a7bccf2c3 Mon Sep 17 00:00:00 2001 From: wj <1285151836@qq.com> Date: Mon, 20 Nov 2023 10:34:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 16 ++++++++-------- src/store/modules/permission.js | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main.js b/src/main.js index e0ac8ac..aa7414b 100644 --- a/src/main.js +++ b/src/main.js @@ -105,14 +105,14 @@ Element.DatePicker.props.firstDayOfWeek = {type: Number, default: 1} Element.Select.methods.deleteSelected = function deleteSelected(event) { - event.stopPropagation(); - // 改动在这,原始的是这样 var value = this.multiple ? [] : ''; - var value = this.multiple ? [] : null; - this.$emit("input", value); - this.emitChange(value); - this.visible = false; - this.$emit("clear"); - }; + event.stopPropagation() + // 改动在这,原始的是这样 var value = this.multiple ? [] : '' + var value = this.multiple ? [] : null + this.$emit("input", value) + this.emitChange(value) + this.visible = false + this.$emit("clear") + } Vue.use(Element, { size: Cookies.get('size') || 'mini' // set element-ui default size diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index acf853a..521d96d 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -123,11 +123,11 @@ export function filterDynamicRoutes(routes) { export const loadView = (view) => { if (process.env.NODE_ENV === 'development') { - return (resolve) => require([`@/views/${view}`], resolve) + return (resolve) => require([`@/views/${view}.vue`], resolve) } else { // 使用 import 实现生产环境的路由懒加载 // return () => import(`@/views/${view}`) - return (resolve) => require([`@/views/${view}`], resolve) + return (resolve) => require([`@/views/${view}.vue`], resolve) } }