mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
style(baTable):CRUD生成的表单在小屏设备上的样式优化
This commit is contained in:
parent
ddfb9991e6
commit
dfd14f8c88
@ -17,7 +17,7 @@
|
||||
<div
|
||||
class="ba-operate-form"
|
||||
:class="'ba-' + baTable.form.operate + '-form'"
|
||||
:style="'width: calc(100% - ' + baTable.form.labelWidth! / 2 + 'px)'"
|
||||
:style="config.layout.shrink ? '':'width: calc(100% - ' + baTable.form.labelWidth! / 2 + 'px)'"
|
||||
>
|
||||
<el-form
|
||||
v-if="!baTable.form.loading"
|
||||
@ -25,7 +25,7 @@
|
||||
@submit.prevent=""
|
||||
@keyup.enter="baTable.onSubmit(formRef)"
|
||||
:model="baTable.form.items"
|
||||
label-position="right"
|
||||
:label-position="config.layout.shrink ? 'top' : 'right'"
|
||||
:label-width="baTable.form.labelWidth + 'px'"
|
||||
:rules="rules"
|
||||
>{%formFields%}
|
||||
@ -50,7 +50,9 @@ import type baTableClass from '/@/utils/baTable'
|
||||
import FormItem from '/@/components/formItem/index.vue'
|
||||
import type { FormInstance, FormItemRule } from 'element-plus'
|
||||
import { buildValidatorData } from '/@/utils/validate'
|
||||
import { useConfig } from '/@/stores/config'
|
||||
|
||||
const config = useConfig()
|
||||
const formRef = ref<FormInstance>()
|
||||
const baTable = inject('baTable') as baTableClass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user