This commit is contained in:
Your Name
2026-08-12 18:30:00 +08:00
parent 18ed3c48fa
commit dddf2348d3
344 changed files with 370 additions and 314 deletions
@@ -2653,6 +2653,20 @@ async function handleDownloadSlip() {
/** 克隆节点上再兜一层:加高行高,避免药材/底部文字被切边 */
onclone: (_doc, cloned) => {
if (!(cloned instanceof HTMLElement)) return
cloned.querySelectorAll<HTMLElement>('.rx-notice, .rx-notice-text, .rx-notice-meta').forEach((el) => {
el.style.lineHeight = '1.95'
el.style.overflow = 'visible'
})
cloned.querySelectorAll<HTMLElement>('.rx-notice').forEach((el) => {
el.style.padding = '10px 12px'
})
cloned.querySelectorAll<HTMLElement>('.rx-info-cell, .rx-info-cell .rx-key, .rx-info-cell .rx-val').forEach((el) => {
el.style.lineHeight = '1.95'
el.style.overflow = 'visible'
})
cloned.querySelectorAll<HTMLElement>('.rx-info-cell').forEach((el) => {
el.style.padding = '10px 12px'
})
cloned.querySelectorAll<HTMLElement>('.rx-herb-cell').forEach((el) => {
el.style.lineHeight = '2.5'
})
@@ -4982,6 +4982,20 @@ async function capturePrescriptionSlipCanvas(): Promise<HTMLCanvasElement> {
/** 克隆节点上再兜一层:加高行高,避免药材/底部文字被切边 */
onclone: (_doc, cloned) => {
if (!(cloned instanceof HTMLElement)) return
cloned.querySelectorAll<HTMLElement>('.rx-notice, .rx-notice-text, .rx-notice-meta').forEach((node) => {
node.style.lineHeight = '1.95'
node.style.overflow = 'visible'
})
cloned.querySelectorAll<HTMLElement>('.rx-notice').forEach((node) => {
node.style.padding = '10px 12px'
})
cloned.querySelectorAll<HTMLElement>('.rx-info-cell, .rx-info-cell .rx-key, .rx-info-cell .rx-val').forEach((node) => {
node.style.lineHeight = '1.95'
node.style.overflow = 'visible'
})
cloned.querySelectorAll<HTMLElement>('.rx-info-cell').forEach((node) => {
node.style.padding = '10px 12px'
})
cloned.querySelectorAll<HTMLElement>('.rx-herb-cell').forEach((node) => {
node.style.lineHeight = '2.5'
})
@@ -5677,6 +5677,20 @@ async function capturePrescriptionSlipCanvas(): Promise<HTMLCanvasElement> {
/** 克隆节点上再兜一层:加高行高,避免药材/底部文字被切边 */
onclone: (_doc, cloned) => {
if (!(cloned instanceof HTMLElement)) return
cloned.querySelectorAll<HTMLElement>('.rx-notice, .rx-notice-text, .rx-notice-meta').forEach((node) => {
node.style.lineHeight = '1.95'
node.style.overflow = 'visible'
})
cloned.querySelectorAll<HTMLElement>('.rx-notice').forEach((node) => {
node.style.padding = '10px 12px'
})
cloned.querySelectorAll<HTMLElement>('.rx-info-cell, .rx-info-cell .rx-key, .rx-info-cell .rx-val').forEach((node) => {
node.style.lineHeight = '1.95'
node.style.overflow = 'visible'
})
cloned.querySelectorAll<HTMLElement>('.rx-info-cell').forEach((node) => {
node.style.padding = '10px 12px'
})
cloned.querySelectorAll<HTMLElement>('.rx-herb-cell').forEach((node) => {
node.style.lineHeight = '2.5'
})