Skip to content

Commit

Permalink
[Improve] upload-page drawer layout improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfboys committed Sep 18, 2024
1 parent f97a45b commit bf2503c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@
<SvgIcon name="resource" />
{{ getTitle }}
</template>
<BasicForm @register="registerForm" :schemas="getResourceFormSchema">
<template #resource="{ model, field }">
<Upload ref="resourceRef" v-model:value="model[field]" :form-model="model" />
</template>
</BasicForm>
<div class="mt-3">
<BasicForm @register="registerForm" :schemas="getResourceFormSchema">
<template #resource="{ model, field }">
<Upload ref="resourceRef" v-model:value="model[field]" :form-model="model" />
</template>
</BasicForm>
</div>
</BasicDrawer>
</template>
<script lang="ts">
Expand Down Expand Up @@ -146,12 +148,11 @@
});
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
name: 'ResourceForm',
colon: true,
layout: 'vertical',
name: 'upload_form',
baseColProps: { span: 22, offset: 1 },
showActionButtonGroup: false,
baseColProps: { span: 24 },
labelCol: { lg: { span: 5, offset: 0 }, sm: { span: 7, offset: 0 } },
wrapperCol: { lg: { span: 16, offset: 0 }, sm: { span: 17, offset: 0 } },
});
const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
layout: 'vertical',
name: 'role_form',
baseColProps: { span: 20, offset: 2 },
baseColProps: { span: 22, offset: 1 },
colon: true,
showActionButtonGroup: false,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
schemas: formSchema(unref(formType)),
showActionButtonGroup: false,
layout: 'vertical',
baseColProps: { span: 20, offset: 2 },
baseColProps: { span: 22, offset: 1 },
});
const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
Expand Down

0 comments on commit bf2503c

Please sign in to comment.