优化左侧悬浮显示提示
This commit is contained in:
@@ -69,7 +69,7 @@
|
|||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: #f8fafc;
|
background: #f8fafc;
|
||||||
overflow: hidden;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.publish-field :deep(.van-field__label) {
|
.publish-field :deep(.van-field__label) {
|
||||||
@@ -84,6 +84,80 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hint-label,
|
||||||
|
.backend-hint-target.has-hint,
|
||||||
|
.upload-title.has-hint {
|
||||||
|
position: relative;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
max-width: 100%;
|
||||||
|
line-height: 1.35;
|
||||||
|
cursor: help;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint-label::before,
|
||||||
|
.backend-hint-target.has-hint::before,
|
||||||
|
.upload-title.has-hint::before,
|
||||||
|
.hint-label::after,
|
||||||
|
.backend-hint-target.has-hint::after,
|
||||||
|
.upload-title.has-hint::after {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 20;
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
pointer-events: none;
|
||||||
|
transition: opacity 0.16s ease, visibility 0.16s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint-label::before,
|
||||||
|
.backend-hint-target.has-hint::before,
|
||||||
|
.upload-title.has-hint::before {
|
||||||
|
content: "";
|
||||||
|
top: 50%;
|
||||||
|
left: calc(100% + 2px);
|
||||||
|
transform: translateY(-50%);
|
||||||
|
border: 6px solid transparent;
|
||||||
|
border-right-color: rgba(32, 36, 42, 0.96);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint-label::after,
|
||||||
|
.backend-hint-target.has-hint::after,
|
||||||
|
.upload-title.has-hint::after {
|
||||||
|
content: attr(data-hint);
|
||||||
|
top: 50%;
|
||||||
|
left: calc(100% + 14px);
|
||||||
|
width: min(242px, calc(100vw - 136px));
|
||||||
|
max-height: 156px;
|
||||||
|
overflow: auto;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
padding: 8px 10px;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: rgba(32, 36, 42, 0.96);
|
||||||
|
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
|
||||||
|
color: #fff;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1.45;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint-label:hover::before,
|
||||||
|
.hint-label:focus-visible::before,
|
||||||
|
.backend-hint-target.has-hint:hover::before,
|
||||||
|
.backend-hint-target.has-hint:focus-visible::before,
|
||||||
|
.upload-title.has-hint:hover::before,
|
||||||
|
.upload-title.has-hint:focus-visible::before,
|
||||||
|
.hint-label:hover::after,
|
||||||
|
.hint-label:focus-visible::after,
|
||||||
|
.backend-hint-target.has-hint:hover::after,
|
||||||
|
.backend-hint-target.has-hint:focus-visible::after,
|
||||||
|
.upload-title.has-hint:hover::after,
|
||||||
|
.upload-title.has-hint:focus-visible::after {
|
||||||
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
.radio-group,
|
.radio-group,
|
||||||
.multi-chip-group {
|
.multi-chip-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -690,7 +690,14 @@ function readError(error: unknown, fallback: string) {
|
|||||||
<div v-for="item in quantityItems" :key="item.key" class="quantity-row">
|
<div v-for="item in quantityItems" :key="item.key" class="quantity-row">
|
||||||
<div class="quantity-card">
|
<div class="quantity-card">
|
||||||
<div class="quantity-meta">
|
<div class="quantity-meta">
|
||||||
<strong><span>*</span>{{ item.label }}</strong>
|
<strong
|
||||||
|
class="backend-hint-target"
|
||||||
|
:class="{ 'has-hint': Boolean(item.placeholder) }"
|
||||||
|
:data-hint="item.placeholder"
|
||||||
|
:tabindex="item.placeholder ? 0 : -1"
|
||||||
|
>
|
||||||
|
<span>*</span>{{ item.label }}
|
||||||
|
</strong>
|
||||||
<small>{{ item.price }}</small>
|
<small>{{ item.price }}</small>
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
@@ -832,7 +839,14 @@ function readError(error: unknown, fallback: string) {
|
|||||||
<div class="upload-list">
|
<div class="upload-list">
|
||||||
<div v-for="slot in screenshotSlots" :key="slot.key" class="upload-line">
|
<div v-for="slot in screenshotSlots" :key="slot.key" class="upload-line">
|
||||||
<div class="upload-meta">
|
<div class="upload-meta">
|
||||||
<strong>{{ slot.label }}<span v-if="isScreenshotRequired(slot)">*</span></strong>
|
<strong
|
||||||
|
class="upload-title"
|
||||||
|
:class="{ 'has-hint': Boolean(slot.hint) }"
|
||||||
|
:data-hint="slot.hint"
|
||||||
|
:tabindex="slot.hint ? 0 : -1"
|
||||||
|
>
|
||||||
|
{{ slot.label }}<span v-if="isScreenshotRequired(slot)">*</span>
|
||||||
|
</strong>
|
||||||
<small>{{ slot.hint }}</small>
|
<small>{{ slot.hint }}</small>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="screenshotFiles[slot.key]" class="upload-preview">
|
<div v-if="screenshotFiles[slot.key]" class="upload-preview">
|
||||||
@@ -871,7 +885,11 @@ function readError(error: unknown, fallback: string) {
|
|||||||
:placeholder="priceConfig.deposit_placeholder"
|
:placeholder="priceConfig.deposit_placeholder"
|
||||||
suffix="元"
|
suffix="元"
|
||||||
class="publish-field"
|
class="publish-field"
|
||||||
/>
|
>
|
||||||
|
<template #label>
|
||||||
|
<span class="hint-label" :data-hint="priceConfig.deposit_placeholder" tabindex="0">押金</span>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
<div class="result-grid">
|
<div class="result-grid">
|
||||||
<van-field
|
<van-field
|
||||||
:model-value="calculatedRatioText"
|
:model-value="calculatedRatioText"
|
||||||
@@ -879,7 +897,11 @@ function readError(error: unknown, fallback: string) {
|
|||||||
readonly
|
readonly
|
||||||
:placeholder="priceConfig.ratio_description"
|
:placeholder="priceConfig.ratio_description"
|
||||||
class="publish-field result-field"
|
class="publish-field result-field"
|
||||||
/>
|
>
|
||||||
|
<template #label>
|
||||||
|
<span class="hint-label" :data-hint="priceConfig.ratio_description" tabindex="0">比例</span>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
<van-field
|
<van-field
|
||||||
:model-value="calculatedFinalPrice ? `¥${calculatedFinalPrice}` : ''"
|
:model-value="calculatedFinalPrice ? `¥${calculatedFinalPrice}` : ''"
|
||||||
label="价格"
|
label="价格"
|
||||||
@@ -887,7 +909,11 @@ function readError(error: unknown, fallback: string) {
|
|||||||
required
|
required
|
||||||
:placeholder="priceConfig.price_placeholder"
|
:placeholder="priceConfig.price_placeholder"
|
||||||
class="publish-field result-field"
|
class="publish-field result-field"
|
||||||
/>
|
>
|
||||||
|
<template #label>
|
||||||
|
<span class="hint-label" :data-hint="priceConfig.price_placeholder" tabindex="0">价格</span>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<van-field
|
<van-field
|
||||||
|
|||||||
Reference in New Issue
Block a user