diff --git a/src/components/WaybillPrintTemplate/WaybillPrintTemplate.vue b/src/components/WaybillPrintTemplate/WaybillPrintTemplate.vue index 66d36e33..a06eb323 100644 --- a/src/components/WaybillPrintTemplate/WaybillPrintTemplate.vue +++ b/src/components/WaybillPrintTemplate/WaybillPrintTemplate.vue @@ -162,12 +162,13 @@ const printTemplate = (type: 'haveTem' | 'notHaveTem') => { for (let i = 0; i < cloneNodeList.length; i++) { const element = cloneNodeList[i]; + for (let j = 0; j < element.childNodes.length; j++) { const child = element.childNodes[j]; if (child.className !== 'image-container') continue; // child.style.setProperty('--isShow', type === 'haveTem' ? 'flex' : 'none'); - child.style.height = '0px'; - child.style.setProperty('--aa', type === 'haveTem' ? '#000' : '#fff'); + child.style.setProperty('--aa', type === 'haveTem' ? '#000 !important' : '#fff !important'); + child.style.setProperty('--height', type === 'haveTem' ? 'auto !important' : '0px !important'); break; } }