vue 有条件加载组件 执行某方法后再渲染组件

<component :is="currentCom"></component>
 
import Grid from './component/grid';
 
methods: {
  condiation () {
    // ....some code
    this.currentCom = Grid
  }
}
 
currentCom就是你引入的组件 
posted @ 2019-06-21 16:55  Mr_R  阅读(3524)  评论(0编辑  收藏  举报