mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-08 17:12:28 +08:00
jeecg-boot 2.0 模块开发版本发布
This commit is contained in:
35
ant-design-jeecg-vue/src/components/bpm/DynamicComponent.vue
Normal file
35
ant-design-jeecg-vue/src/components/bpm/DynamicComponent.vue
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
<template>
|
||||
<component ref="compModel" :is="comp" :formData="formData" v-if="comp" @ok="callBackOk" @close="callBackClose"></component>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'DynamicComponent',
|
||||
data () {
|
||||
return {
|
||||
compName: this.path
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
comp: function () {
|
||||
return () => import(`@/views/${this.compName}.vue`)
|
||||
}
|
||||
},
|
||||
props: ['path','formData'],
|
||||
methods: {
|
||||
add () {
|
||||
this.$refs.compModel.add();
|
||||
},
|
||||
callBackClose () {
|
||||
this.$emit('close');
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.compModel.handleOk();
|
||||
},
|
||||
callBackOk(){
|
||||
this.$emit('ok');
|
||||
this.close();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user