vue-xd-message
v2.0.1
Published
消息提示框组件
Downloads
3
Maintainers
Readme
vue-xd-message
a vue plugins about notice or toast
Build Setup
install the plugin on bash and the sass module support
npm install vue-xd-message --save-dev
register the plugins on the vue project in the entry file (main.js)
import message from 'vue-xd-message '
Vue.use(message);
on the vue template file ,you can use it by
this.$message.success("hello vill-message");
this.$message.error("hello vill-message");
this.$message.warning("hello vill-message");
this.$message.info("hello vill-message");
on the vue template file ,you can also use it by
this.$message({
duration:2000,
type:'success',
conten:'hello vill-message'
});
this.$message({
duration:2000,
type:'error',
message:'hello vill-message'
});
| 字段 | 说明 | 类型 | 默认值 |----- | ----- | ----- | ----- | type | 可选值 success/error/info/warning| String | - | content | 必选值,提示信息 | String | - | duration | 可选值 | Number | 3000ms | animation | 可选值,动画效果 | String | fade= | icon | 可选值,前缀图片自定义 | String | ../assets/w1.png | hasClose | 可选值,是否有关闭按钮 | String | false