generated from halo-dev/plugin-starter
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65872c9
commit 9730774
Showing
7 changed files
with
125 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,22 @@ | ||
import { definePlugin } from "@halo-dev/console-shared"; | ||
import {definePlugin, type EditorProvider} from "@halo-dev/console-shared"; | ||
import HomeView from "./views/HomeView.vue"; | ||
import { IconPlug } from "@halo-dev/components"; | ||
import logo from "./assets/vditor.png" | ||
import { markRaw } from "vue"; | ||
|
||
export default definePlugin({ | ||
components: {}, | ||
routes: [ | ||
{ | ||
parentName: "Root", | ||
route: { | ||
path: "/example", | ||
name: "Example", | ||
component: HomeView, | ||
meta: { | ||
title: "示例页面", | ||
searchable: true, | ||
menu: { | ||
name: "示例页面", | ||
group: "示例分组", | ||
icon: markRaw(IconPlug), | ||
priority: 0, | ||
}, | ||
extensionPoints: { | ||
"editor:create": (): EditorProvider[] => { | ||
return [ | ||
{ | ||
name: "Vditor", | ||
displayName: "Vditor Markdown", | ||
// @ts-ignore | ||
component: HomeView, | ||
rawType: "markdown", | ||
logo: logo | ||
}, | ||
}, | ||
]; | ||
}, | ||
], | ||
extensionPoints: {}, | ||
}, | ||
}); |
Oops, something went wrong.