fix: QR改为float right自然对齐文字,不再absolute定位
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 1m26s
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 1m26s
配方卡片: - QR从.export-card的absolute定位改为.card-content内float right - QR自然跟"来自大地的礼物"文字顶端对齐 - 右侧边缘跟内容区域对齐(不再需要手动算padding偏移) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -55,15 +55,12 @@
|
||||
class="card-brand-bg"
|
||||
:style="{ backgroundImage: `url('${brand.brand_bg}')` }"
|
||||
/>
|
||||
<div v-if="brand.qr_code" class="card-qr-wrapper">
|
||||
<img
|
||||
:src="brand.qr_code"
|
||||
class="card-qr"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
<div v-if="brand.brand_name" class="card-qr-name">{{ brand.brand_name }}</div>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<!-- QR floated right, aligns with brand text top -->
|
||||
<div v-if="brand.qr_code" class="card-qr-float">
|
||||
<img :src="brand.qr_code" class="card-qr" crossorigin="anonymous" />
|
||||
<div v-if="brand.brand_name" class="card-qr-name">{{ brand.brand_name }}</div>
|
||||
</div>
|
||||
<div class="card-brand-text">
|
||||
{{ cardLang === 'en' ? 'doTERRA · Gifts of the Earth' : 'doTERRA · 来自大地的礼物' }}
|
||||
</div>
|
||||
@@ -1141,15 +1138,14 @@ async function saveRecipe() {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.card-qr-wrapper {
|
||||
position: absolute;
|
||||
top: 36px;
|
||||
right: 36px;
|
||||
.card-qr-float {
|
||||
float: right;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
z-index: 2;
|
||||
margin-left: 12px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.card-qr {
|
||||
|
||||
Reference in New Issue
Block a user