form表单label宽度支持设置,默认去掉一些表单的宽度设置,默认自适应
parent
a250827b37
commit
9f755a2308
|
@ -81,7 +81,13 @@
|
||||||
|
|
||||||
// Get the basic configuration of the form
|
// Get the basic configuration of the form
|
||||||
const getProps = computed((): FormProps => {
|
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(() => {
|
const getFormClass = computed(() => {
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
const searchInfo = ref(props.params);
|
const searchInfo = ref(props.params);
|
||||||
//查询form
|
//查询form
|
||||||
const formConfig = {
|
const formConfig = {
|
||||||
labelWidth: 220,
|
//labelWidth: 220,
|
||||||
baseColProps: {
|
baseColProps: {
|
||||||
xs: 24,
|
xs: 24,
|
||||||
sm: 24,
|
sm: 24,
|
||||||
|
|
|
@ -101,7 +101,7 @@
|
||||||
bordered: true,
|
bordered: true,
|
||||||
size: 'small',
|
size: 'small',
|
||||||
formConfig: {
|
formConfig: {
|
||||||
labelWidth: 200,
|
//labelWidth: 200,
|
||||||
baseColProps: {
|
baseColProps: {
|
||||||
xs: 24,
|
xs: 24,
|
||||||
sm: 8,
|
sm: 8,
|
||||||
|
|
|
@ -109,7 +109,6 @@
|
||||||
const searchInfo = ref(props.params);
|
const searchInfo = ref(props.params);
|
||||||
//查询form
|
//查询form
|
||||||
const formConfig = {
|
const formConfig = {
|
||||||
labelWidth: 200,
|
|
||||||
baseColProps: {
|
baseColProps: {
|
||||||
xs: 24,
|
xs: 24,
|
||||||
sm: 8,
|
sm: 8,
|
||||||
|
|
|
@ -206,7 +206,7 @@ export function useListTable(tableProps: TableProps): [
|
||||||
// 紧凑模式
|
// 紧凑模式
|
||||||
compact: true,
|
compact: true,
|
||||||
// label默认宽度
|
// label默认宽度
|
||||||
labelWidth: 120,
|
// labelWidth: 120,
|
||||||
// 按下回车后自动提交
|
// 按下回车后自动提交
|
||||||
autoSubmitOnEnter: true,
|
autoSubmitOnEnter: true,
|
||||||
// 默认 row 配置
|
// 默认 row 配置
|
||||||
|
|
|
@ -50,7 +50,6 @@
|
||||||
//update-end---author:wangshuai ---date:20220629 for:[VUEN-1485]进入系统管理--通讯录页面后,网页命令行报错--------------
|
//update-end---author:wangshuai ---date:20220629 for:[VUEN-1485]进入系统管理--通讯录页面后,网页命令行报错--------------
|
||||||
showIndexColumn: true,
|
showIndexColumn: true,
|
||||||
formConfig: {
|
formConfig: {
|
||||||
labelWidth: 200,
|
|
||||||
schemas: searchFormSchema,
|
schemas: searchFormSchema,
|
||||||
},
|
},
|
||||||
canResize: false,
|
canResize: false,
|
||||||
|
|
|
@ -70,6 +70,7 @@
|
||||||
columns: departRoleColumns,
|
columns: departRoleColumns,
|
||||||
canResize: false,
|
canResize: false,
|
||||||
formConfig: {
|
formConfig: {
|
||||||
|
labelWidth: 100,
|
||||||
schemas: departRoleSearchFormSchema,
|
schemas: departRoleSearchFormSchema,
|
||||||
baseColProps: adaptiveColProps,
|
baseColProps: adaptiveColProps,
|
||||||
labelAlign: 'left',
|
labelAlign: 'left',
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
const isUpdate = ref(true);
|
const isUpdate = ref(true);
|
||||||
//表单配置
|
//表单配置
|
||||||
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
||||||
labelWidth: 150,
|
//labelWidth: 150,
|
||||||
schemas: formSchema,
|
schemas: formSchema,
|
||||||
showActionButtonGroup: false,
|
showActionButtonGroup: false,
|
||||||
});
|
});
|
||||||
|
|
|
@ -60,6 +60,8 @@
|
||||||
}}</a-button>
|
}}</a-button>
|
||||||
<a-button preIcon="ant-design:import-outlined" type="primary" @click="handleImport">弹窗导入</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">
|
<a-dropdown v-if="checkedKeys.length > 0">
|
||||||
<template #overlay>
|
<template #overlay>
|
||||||
<a-menu>
|
<a-menu>
|
||||||
|
@ -97,6 +99,7 @@
|
||||||
import { useGo } from '/@/hooks/web/usePage';
|
import { useGo } from '/@/hooks/web/usePage';
|
||||||
import { router } from '/@/router';
|
import { router } from '/@/router';
|
||||||
import { filterObj } from '/@/utils/common/compUtils';
|
import { filterObj } from '/@/utils/common/compUtils';
|
||||||
|
import SuperQuery from '/@/components/jeecg/super/superquery/SuperQuery.vue'
|
||||||
|
|
||||||
const go = useGo();
|
const go = useGo();
|
||||||
const checkedKeys = ref<Array<string | number>>([]);
|
const checkedKeys = ref<Array<string | number>>([]);
|
||||||
|
@ -110,7 +113,7 @@
|
||||||
api: getDemoList,
|
api: getDemoList,
|
||||||
columns,
|
columns,
|
||||||
formConfig: {
|
formConfig: {
|
||||||
labelWidth: 120,
|
//labelWidth: 120,
|
||||||
schemas: searchFormSchema,
|
schemas: searchFormSchema,
|
||||||
fieldMapToTime: [['birthday', ['birthday_begin', 'birthday_end'], 'YYYY-MM-DD']],
|
fieldMapToTime: [['birthday', ['birthday_begin', 'birthday_end'], 'YYYY-MM-DD']],
|
||||||
fieldMapToNumber: [['age', ['age_begin', 'age_end']]],
|
fieldMapToNumber: [['age', ['age_begin', 'age_end']]],
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
const isUpdate = ref(true);
|
const isUpdate = ref(true);
|
||||||
//表单配置
|
//表单配置
|
||||||
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
||||||
labelWidth: 150,
|
//labelWidth: 150,
|
||||||
schemas: formSchema,
|
schemas: formSchema,
|
||||||
showActionButtonGroup: false,
|
showActionButtonGroup: false,
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||||
<!--插槽:table标题-->
|
<!--插槽:table标题-->
|
||||||
<template #tableTitle>
|
<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>
|
<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>
|
<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>
|
<a-button type="primary" @click="handleSyncUser" preIcon="ant-design:sync-outlined"> 同步流程</a-button>
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
columns: columns,
|
columns: columns,
|
||||||
size: 'small',
|
size: 'small',
|
||||||
formConfig: {
|
formConfig: {
|
||||||
labelWidth: 200,
|
// labelWidth: 200,
|
||||||
schemas: searchFormSchema,
|
schemas: searchFormSchema,
|
||||||
},
|
},
|
||||||
actionColumn: {
|
actionColumn: {
|
||||||
|
|
Loading…
Reference in New Issue