动态消息模块的参数传递为空处理

This commit is contained in:
zer0Black
2023-06-30 10:58:00 +08:00
parent 575870fb9f
commit 9a0d0e596c
2 changed files with 11 additions and 6 deletions
+1 -1
View File
@@ -57,7 +57,7 @@
"@vue/cli-plugin-eslint": "~4.2.3", "@vue/cli-plugin-eslint": "~4.2.3",
"@vue/cli-service": "^3.3.0", "@vue/cli-service": "^3.3.0",
"@vue/eslint-config-standard": "^5.1.0", "@vue/eslint-config-standard": "^5.1.0",
"babel-eslint": "^10.0.3", "babel-eslint": "7.2.3",
"compression-webpack-plugin": "^3.1.0", "compression-webpack-plugin": "^3.1.0",
"eslint": "^6.7.2", "eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.1", "eslint-plugin-import": "^2.20.1",
@@ -15,17 +15,22 @@ export default {
} }
}, },
computed: { 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: { methods: {
detail () { detail () {
setTimeout(() => { setTimeout(() => {
if (this.path) { if(this.path){
this.$refs.compModel.view(this.formData) this.$refs.compModel.view(this.formData);
} }
}, 200) }, 200)
} },
} }
} }
</script> </script>