创建directive.js指令,通过v-loading把loading组件动态插入recommend.vue
在main.js引入指令
import loadingDirective from './components/base/loading/directive'
recommend.vue中添加计算属性computed: { loading() { return !this.sliders.length && !this.albums.length } },
创建directive.js指令,通过v-loading把loading组件动态插入recommend.vue
在main.js引入指令
import loadingDirective from './components/base/loading/directive'
recommend.vue中添加计算属性computed: { loading() { return !this.sliders.length && !this.albums.length } },