html
<component :is="renderSubCom"></component>
js
import { TheTable, TheList } from './components'
export default {
name: 'SystermManager',
components: {
ContentContainer,
RightToLeft,
TheTable,
TheList,
},
data () {
return {
size: true,
renderSub: true,
}
},
computed: {
renderSubCom () {
return this.size === true ? 'TheTable' : 'TheList'
},
},
methods: {
showChild (e) {
if (e.target.value === 'table') {
this.size = true
} else {
this.size = false
}
},
},
}