Files
workspace/code/g3soft-libs/docs/examples/message/placement.vue
T
2026-10-08 22:38:34 +08:00

28 lines
594 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup lang="ts">
// placement:9 个方位;也可以用 Message.config() 设全局默认
import { G3Button, G3Message, G3Space } from '@g3soft/ui'
const placements = [
'top-left',
'top-center',
'top-right',
'center',
'bottom-center',
'bottom-right',
] as const
</script>
<template>
<G3Space :size="[8, 8]" wrap>
<G3Button
v-for="placement in placements"
:key="placement"
type="outline"
size="small"
@click="G3Message.info(`出现在 ${placement}`, { placement })"
>
{{ placement }}
</G3Button>
</G3Space>
</template>