mirror of
https://github.com/certd/certd.git
synced 2026-05-16 05:07:32 +08:00
chore: 新增插件额外配置功能
- 在插件管理中添加 extra 字段,用于存储额外配置信息 - 实现插件编辑页面的额外配置编辑功能 - 更新数据库结构,增加 extra 列 - 优化代码编辑器的导入方式 - 更新 fast-crud 相关包版本
This commit is contained in:
@@ -6,6 +6,8 @@ import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq,
|
||||
import { useUserStore } from "/src/store/modules/user";
|
||||
import { useSettingStore } from "/src/store/modules/settings";
|
||||
import { Modal } from "ant-design-vue";
|
||||
//@ts-ignore
|
||||
import yaml from "js-yaml";
|
||||
|
||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||
const router = useRouter();
|
||||
@@ -277,7 +279,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
},
|
||||
},
|
||||
},
|
||||
"default.strategy.runStrategy": {
|
||||
"extra.default.strategy.runStrategy": {
|
||||
title: "运行策略",
|
||||
type: "dict-select",
|
||||
|
||||
@@ -299,6 +301,16 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
color: "auto",
|
||||
},
|
||||
},
|
||||
valueBuilder({ row }) {
|
||||
if (row.extra) {
|
||||
row.extra = yaml.load(row.extra);
|
||||
}
|
||||
},
|
||||
valueResolve({ row }) {
|
||||
if (row.extra) {
|
||||
row.extra = yaml.dump(row.extra);
|
||||
}
|
||||
},
|
||||
},
|
||||
disabled: {
|
||||
title: "点击禁用/启用",
|
||||
|
||||
Reference in New Issue
Block a user