From 2cd31c30cdf870024e89fd51a93853a8547ca05d Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Thu, 10 Aug 2023 18:11:00 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90issues-641=E3=80=91=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=90=9C=E7=B4=A2=E8=A1=A8=E5=8D=95=E7=9A=84?= =?UTF-8?q?span=E9=85=8D=E7=BD=AE=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Form/src/components/FormItem.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/Form/src/components/FormItem.vue b/src/components/Form/src/components/FormItem.vue index 9f0b863..3a1d784 100644 --- a/src/components/Form/src/components/FormItem.vue +++ b/src/components/Form/src/components/FormItem.vue @@ -14,6 +14,7 @@ import { upperFirst, cloneDeep } from 'lodash-es'; import { useItemLabelWidth } from '../hooks/useLabelWidth'; import { useI18n } from '/@/hooks/web/useI18n'; + import { useAppInject } from '/@/hooks/web/useAppInject'; export default defineComponent({ name: 'BasicFormItem', @@ -343,7 +344,14 @@ } const { baseColProps = {} } = props.formProps; - const realColProps = { ...baseColProps, ...colProps }; + // update-begin--author:liaozhiyang---date:20230803---for:【issues-641】调整表格搜索表单的span配置无效 + const { getIsMobile } = useAppInject(); + let realColProps; + if (colProps['span'] && !unref(getIsMobile)) { + ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach((name) => delete baseColProps[name]); + } + realColProps = { ...baseColProps, ...colProps }; + // update-end--author:liaozhiyang---date:20230803---for:【issues-641】调整表格搜索表单的span配置无效 const { isIfShow, isShow } = getShow(); const values = unref(getValues);