Browse Source

feat: 通用表单组件上下间距调整

master
AaronWu 1 month ago
parent
commit
e6467f428b
  1. 1
      src/components/core/schema-form/src/schema-form-item.vue
  2. 2
      src/views/client/issue/index.vue
  3. 6
      src/views/question/issue/formSchemas.tsx

1
src/components/core/schema-form/src/schema-form-item.vue

@ -11,6 +11,7 @@
:label-col="itemLabelWidthProp.labelCol"
:wrapper-col="itemLabelWidthProp.wrapperCol"
:rules="getRules"
class="!mb-[14px]"
>
<slot v-if="schema.slot" :name="schema.slot" v-bind="getValues"> </slot>
<component

2
src/views/client/issue/index.vue

@ -167,7 +167,7 @@
const [SchemaForm, formRef] = useForm({
labelWidth: 100,
labelAlign: 'right',
schemas: getEditFormSchema(curRow.value),
schemas: getEditFormSchema(curRow.value, false, true),
showActionButtonGroup: false,
actionColOptions: {
span: 24,

6
src/views/question/issue/formSchemas.tsx

@ -14,7 +14,8 @@ const questionTypeList = await getDictionaryByTypeName(DictEnum.QUESTION_TYPE);
export const getEditFormSchema: (
row?: Partial<TableListItem>,
isDetail?: boolean,
) => FormSchema[] = (record = {}, isDetail = false) => {
isClient?: boolean,
) => FormSchema[] = (record = {}, isDetail = false, isClient = false) => {
console.log('questionTypeList: ', questionTypeList);
return [
@ -194,6 +195,7 @@ export const getEditFormSchema: (
colProps: {
span: 6,
},
},
{
field: 'zentaoNos',
@ -202,6 +204,7 @@ export const getEditFormSchema: (
colProps: {
span: 6,
},
vIf: () => !isClient,
},
{
@ -216,6 +219,7 @@ export const getEditFormSchema: (
options: stateTypeList,
disabled: true,
},
vIf: () => !isClient,
rules: [{ required: true, type: 'number' }],
},

Loading…
Cancel
Save