You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.2 KiB
1.2 KiB
title | description |
---|---|
插件数据列表操作菜单 | 扩展插件数据列表操作菜单 - plugin:list-item:operation:create |
此扩展点用于扩展插件数据列表的操作菜单项。
定义方式
export default definePlugin({
extensionPoints: {
"plugin:list-item:operation:create": (
plugin: Ref<Plugin>
): OperationItem<Plugin>[] | Promise<OperationItem<Plugin>[]> => {
return [
{
priority: 10,
component: markRaw(VDropdownItem),
props: {},
action: (item?: Plugin) => {
// do something
},
label: "foo",
hidden: false,
permissions: [],
children: [],
},
];
},
},
});
import OperationItem from "./interface/OperationItem.md";
<OperationItem />
实现案例
类型定义
Plugin
import Plugin from "./interface/Plugin.md";
<Plugin />