tiny-vue/examples/sites/demos/pc/app/drawer/z-index-composition-api.vue

25 lines
553 B
Vue

<template>
<div>
<tiny-button @click="fn" type="primary"> 自定义 z-index </tiny-button>
<tiny-drawer title="标题" :visible="visible" @update:visible="visible = $event" :z-index="zIndex">
<div>
<br />
<br />
<span>内容区域</span>
</div>
</tiny-drawer>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { Drawer as TinyDrawer, Button as TinyButton } from '@opentiny/vue'
const visible = ref(false)
const zIndex = ref(3000)
function fn() {
visible.value = true
}
</script>