Browse Source

单选上下label不限制宽度

lwx_v12
liwenxuan 1 month ago
parent
commit
0ae4196572
  1. 4
      src/components/formTable/formItemGroup.vue
  2. 16
      src/components/lowCode/newFormItem.vue

4
src/components/formTable/formItemGroup.vue

@ -507,7 +507,7 @@ const linksIf = (obj: FormList) => {
:label="item.label"
:key="tIndex"
>
<FormItemGroup :data="item.list" data-type="not-nested" />
<FormItemGroup :data="item.list" :tableinfo="tableinfo" data-type="not-nested" />
</el-tab-pane>
</el-tabs>
@ -629,7 +629,7 @@ const linksIf = (obj: FormList) => {
</el-button>
</div>
</template>
<NewFormItem v-else :data="element" @asf-value-changed="asfValueChanged" />
<NewFormItem v-else :data="element" :tableinfo="tableinfo" @asf-value-changed="asfValueChanged" />
</div>
</div>

16
src/components/lowCode/newFormItem.vue

@ -15,6 +15,7 @@ import {
} from '@/api/lowCode/utils';
import validate from "@/api/lowCode/form/validate"
import { AnalysisCss,AnalysisInputCss } from '@/api/common/cssInfo' //
import { useAttrs,computed, onMounted, nextTick,ref,watch,onBeforeMount} from 'vue'
//
import InputPage from '@/components/lowCode/assistant/inputPage.vue'
import DigitpagePage from '@/components/lowCode/assistant/digitpage.vue'
@ -62,6 +63,7 @@ const props = withDefaults(
tablekey?:any
numrun?:any
rowIndex?:any
tableinfo?:any
}>(),
{}
)
@ -406,6 +408,18 @@ const testPage = (val:any) =>{
console.log("刷新数据-------->", val);
}
const labelMaxWidth = computed(()=>{
if(props.data.type=='radio'){
if(props.tableinfo&&props.tableinfo.labelPosition&&props.tableinfo.labelPosition=='top'){
return "100%"
}else{
return "150px"
}
}else{
return "150px"
}
})
</script>
<template>
@ -481,7 +495,7 @@ const testPage = (val:any) =>{
}
:deep .el-form-item__label{
height: 100%;
max-width: 150px;
max-width: v-bind(labelMaxWidth);
}
}
</style>

Loading…
Cancel
Save