tiny-vue_version0/examples/sites/demos/pc/app/drawer/tips-props-composition-api.vue

24 lines
638 B
Vue

<template>
<div class="demo-drawer">
<tiny-button @click="openDrawer" type="primary"> 展开抽屉 </tiny-button>
<tiny-drawer title="标题" :tipsProps="tipsProps" :visible="visible" @update:visible="visible = $event">
<div style="padding: 32px">内容区域</div>
</tiny-drawer>
</div>
</template>
<script setup>
import { reactive, ref } from 'vue'
import { Drawer as TinyDrawer, Button as TinyButton } from '@opentiny/vue'
const visible = ref(false)
const tipsProps = reactive({
content: '这是一段帮助提示。。。',
placement: 'right'
})
function openDrawer() {
visible.value = true
}
</script>