form表单label宽度支持设置,默认去掉一些表单的宽度设置,默认自适应

pull/170/head^2
zhangdaiscott 2022-09-25 09:55:29 +08:00
parent a250827b37
commit 9f755a2308
11 changed files with 19 additions and 11 deletions

View File

@ -81,7 +81,13 @@
// Get the basic configuration of the form
const getProps = computed((): FormProps => {
return { ...props, ...unref(propsRef) } as FormProps;
let mergeProps = { ...props, ...unref(propsRef) } as FormProps;
//update-begin-author:sunjianlei date:20220923 for: labelWidth使labelCollabelWidth
if (mergeProps.labelWidth) {
mergeProps.labelCol = undefined;
}
//update-end-author:sunjianlei date:20220923 for: labelWidth使labelCollabelWidth
return mergeProps;
});
const getFormClass = computed(() => {

View File

@ -58,7 +58,7 @@
const searchInfo = ref(props.params);
//form
const formConfig = {
labelWidth: 220,
//labelWidth: 220,
baseColProps: {
xs: 24,
sm: 24,

View File

@ -101,7 +101,7 @@
bordered: true,
size: 'small',
formConfig: {
labelWidth: 200,
//labelWidth: 200,
baseColProps: {
xs: 24,
sm: 8,

View File

@ -109,7 +109,6 @@
const searchInfo = ref(props.params);
//form
const formConfig = {
labelWidth: 200,
baseColProps: {
xs: 24,
sm: 8,

View File

@ -206,7 +206,7 @@ export function useListTable(tableProps: TableProps): [
// 紧凑模式
compact: true,
// label默认宽度
labelWidth: 120,
// labelWidth: 120,
// 按下回车后自动提交
autoSubmitOnEnter: true,
// 默认 row 配置

View File

@ -50,7 +50,6 @@
//update-end---author:wangshuai ---date:20220629 for[VUEN-1485]----------------
showIndexColumn: true,
formConfig: {
labelWidth: 200,
schemas: searchFormSchema,
},
canResize: false,

View File

@ -70,6 +70,7 @@
columns: departRoleColumns,
canResize: false,
formConfig: {
labelWidth: 100,
schemas: departRoleSearchFormSchema,
baseColProps: adaptiveColProps,
labelAlign: 'left',

View File

@ -14,7 +14,7 @@
const isUpdate = ref(true);
//
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 150,
//labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});

View File

@ -60,6 +60,8 @@
}}</a-button>
<a-button preIcon="ant-design:import-outlined" type="primary" @click="handleImport"></a-button>
<super-query :config="superQueryConfig" @search="handleSuperQuery"/>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
@ -97,6 +99,7 @@
import { useGo } from '/@/hooks/web/usePage';
import { router } from '/@/router';
import { filterObj } from '/@/utils/common/compUtils';
import SuperQuery from '/@/components/jeecg/super/superquery/SuperQuery.vue'
const go = useGo();
const checkedKeys = ref<Array<string | number>>([]);
@ -110,7 +113,7 @@
api: getDemoList,
columns,
formConfig: {
labelWidth: 120,
//labelWidth: 120,
schemas: searchFormSchema,
fieldMapToTime: [['birthday', ['birthday_begin', 'birthday_end'], 'YYYY-MM-DD']],
fieldMapToNumber: [['age', ['age_begin', 'age_end']]],

View File

@ -14,7 +14,7 @@
const isUpdate = ref(true);
//
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 150,
//labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});

View File

@ -4,7 +4,7 @@
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" preIcon="ant-design:plus-outlined" @click="handleCreate"> </a-button>
<a-button type="primary" preIcon="ant-design:plus-outlined" v-auth="'system:user:add'" @click="handleCreate"> </a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> </a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls"></j-upload-button>
<a-button type="primary" @click="handleSyncUser" preIcon="ant-design:sync-outlined"> 同步流程</a-button>
@ -88,7 +88,7 @@
columns: columns,
size: 'small',
formConfig: {
labelWidth: 200,
// labelWidth: 200,
schemas: searchFormSchema,
},
actionColumn: {