【add】我的收藏代码迁移

This commit is contained in:
fengchenchen
2023-08-18 10:47:11 +08:00
parent 9f86c9bbb7
commit b6c91bd17e
18 changed files with 2494 additions and 14 deletions
@@ -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>