u
This commit is contained in:
1 parent
f572dce2f6
commit
e99a9fb274
356 files changed
+28877
-1055
No files matched your search
@@ -0,0 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
// 选项:duration 自动关闭时长(<=0 不关闭)、closable 手动关闭、handle.close() 立即关闭
|
||||
import { G3Button, G3Message, G3Space } from '@g3soft/ui'
|
||||
|
||||
function openSticky() {
|
||||
G3Message.error('这条不会自动消失,需要手动关闭', { duration: 0, closable: true })
|
||||
}
|
||||
|
||||
function openAndClose() {
|
||||
const handle = G3Message.info('1.5 秒后由代码关闭', { duration: 0 })
|
||||
setTimeout(() => handle.close(), 1500)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<G3Space :size="[8, 8]" wrap>
|
||||
<G3Button type="outline" @click="openSticky">不自动关闭</G3Button>
|
||||
<G3Button type="outline" @click="openAndClose">代码关闭</G3Button>
|
||||
<G3Button type="outline" @click="G3Message.success('5 秒后关闭', { duration: 5000 })">
|
||||
自定义时长
|
||||
</G3Button>
|
||||
</G3Space>
|
||||
</template>
|
||||
Reference in new issue
Block a user