0.0.1 • Published 7 years ago
breeze-vue-salert v0.0.1
breeze-vue-salert
This is a vue simple prompt box plug-in.
Install
Use npm to download code:
npm install breeze-vue-salert --saveimport 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 |
License
0.0.1
7 years ago