24 lines
940 B
Vue
24 lines
940 B
Vue
<script setup lang="ts">
|
|
// 句柄关闭与全局清理:handle.close() 关一条,G3Notification.destroy() 全部清空
|
|
import { G3Button, G3Notification, G3Space } from '@g3soft/ui'
|
|
|
|
function openMany() {
|
|
G3Notification.info({ title: '任务 1', description: '处理中' })
|
|
G3Notification.info({ title: '任务 2', description: '处理中' })
|
|
G3Notification.warning({ title: '任务 3', description: '需要人工确认', duration: 0 })
|
|
}
|
|
|
|
function openAndClose() {
|
|
const handle = G3Notification.success({ title: '即将被关闭', description: '1.5 秒后自动关闭' })
|
|
setTimeout(() => handle.close(), 1500)
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<G3Space :size="[8, 8]" wrap>
|
|
<G3Button type="outline" @click="openMany">打开多条</G3Button>
|
|
<G3Button type="outline" @click="openAndClose">句柄关闭</G3Button>
|
|
<G3Button type="outline" @click="G3Notification.destroy()">全部清空</G3Button>
|
|
</G3Space>
|
|
</template>
|