breeze-vue-salert
v0.0.1
Published
This is a vue simple prompt box plug-in.
Downloads
1
Readme
breeze-vue-salert
This is a vue simple prompt box plug-in.
Install
Use npm to download code:
npm install breeze-vue-salert --save
import it into your project.
import Salert from 'breeze-vue-salert'
Vue.use(Salert)
Usage
<script>
export default {
created () {
this.$salert('提示文字')
this.$salert('成功', 0)
this.$salert('失败', 1)
this.$salert('失败', 1, 2000) // 2秒后消失
}
}
</script>
Props
this.$salert(msg, type, duration)
| Prop | Type | Default | Description | |-------------------|----------|----------|-------------------------------------| | msg | String | “未知问题” | prompt message | | type | Number | 1 | 1 represents error, 2 represents success | | duration | Number | 1500 | how long is the prompt box show |