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) } }