Skip to content

Commit

Permalink
'修复toast.center报错的bug'
Browse files Browse the repository at this point in the history
  • Loading branch information
lin-xin committed Aug 30, 2018
1 parent 96d2319 commit 613922c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ Toast.install = function (Vue, options) {
};
['bottom', 'center', 'top'].forEach(function (type) {
Vue.prototype.$toast[type] = function (tip, config) {
if(!config){
config = {};
}
config.type = type
return Vue.prototype.$toast(tip, config)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue2-toast",
"version": "2.0.1",
"version": "2.0.2",
"description": "A mobile toast plugin for vue2.",
"keywords":["vue.js","vue-plugin","toast"],
"main": "lib/index.js",
Expand Down

0 comments on commit 613922c

Please sign in to comment.