pull/370/head
xiaojunnuo 2025-04-12 01:48:08 +08:00
parent d0d9d68fe6
commit b506bd15a5
2 changed files with 11 additions and 4 deletions

View File

@ -119,12 +119,15 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
form: { form: {
order: 0, order: 0,
rules: [{ required: true }], rules: [{ required: true }],
},
editForm: {
component: { component: {
disabled: true, disabled: true,
}, },
}, },
addForm: {
component: {
disabled: false,
},
},
dict: dict({ dict: dict({
data: [ data: [
{ label: "授权", value: "access" }, { label: "授权", value: "access" },

View File

@ -4,7 +4,10 @@
<div class="title"> <div class="title">
插件编辑 插件编辑
<span class="sub"> <span class="sub">
<span class="name">{{ plugin.title }} {{ plugin.author }}/{{ plugin.name }} </span> <span class="name">
<a-tag color="green">{{ plugin.title }}</a-tag>
{{ plugin.author }}/{{ plugin.name }}
</span>
</span> </span>
</div> </div>
<div class="more"> <div class="more">
@ -49,7 +52,6 @@ import createCrudOptions from "./crud";
import { useColumns } from "@fast-crud/fast-crud"; import { useColumns } from "@fast-crud/fast-crud";
import yaml from "js-yaml"; import yaml from "js-yaml";
const CertApplyPluginNames = ["CertApply", "CertApplyLego", "CertApplyUpload"];
defineOptions({ defineOptions({
name: "SysPluginEdit", name: "SysPluginEdit",
}); });
@ -60,6 +62,7 @@ const formOptionsRef: Ref = ref();
const baseFormRef: Ref = ref({}); const baseFormRef: Ref = ref({});
function initFormOptions() { function initFormOptions() {
const formCrudOptions = createCrudOptions({ const formCrudOptions = createCrudOptions({
//@ts-ignore
crudExpose: {}, crudExpose: {},
context: {}, context: {},
}); });
@ -68,6 +71,7 @@ function initFormOptions() {
const formOptions = buildFormOptions(formCrudOptions.crudOptions, {}); const formOptions = buildFormOptions(formCrudOptions.crudOptions, {});
formOptions.mode = "edit";
formOptions.col = { formOptions.col = {
span: 24, span: 24,
}; };