0.1.4 • Published 4 years ago

@nangxif/toast v0.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

toast

版本说明

  • 0.1.2 支持多行文字

使用方式

//安装
npm i @nangxif/toast
yarn add @nangxif/toast

//引入
import toast from '@nangxif/toast';
Vue.use(toast);

//使用
//创建toast
const toast = this.$toast({
	text: '这是一个toast',
	ownStyle: { 'border-radius': '6px' },
	autoClose: true,
	timeout: 3500,
	transition: true
})

//显示
toast.show().then(()=>{
	//todo
})
//若autoClose为false,则需要手动隐藏
toast.remove().then(()=>{
	//todo
})

参数说明

参数含义默认值
texttoast显示的内容''
ownStyletoast的样式对象{}
autoClose是否自动关闭true
timeout延时多长时间关闭,若autoClose为false则此项无效,单位ms1500
transition是否有过渡动画false

demo

https://nangxif.github.io/toast/dist/index.html

官网

https://nangxif.github.io/toast/

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago