| 123456789101112131415161718192021222324252627282930313233343536 |
- <template>
- <div class="inline-16">
- <component :is="formComponent" @onSuccess="onSuccess"></component>
- </div>
- </template>
- <script>
- export default {
- props:['formPath','oldFormPath'],
- data () {
- return {
- }
- },
- computed:{
- formComponent(){
- if (this.oldFormPath) {
- console.log(this.oldFormPath)
- return ()=>import(`@/${this.oldFormPath.add}/add.vue`)
- } else {
- return ()=>import(`@/Form/${this.formPath}/add.vue`)
- }
- }
- },
- methods:{
- onSuccess () {
- this.$emit('onAddSuccess')
- }
- },
- mounted () {
-
- }
- }
- </script>
- <style>
- </style>
|