0.1.6 • Published 3 years ago

vue-notify-component v0.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

vue-notify-component

vue 通知框组件

安装

1. npm安装

npm install vue-notify-component

2. 在main.js中引入

import vueNotify from 'vue-notify-component'
Vue.use(vueNotify)

使用

1. 初始化通知框

this.$notifyInit(options)

options配置项

名称解释默认值类型可选值
positon提示框出现位置right-topStringright-top|right-bottom|left-top|left-bottom
offsetXX方向偏移位置0Number-
offsetYY方向偏移位置0Number-
order显示顺序,默认时间升序ascStringasc|desc
zIndex显示层级2000Number-
closable是否显示关闭按钮falseBooleantrue|false
onClose消息框关闭回调函数-Object-

2. 使用通知框

this.$notifyMessage(options)

options配置项

名称解释默认值类型可选值
title标题名称String|HTML
body内容名称String|HTML
time提示框关闭时间,单位ms,为0时不关闭3000Number
type模板预设样式,默认不显示图标Stringnormal|success|warning|error
showCloseIcon是否显示关闭按钮falseBooleantrue|false

方法

this.$notifyMessage() 返回当前通知框实例,可调用close方法手动关闭实例

名称解释
close关闭notify方法

依赖:

  • jquery

ToDo:

  • 可替换message type图标
0.1.4

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago