【add】我的收藏代码迁移
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
<!--我的收藏-->
|
||||
<template>
|
||||
<div class="collection">
|
||||
<a-card :bordered="false">
|
||||
<a-spin :spinning="spinning">
|
||||
<a-tabs :default-active-key="1" @change="callbackTab">
|
||||
<a-tab-pane v-for='item in tabArr' :key="item.value" :tab="item.showText">
|
||||
<component :is='item.comp' :type='item.value' :property="item.props"></component>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-spin>
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CollectionDocumentLibraryList from './pages/CollectionDocumentLibraryList'
|
||||
import CollectionKnowledgeShareList from './pages/CollectionKnowledgeShareList'
|
||||
|
||||
export default {
|
||||
name: 'MyCollection',
|
||||
components: {
|
||||
CollectionDocumentLibraryList,
|
||||
CollectionKnowledgeShareList
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
spinning: false,
|
||||
tabArr: [
|
||||
{ name: '文档库', showText: this.$t('personalCenter.collection.documentLibrary'), value: 1, comp: CollectionDocumentLibraryList },
|
||||
{ name: '知识分享', showText: this.$t('personalCenter.collection.problemKnowledgeBase'), value: 2, comp: CollectionKnowledgeShareList }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 标签项管理tab切换
|
||||
callbackTab (value) {
|
||||
this.key = value
|
||||
this.spinning = true
|
||||
setTimeout(() => {
|
||||
this.spinning = false
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user