mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 01:11:25 +08:00
64 lines
1.3 KiB
Vue
64 lines
1.3 KiB
Vue
|
<template>
|
||
|
<el-popover
|
||
|
placement="top-start"
|
||
|
title="Title"
|
||
|
:width="200"
|
||
|
trigger="hover"
|
||
|
content="this is content, this is content, this is content"
|
||
|
>
|
||
|
<template #reference>
|
||
|
<el-button>Hover to activate</el-button>
|
||
|
</template>
|
||
|
</el-popover>
|
||
|
|
||
|
<el-popover
|
||
|
placement="bottom"
|
||
|
title="Title"
|
||
|
:width="200"
|
||
|
trigger="click"
|
||
|
content="this is content, this is content, this is content"
|
||
|
>
|
||
|
<template #reference>
|
||
|
<el-button>Click to activate</el-button>
|
||
|
</template>
|
||
|
</el-popover>
|
||
|
|
||
|
<el-popover
|
||
|
ref="popover"
|
||
|
placement="right"
|
||
|
title="Title"
|
||
|
:width="200"
|
||
|
trigger="focus"
|
||
|
content="this is content, this is content, this is content"
|
||
|
>
|
||
|
<template #reference>
|
||
|
<el-button>Focus to activate</el-button>
|
||
|
</template>
|
||
|
</el-popover>
|
||
|
|
||
|
<el-popover
|
||
|
v-model:visible="visible"
|
||
|
placement="bottom"
|
||
|
title="Title"
|
||
|
:width="200"
|
||
|
trigger="manual"
|
||
|
content="this is content, this is content, this is content"
|
||
|
>
|
||
|
<template #reference>
|
||
|
<el-button @click="visible = !visible">Manual to activate</el-button>
|
||
|
</template>
|
||
|
</el-popover>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts">
|
||
|
import { defineComponent, ref } from 'vue'
|
||
|
|
||
|
export default defineComponent({
|
||
|
setup() {
|
||
|
return {
|
||
|
visible: ref(false),
|
||
|
}
|
||
|
},
|
||
|
})
|
||
|
</script>
|