2020-08-13 11:47:56 +08:00
|
|
|
<template>
|
|
|
|
<article>
|
|
|
|
<veui-button
|
|
|
|
@click="$toast.info({
|
|
|
|
message: 'Press any key to continue...',
|
|
|
|
duration: 5000
|
|
|
|
})"
|
|
|
|
>
|
|
|
|
Info
|
|
|
|
</veui-button>
|
|
|
|
<veui-button @click="$toast.success('Your profile has been updated.')">
|
|
|
|
Success
|
|
|
|
</veui-button>
|
|
|
|
<veui-button @click="$toast.warn('v1 is deprecated. Use v2 instead.')">
|
|
|
|
Warn
|
|
|
|
</veui-button>
|
|
|
|
<veui-button @click="$toast.error('Uncaught SyntaxError: Unexpected token +')">
|
|
|
|
Error
|
|
|
|
</veui-button>
|
|
|
|
</article>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Vue from 'vue'
|
|
|
|
import { Button } from 'veui'
|
|
|
|
import toast from 'veui/plugins/toast'
|
|
|
|
|
|
|
|
Vue.use(toast)
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
'veui-button': Button
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2021-09-15 20:03:51 +08:00
|
|
|
<style lang="less" scoped>
|
2020-08-13 11:47:56 +08:00
|
|
|
.veui-button {
|
|
|
|
margin-right: 20px;
|
|
|
|
}
|
|
|
|
</style>
|