Skip to content

NsRebirthModal 重生弹窗

“假关闭” + “瞬间复活”。你以为关掉了,其实它还在。

✅ 行为说明

  • 弹窗结构是正常的(Header / Content / Footer)
  • 点击 ✕ / “确认关闭”会触发“假关闭”,随后随机位置复活
  • 关闭方式:按 Esc

🎮 演示

📚 使用方法

vue
<template>
  <button @click="open = true">打开弹窗</button>
  <NsRebirthModal v-model:open="open" :rebirth-delay="120" :max-rebirths="5" />
</template>

<script setup>
import { ref } from "vue";
const open = ref(false);
</script>

属性 (Props)

属性名类型默认值说明
openboolean-控制弹窗打开/关闭(可用 v-model:open)。
maskbooleantrue是否显示遮罩层。
escClosablebooleantrue是否允许 Esc 关闭。
rebirthDelaynumber100消失到重生的延迟(毫秒)。
maxRebirthsnumberInfinity最大重生次数,默认无限。
messageListstring[][...]重生时的随机吐槽文案列表。

Built with VitePress