57 lines
1.5 KiB
Vue
57 lines
1.5 KiB
Vue
<!--
|
|
Ported from legacy henza_pwa/src/components/DialogVantOneButton.vue — the
|
|
single-action variant of DialogVant (one full-width button instead of a
|
|
two-column grid). Used by App.vue's "new version available" dialog.
|
|
|
|
Same structure as DialogVant.vue: `show` is not a declared prop; the parent's
|
|
v-model:show falls through onto <van-dialog>, which is this component's sole
|
|
root element. Legacy's internal watch on an undeclared `modelValue` prop was
|
|
dead code and is not carried over.
|
|
-->
|
|
<template>
|
|
<van-dialog>
|
|
<div class="my-4">
|
|
<div class="w-full flex justify-center">
|
|
<slot name="img">{{ text2 }}</slot>
|
|
</div>
|
|
<div class="w-full flex justify-center text-[18px] font-semibold">
|
|
<slot name="title">{{ text1 }}</slot>
|
|
</div>
|
|
<div class="border-t border-solid border-[#E5E7EB] pt-4 mx-2 mt-6 font-semibold text-[15px]">
|
|
<slot name="button">{{ text3 }}</slot>
|
|
</div>
|
|
</div>
|
|
</van-dialog>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { Dialog as VanDialog } from 'vant'
|
|
|
|
withDefaults(
|
|
defineProps<{
|
|
timeOut: number
|
|
text1?: string
|
|
text2?: string
|
|
text3?: string
|
|
}>(),
|
|
{},
|
|
)
|
|
</script>
|
|
|
|
<style lang="less">
|
|
.van-dialog__confirm,
|
|
.van-dialog__cancel {
|
|
display: none !important;
|
|
}
|
|
.van-dialog__confirm .van-button__text {
|
|
color: #1c2d56;
|
|
font-weight: 600;
|
|
font-size: 15px;
|
|
}
|
|
.van-dialog__cancel .van-button__text {
|
|
color: #6b7280;
|
|
font-weight: 600;
|
|
font-size: 15px;
|
|
}
|
|
</style>
|