1.0.1 • Published 7 years ago
otcone-ui v1.0.1
说明
基于Vue的Alert提示插件
安装
npm install otcone-ui
使用
import OTCOneUI from 'otcone-ui'
Vue.use(OTCOneUI);
methods:{
clickHandle(){
// 普通提示
this.$message(
'这是一段内容'
);
// 警告
this.$message1.error(
'这是一段警告'
);
// 成功提示
this.$message1.success(
'这是一段成功信息'
);
}
}
- 可选项配置
methods:{
clickHandle(){
this.$message(
{
title : '标题',
content : '标题',
// 'success', 'normal', 'error'
type : 'normal',
// 文字水平对齐
titleAlign : 'left',
// 内容水平对齐
contentAlign : 'left',
// 关闭回调
callback : function(){
//do something
}
}
);
}
}