Files
2026-08-12 08:57:35 +08:00

40 lines
1.3 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<business-page-layout title="功能" :show-tabbar="true" :tab-index="1">
<workbench-features ref="features" :api="featuresApi"></workbench-features>
</business-page-layout>
</template>
<script>
/**
* 平台管理员端「功能」tab 薄壳页
* 壳页只负责:套本端 layoutnavbar/tabbar 配置)+ 注入本端角色接口,
* 搜索/分组滑动/长按收藏/使用上报等全部逻辑在主包共享组件 workbench-features四端复用
*/
import BusinessPageLayout from '@/subPackages/sub_platform_admin/components/business-page-layout.vue'
import {
getPlatformAdminWorkbenchEntries,
getPlatformAdminEntryUserData,
togglePlatformAdminFavoriteEntry,
reportPlatformAdminEntryUsage,
} from '@/api/platformAdmin.js'
export default {
components: { BusinessPageLayout },
data() {
return {
/** 注入共享组件的本端接口集合(统一返回 { res, data, ok } */
featuresApi: {
getEntries: getPlatformAdminWorkbenchEntries,
getUserData: getPlatformAdminEntryUserData,
toggleFavorite: togglePlatformAdminFavoriteEntry,
reportUsage: reportPlatformAdminEntryUsage,
},
}
},
onShow() {
// 从功能跳转的页面返回时刷新常用/最近使用(首屏加载由组件自身 mounted 完成,此时 ref 还不存在)
if (this.$refs.features) this.$refs.features.refreshUserData()
},
}
</script>