mirror of
https://github.com/halo-dev/halo.git
synced 2025-12-20 16:44:38 +08:00
#### What type of PR is this? /area ui /kind api-change /milestone 2.22.x #### What this PR does / why we need it: See #7925 #### Which issue(s) this PR fixes: Fixes #7925 #### Special notes for your reviewer: #### Does this PR introduce a user-facing change? ```release-note 将 `@halo-dev/console-shared` 重命名为 `@halo-dev/ui-shared` ```
884 B
884 B
备份页面选项卡扩展点
原由
在 Halo 2.8 中提供了基础备份和恢复的功能,此扩展点是为了提供给插件开发者针对备份扩展更多功能,比如定时备份设置、备份到第三方云存储等。
定义方式
import { definePlugin } from "@halo-dev/ui-shared";
import BackupStorage from "@/views/BackupStorage.vue";
import { markRaw } from "vue";
export default definePlugin({
components: {},
routes: [],
extensionPoints: {
"backup:tabs:create": () => {
return [
{
id: "storage",
label: "备份位置",
component: markRaw(BackupStorage),
},
];
},
},
});
BackupTab 类型:
import type { Component, Raw } from "vue";
export interface BackupTab {
id: string;
label: string;
component: Raw<Component>;
permissions?: string[];
}