kui-vue
Version:
A lightweight desktop UI component library suitable for Vue.js 2.
23 lines (21 loc) • 450 B
Markdown
<cn>
### 从浮层内关闭
使用 `v-model` 属性控制浮层显示。
</cn>
```vue
<template>
<Poptip title="标题" trigger="click" :show.sync="show">
<template #content>
<Button @click="test" size="small">Close</Button>
</template>
<Button type="primary">Click me</Button>
</Poptip>
</template>
<script setup>
import { ref } from "vue";
const show = ref(false);
const test = () => {
show.value = false;
};
</script>
```