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
@@ -299,20 +299,26 @@ defineExpose({
justify-content: space-between;
background: #f3f4f6;
border: 1px solid #e5e7eb;
padding: 6px 10px;
padding: 10px 12px;
border-radius: 2px;
font-size: 12px;
color: #1f1f1f;
margin-bottom: 6px;
line-height: 1.85;
overflow: visible;
.rx-notice-text {
flex: 1;
line-height: 1.85;
padding: 1px 0;
}
.rx-notice-meta {
display: inline-flex;
gap: 24px;
white-space: nowrap;
line-height: 1.85;
padding: 1px 0;
}
}
@@ -335,10 +341,13 @@ defineExpose({
display: flex;
align-items: center;
gap: 6px;
padding: 6px 10px;
padding: 10px 12px;
font-size: 13px;
border-right: 1px solid #c8c8c8;
min-height: 32px;
min-height: 40px;
line-height: 1.85;
overflow: visible;
box-sizing: border-box;
&:last-child {
border-right: none;
@@ -347,12 +356,17 @@ defineExpose({
.rx-key {
color: #1f1f1f;
flex-shrink: 0;
line-height: 1.85;
padding: 1px 0;
}
.rx-val {
flex: 1;
min-width: 0;
word-break: break-all;
line-height: 1.85;
padding: 1px 0;
overflow: visible;
}
}
@@ -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'
})