From 9a0d0e596c6d22afa04b3705cb48f04c98197f92 Mon Sep 17 00:00:00 2001 From: zer0Black Date: Fri, 30 Jun 2023 10:58:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=B6=88=E6=81=AF=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E5=8F=82=E6=95=B0=E4=BC=A0=E9=80=92=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/package.json | 2 +- jero-web/src/components/tools/DynamicNotice.vue | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/jero-web/package.json b/jero-web/package.json index a8c88d53..148c0ee3 100644 --- a/jero-web/package.json +++ b/jero-web/package.json @@ -57,7 +57,7 @@ "@vue/cli-plugin-eslint": "~4.2.3", "@vue/cli-service": "^3.3.0", "@vue/eslint-config-standard": "^5.1.0", - "babel-eslint": "^10.0.3", + "babel-eslint": "7.2.3", "compression-webpack-plugin": "^3.1.0", "eslint": "^6.7.2", "eslint-plugin-import": "^2.20.1", diff --git a/jero-web/src/components/tools/DynamicNotice.vue b/jero-web/src/components/tools/DynamicNotice.vue index ddd89123..9d63c843 100644 --- a/jero-web/src/components/tools/DynamicNotice.vue +++ b/jero-web/src/components/tools/DynamicNotice.vue @@ -15,17 +15,22 @@ export default { } }, computed: { - comp: resolve => require([`@/views/${this.path}.vue`], resolve) + comp: function () { + if(!this.path){ + return null; + } + return () => import(`@/views/${this.path}.vue`) + } }, - props: ['path', 'formData'], + props: ['path','formData'], methods: { detail () { setTimeout(() => { - if (this.path) { - this.$refs.compModel.view(this.formData) + if(this.path){ + this.$refs.compModel.view(this.formData); } }, 200) - } + }, } }