<script setup lang="ts">
import { ref } from "vue";
import DriveVue from "./components/drive-vue/index.vue";
const visible = ref(false);
const visible2 = ref(false);
const setVisible = (value: boolean) => {
visible.value = value;
};
</script>
<template>
<div style="text-align: center">
<DriveVue
:visible="visible"
arrow="bottom"
@pre="visible = false"
@next="
visible2 = true;
visible = false;
"
>
<div>target dom</div> // 目标DOM
<template #ctx> // 提示气泡内容
<div style="width: 200px; height: 300px">123123</div>
</template>
</DriveVue>
<button @click="visible = true">show mask</button>
<button @click="visible2 = true">show mask</button>
<div style="display: flex; justify-content: space-around">
<DriveVue
:visible="visible2"
arrow="top"
@pre="(visible2 = false), (visible = true)"
@next="visible2 = false"
>
<div>target dom</div> // 目标DOM
<template #ctx> // 提示气泡内容
<div style="width: 200px; height: 300px">123123</div>
</template>
</DriveVue>
</div>
</template>
-
Notifications
You must be signed in to change notification settings - Fork 0
JSeasy/step-vue
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published