表格错位bug

This commit is contained in:
zyx.net
2022-09-01 09:48:38 +08:00
parent 930478bbeb
commit 892b9f69e5
@@ -125,7 +125,7 @@
<div v-else-if='detailDate.controlType === "2"' class='add_flex'> <div v-else-if='detailDate.controlType === "2"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'> <div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type === "pull"'> <div v-if='item.type === "pull"'>
<a-select v-model="item.dataValue" <a-select v-model="item.dataValue" @change='selectChange'
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
class='selectWid' :disabled="item.isLock == '1' ? true: false" class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear> allowClear>
@@ -690,6 +690,17 @@
}) })
}, },
methods: { methods: {
selectChange(val){
this.$nextTick(() => {
let element = document.querySelectorAll(
".tableclassname .ant-table-expanded-row"
);
let len = element.length / 2;
for (let i = 0; i < len; i++) {
element[i + len].style.height = element[i].offsetHeight + "px";
}
});
},
onInput(r) { onInput(r) {
let value = r.target.value let value = r.target.value
r.target.value = value.replace(/[^\u4e00-\u9fa5]/g, '') r.target.value = value.replace(/[^\u4e00-\u9fa5]/g, '')
@@ -770,7 +781,9 @@
height: 38px !important; height: 38px !important;
line-height: 38px !important; line-height: 38px !important;
} }
.ant-select-selection-selected-value{
height:100%;
}
.selectWid .ant-select-selection__rendered { .selectWid .ant-select-selection__rendered {
line-height: 36px !important; line-height: 36px !important;
} }
@@ -781,9 +794,12 @@
height: calc(100% - 100px); height: calc(100% - 100px);
overflow: auto; overflow: auto;
} }
/deep/ .ant-select-allow-clear{ ///deep/ .ant-select-allow-clear{
height: 30px; // height: 30px;
} //}
/deep/.ant-table-row{
height:69px;
}
.text { .text {
margin-right: 10px; margin-right: 10px;
} }