form表单label宽度支持设置,默认去掉一些表单的宽度设置,默认自适应
parent
a250827b37
commit
9f755a2308
|
@ -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,则使labelCol失效,解决labelWidth设置无效的问题
|
||||
if (mergeProps.labelWidth) {
|
||||
mergeProps.labelCol = undefined;
|
||||
}
|
||||
//update-end-author:sunjianlei date:20220923 for: 如果用户设置了labelWidth,则使labelCol失效,解决labelWidth设置无效的问题
|
||||
return mergeProps;
|
||||
});
|
||||
|
||||
const getFormClass = computed(() => {
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
const searchInfo = ref(props.params);
|
||||
//查询form
|
||||
const formConfig = {
|
||||
labelWidth: 220,
|
||||
//labelWidth: 220,
|
||||
baseColProps: {
|
||||
xs: 24,
|
||||
sm: 24,
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
bordered: true,
|
||||
size: 'small',
|
||||
formConfig: {
|
||||
labelWidth: 200,
|
||||
//labelWidth: 200,
|
||||
baseColProps: {
|
||||
xs: 24,
|
||||
sm: 8,
|
||||
|
|
|
@ -109,7 +109,6 @@
|
|||
const searchInfo = ref(props.params);
|
||||
//查询form
|
||||
const formConfig = {
|
||||
labelWidth: 200,
|
||||
baseColProps: {
|
||||
xs: 24,
|
||||
sm: 8,
|
||||
|
|
|
@ -206,7 +206,7 @@ export function useListTable(tableProps: TableProps): [
|
|||
// 紧凑模式
|
||||
compact: true,
|
||||
// label默认宽度
|
||||
labelWidth: 120,
|
||||
// labelWidth: 120,
|
||||
// 按下回车后自动提交
|
||||
autoSubmitOnEnter: true,
|
||||
// 默认 row 配置
|
||||
|
|
|
@ -50,7 +50,6 @@
|
|||
//update-end---author:wangshuai ---date:20220629 for:[VUEN-1485]进入系统管理--通讯录页面后,网页命令行报错--------------
|
||||
showIndexColumn: true,
|
||||
formConfig: {
|
||||
labelWidth: 200,
|
||||
schemas: searchFormSchema,
|
||||
},
|
||||
canResize: false,
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
columns: departRoleColumns,
|
||||
canResize: false,
|
||||
formConfig: {
|
||||
labelWidth: 100,
|
||||
schemas: departRoleSearchFormSchema,
|
||||
baseColProps: adaptiveColProps,
|
||||
labelAlign: 'left',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
const isUpdate = ref(true);
|
||||
//表单配置
|
||||
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
||||
labelWidth: 150,
|
||||
//labelWidth: 150,
|
||||
schemas: formSchema,
|
||||
showActionButtonGroup: false,
|
||||
});
|
||||
|
|
|
@ -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']]],
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
const isUpdate = ref(true);
|
||||
//表单配置
|
||||
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
||||
labelWidth: 150,
|
||||
//labelWidth: 150,
|
||||
schemas: formSchema,
|
||||
showActionButtonGroup: false,
|
||||
});
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue