mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
perf: 任务配置不需要的字段可以自动隐藏
This commit is contained in:
@@ -34,6 +34,7 @@ export class DemoAccess implements IAccess {
|
||||
},
|
||||
//是否必填
|
||||
required: true,
|
||||
//改属性是否需要加密
|
||||
encrypt: true,
|
||||
})
|
||||
//属性名称
|
||||
|
||||
@@ -10,16 +10,81 @@ import { IsAccess, AccessInput } from '@certd/pipeline';
|
||||
desc: '',
|
||||
})
|
||||
export class WestAccess {
|
||||
/**
|
||||
* 授权属性配置
|
||||
*/
|
||||
@AccessInput({
|
||||
title: '权限范围',
|
||||
component: {
|
||||
name: 'a-select',
|
||||
vModel: 'value',
|
||||
options: [
|
||||
{ value: 'account', label: '账户级别,对所有域名都有权限管理' },
|
||||
{ value: 'domain', label: '域名级别,仅能管理单个域名' },
|
||||
],
|
||||
},
|
||||
helper: '选择权限范围',
|
||||
required: true,
|
||||
})
|
||||
scope = '';
|
||||
|
||||
/**
|
||||
* 授权属性配置
|
||||
*/
|
||||
@AccessInput({
|
||||
title: '账号',
|
||||
helper: '你的登录账号',
|
||||
encrypt: false,
|
||||
required: false,
|
||||
mergeScript: `
|
||||
return {
|
||||
show:ctx.compute(({form})=>{
|
||||
return form.access.scope === 'account'
|
||||
})
|
||||
}
|
||||
`,
|
||||
})
|
||||
username = '';
|
||||
|
||||
/**
|
||||
* 授权属性配置
|
||||
*/
|
||||
@AccessInput({
|
||||
title: 'ApiKey',
|
||||
component: {
|
||||
placeholder: 'apidomainkey',
|
||||
placeholder: '账户级别的key,对整个账户都有管理权限',
|
||||
},
|
||||
helper:'前往https://www.west.cn/manager/domain/ 进入对应域名管理页面,上方点击ApiKey获取密钥',
|
||||
required: true,
|
||||
helper: '账户级别的key,对整个账户都有管理权限\n前往https://www.west.cn/manager/API/APIconfig.asp,手动设置“api连接密码”',
|
||||
encrypt: true,
|
||||
required: false,
|
||||
mergeScript: `
|
||||
return {
|
||||
show:ctx.compute(({form})=>{
|
||||
return form.access.scope === 'account'
|
||||
})
|
||||
}
|
||||
`,
|
||||
})
|
||||
apikey = '';
|
||||
|
||||
/**
|
||||
* 授权属性配置
|
||||
*/
|
||||
@AccessInput({
|
||||
title: 'apidomainkey',
|
||||
component: {
|
||||
placeholder: '域名级别的key,仅对单个域名有权限',
|
||||
},
|
||||
helper: '域名级别的key,仅对单个域名有权限。 \n前往[西部数据域名管理](https://www.west.cn/manager/domain/),点击域名,右上方点击ApiKey获取密钥',
|
||||
encrypt: true,
|
||||
required: false,
|
||||
mergeScript: `
|
||||
return {
|
||||
show:ctx.compute(({form})=>{
|
||||
return form.access.scope === 'domain'
|
||||
})
|
||||
}
|
||||
`,
|
||||
})
|
||||
apidomainkey = '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user