Skip to content

Commit 613922c

Browse files
committed
'修复toast.center报错的bug'
1 parent 96d2319 commit 613922c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ Toast.install = function (Vue, options) {
8080
};
8181
['bottom', 'center', 'top'].forEach(function (type) {
8282
Vue.prototype.$toast[type] = function (tip, config) {
83+
if(!config){
84+
config = {};
85+
}
8386
config.type = type
8487
return Vue.prototype.$toast(tip, config)
8588
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue2-toast",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "A mobile toast plugin for vue2.",
55
"keywords":["vue.js","vue-plugin","toast"],
66
"main": "lib/index.js",

0 commit comments

Comments
 (0)