Browse Source

解决公用组件功能样式bug

hella_online_20240821
wangyufei 3 months ago
parent
commit
cc1ba934cd
  1. 35
      src/components/BasicForm/src/BasicForm.vue

35
src/components/BasicForm/src/BasicForm.vue

@ -78,7 +78,7 @@
<el-input v-model="formSchema.value" v-if="isDetail && formTypeDetail == 'InputString'" /> <el-input v-model="formSchema.value" v-if="isDetail && formTypeDetail == 'InputString'" />
</template> </template>
</Form> </Form>
<Tabs ref="tabRef" v-if="tableAllSchemas&&tableAllSchemas.tableFormColumns.find(item=>item.field == 'itemCode')" :tabsList="[{ <Tabs ref="tabRef" v-if="formType=='create'&&tableAllSchemas&&tableAllSchemas.tableFormColumns.find(item=>item.field == 'itemCode')" :tabsList="[{
label: '明细', label: '明细',
prop: 'TableForm' prop: 'TableForm'
},{ },{
@ -135,7 +135,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
/> />
</div> </div>
<div v-if="tableAllSchemas&&tableAllSchemas.tableFormColumns.find(item=>item.field == 'itemCode')" v-show="tabSheet=='CollectionTable'"> <div v-if="formType=='create'&&tableAllSchemas&&tableAllSchemas.tableFormColumns.find(item=>item.field == 'itemCode')" v-show="tabSheet=='CollectionTable'">
<CollectionTable <CollectionTable
:tableFields="tableAllSchemas?tableAllSchemas.tableFormColumns:[]" :tableFields="tableAllSchemas?tableAllSchemas.tableFormColumns:[]"
:tableData="tableData" :tableData="tableData"
@ -380,14 +380,7 @@ if (props.basicFormWidth) {
} else { } else {
dialogWidth.value = props.isBusiness ? '60%' : '40%' dialogWidth.value = props.isBusiness ? '60%' : '40%'
} }
const formHeight = ref({
height:'60vh'
})
if(!props.tableAllSchemas){
formHeight.value = {
height:'auto'
}
}
const collectionRef = ref() const collectionRef = ref()
const updateFullscreen = (isFullscreen) => { const updateFullscreen = (isFullscreen) => {
formHeight.value.height = isFullscreen ? 'auto' : '60vh' formHeight.value.height = isFullscreen ? 'auto' : '60vh'
@ -413,9 +406,22 @@ const routeName = ref('')
const sureDisabled = ref(false) const sureDisabled = ref(false)
const tabSheet = ref('TableForm') const tabSheet = ref('TableForm')
routeName.value = route.name routeName.value = route.name
const formHeight = ref({
height:'60vh'
})
const tabChange = (item) => { const tabChange = (item) => {
tabSheet.value = item.prop tabSheet.value = item.prop
} }
if(!props.tableAllSchemas||formType.value!='create'){
formHeight.value = {
height:'auto'
}
}else{
formHeight.value = {
height:'60vh'
}
}
// - // -
// const buttondata = [ // const buttondata = [
// defaultButtons.mainListEditBtn(null), // // defaultButtons.mainListEditBtn(null), //
@ -662,6 +668,15 @@ const open = async (
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
} }
formType.value = type formType.value = type
if(!props.tableAllSchemas||formType.value!='create'){
formHeight.value = {
height:'auto'
}
}else{
formHeight.value = {
height:'60vh'
}
}
resetForm() resetForm()
count.value = 0 count.value = 0
// //

Loading…
Cancel
Save