mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
perf: 插件贡献文档及示例
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import { IsAccess, AccessInput } from "@certd/pipeline";
|
||||
|
||||
/**
|
||||
* 这个注解将注册一个授权配置
|
||||
* 在certd的后台管理系统中,用户可以选择添加此类型的授权
|
||||
*/
|
||||
@IsAccess({
|
||||
name: "demo",
|
||||
title: "授权插件示例",
|
||||
desc: "",
|
||||
})
|
||||
export class DemoAccess {
|
||||
/**
|
||||
* 授权属性配置
|
||||
*/
|
||||
@AccessInput({
|
||||
title: "密钥Id",
|
||||
component: {
|
||||
placeholder: "demoKeyId",
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
demoKeyId = "";
|
||||
|
||||
/**
|
||||
* 授权属性配置
|
||||
*/
|
||||
@AccessInput({
|
||||
//标题
|
||||
title: "密钥串",
|
||||
component: {
|
||||
//input组件的placeholder
|
||||
placeholder: "demoKeySecret",
|
||||
},
|
||||
//是否必填
|
||||
required: true,
|
||||
})
|
||||
//属性名称
|
||||
demoKeySecret = "";
|
||||
}
|
||||
|
||||
new DemoAccess();
|
||||
Reference in New Issue
Block a user