<template>
<div>
<cube-button icon="cubeic-right" @click="goNext">Button With Icon</cube-button>
</div>
</template>
<script> export default { methods:{ goNext(){ const toast = this.$createToast({ txt: 'Loading...', // 提示信息
type: 'correct', // type 字段決定了 Toast 的顯示圖標類型 txt純文本常用
time: 3000, // 顯示時間長短
maskClosable: true, // 點擊蒙層是否隱藏
mask: true // mask 設置為 true 時會顯示遮罩
}) toast.show() // 實例方法(顯示)
setTimeout(() => { toast.hide() // 實例方法(隱藏)加setTimeout原有 + 1s
console.log(11111) // 11111
}, 2000) } } } </script>
<style>
</style>