Commit e6ac7acb by chenwq1

feat: 弹窗样式

1 parent 19b58247
Pipeline #145 for e6ac7acb failed in 0 seconds
...@@ -3,6 +3,7 @@ import { RouterView } from "vue-router"; ...@@ -3,6 +3,7 @@ import { RouterView } from "vue-router";
</script> </script>
<template> <template>
<div id="vant-portal-host" />
<RouterView /> <RouterView />
</template> </template>
......
...@@ -35,6 +35,25 @@ body { ...@@ -35,6 +35,25 @@ body {
background-color: #f7f8fa; background-color: #f7f8fa;
} }
// Vant 弹层 teleport 挂载点:父级带 transform 后内部 position:fixed 相对该层计算,宽度与 #app 一致,避免 Pad 上遮罩/面板撑满视口
// 宽度需与上方 max-width、utils/flexible.ts 中 LAYOUT_MAX_WIDTH 保持一致
#vant-portal-host {
position: fixed;
top: 0;
left: 50%;
z-index: 3000;
width: 100%;
max-width: 430px;
height: 100%;
pointer-events: none;
transform: translateX(-50%);
}
#vant-portal-host .van-overlay,
#vant-portal-host .van-popup {
pointer-events: auto;
}
a { a {
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
......
...@@ -266,7 +266,9 @@ defineExpose({ ...@@ -266,7 +266,9 @@ defineExpose({
<template> <template>
<div> <div>
<van-overlay :show="pageLoading" z-index="2000" > <van-overlay :show="pageLoading"
teleport="#vant-portal-host"
z-index="2000">
<div class="loadingBox"> <div class="loadingBox">
<van-loading color="#1989fa" size="24px" vertical>加载中...</van-loading> <van-loading color="#1989fa" size="24px" vertical>加载中...</van-loading>
</div> </div>
......
...@@ -89,7 +89,9 @@ function previewImage(url: string) { ...@@ -89,7 +89,9 @@ function previewImage(url: string) {
<template> <template>
<div> <div>
<van-overlay :show="uploading" z-index="2000" > <van-overlay :show="uploading"
teleport="#vant-portal-host"
z-index="2000">
<div class="loadingBox"> <div class="loadingBox">
<van-loading color="#1989fa" size="24px" vertical>上传中...</van-loading> <van-loading color="#1989fa" size="24px" vertical>上传中...</van-loading>
</div> </div>
......
...@@ -97,7 +97,9 @@ function previewImage(url: string) { ...@@ -97,7 +97,9 @@ function previewImage(url: string) {
<template> <template>
<div> <div>
<van-overlay :show="uploading" z-index="2000" > <van-overlay :show="uploading"
teleport="#vant-portal-host"
z-index="2000">
<div class="loadingBox"> <div class="loadingBox">
<van-loading color="#1989fa" size="24px" vertical>上传中...</van-loading> <van-loading color="#1989fa" size="24px" vertical>上传中...</van-loading>
</div> </div>
......
...@@ -61,7 +61,10 @@ function onConfirm() { ...@@ -61,7 +61,10 @@ function onConfirm() {
<van-field v-model="displayValue" clearable is-link :label="item.nodeName" name="datePicker" <van-field v-model="displayValue" clearable is-link :label="item.nodeName" name="datePicker"
:placeholder="item.placeholder" readonly :required="item.required === 1" @click="handleShowPicker" :placeholder="item.placeholder" readonly :required="item.required === 1" @click="handleShowPicker"
input-align="right" /> input-align="right" />
<van-popup v-model:show="showPicker" destroy-on-close position="bottom"> <van-popup v-model:show="showPicker"
destroy-on-close
position="bottom"
teleport="#vant-portal-host">
<van-date-picker v-model="pickerValue" :columns-type="columnsType" :title="item.nodeName" <van-date-picker v-model="pickerValue" :columns-type="columnsType" :title="item.nodeName"
@cancel="showPicker = false" @confirm="onConfirm" /> @cancel="showPicker = false" @confirm="onConfirm" />
</van-popup> </van-popup>
......
...@@ -89,7 +89,8 @@ function onConfirm() { ...@@ -89,7 +89,8 @@ function onConfirm() {
@click="showPicker = true" input-align="right" label-width="120px" /> @click="showPicker = true" input-align="right" label-width="120px" />
<van-popup v-model:show="showPicker" <van-popup v-model:show="showPicker"
destroy-on-close destroy-on-close
position="bottom"> position="bottom"
teleport="#vant-portal-host">
<van-picker v-model="pickerValue" <van-picker v-model="pickerValue"
:columns="columnsList" :columns="columnsList"
:title="item.nodeName" :title="item.nodeName"
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
position="center" position="center"
round round
:show="show" :show="show"
teleport="#vant-portal-host"
@update:show="emit('update:show', $event)"> @update:show="emit('update:show', $event)">
<div class="logout-confirm"> <div class="logout-confirm">
<van-icon class="logout-confirm__close" <van-icon class="logout-confirm__close"
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
position="center" position="center"
round round
:show="show" :show="show"
teleport="#vant-portal-host"
@update:show="emit('update:show', $event)"> @update:show="emit('update:show', $event)">
<div class="rating-guide"> <div class="rating-guide">
<div class="rating-guide__header"> <div class="rating-guide__header">
......
...@@ -132,6 +132,7 @@ ...@@ -132,6 +132,7 @@
<!-- 大项选择弹窗:列表仅高亮待定项,点确定后才切换模块 --> <!-- 大项选择弹窗:列表仅高亮待定项,点确定后才切换模块 -->
<van-action-sheet v-model:show="showModulePicker" <van-action-sheet v-model:show="showModulePicker"
teleport="#vant-portal-host"
title="选择检测模块"> title="选择检测模块">
<div class="module-picker-sheet"> <div class="module-picker-sheet">
<div class="module-picker-list"> <div class="module-picker-list">
......
...@@ -361,6 +361,7 @@ void onRefresh(); ...@@ -361,6 +361,7 @@ void onRefresh();
</div> </div>
<van-dialog :show="rejectReasonDialogVisible" <van-dialog :show="rejectReasonDialogVisible"
show-cancel-button show-cancel-button
teleport="#vant-portal-host"
title="驳回原因" title="驳回原因"
@update:show="rejectReasonDialogVisible = $event"> @update:show="rejectReasonDialogVisible = $event">
<div class="reject-reason-dialog-content"> <div class="reject-reason-dialog-content">
......
...@@ -405,7 +405,8 @@ onUnmounted(() => { ...@@ -405,7 +405,8 @@ onUnmounted(() => {
<van-image-preview v-model:show="previewVisible" <van-image-preview v-model:show="previewVisible"
:images="previewImages" :images="previewImages"
:start-position="previewIndex" /> :start-position="previewIndex"
teleport="#vant-portal-host" />
</div> </div>
</template> </template>
......
...@@ -668,7 +668,7 @@ onMounted(() => { ...@@ -668,7 +668,7 @@ onMounted(() => {
:images="albumPreviewUrls" :images="albumPreviewUrls"
:show="albumPreviewShow" :show="albumPreviewShow"
:start-position="albumPreviewStartPosition" :start-position="albumPreviewStartPosition"
teleport="body" teleport="#vant-portal-host"
@update:show="onAlbumPreviewShowUpdate" /> @update:show="onAlbumPreviewShowUpdate" />
<Teleport to="body"> <Teleport to="body">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!