File tree 3 files changed +10
-7
lines changed 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 27
27
import ' vue2-toast/lib/toast.css' ;
28
28
import Toast from ' vue2-toast' ;
29
29
Vue .use (Toast, {
30
- defaultType : ' center' ,
30
+ type : ' center' ,
31
31
duration: 3000 ,
32
32
wordWrap: true ,
33
33
width: ' 150px'
@@ -87,7 +87,7 @@ build: {
87
87
88
88
Vue.use(Toast, [options])
89
89
90
- - defaultType : position of Toast. | String | default: 'bottom' | possible 'top, center,bottom'
90
+ - type : position of Toast. | String | default: 'bottom' | possible 'top, center,bottom'
91
91
- duration : Number | default 2500ms
92
92
- wordWrap : word wrap. | Boolean | default: false
93
93
- width : width of Toast. | String | default: 'auto'
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ Vue.use(Toast);
28
28
import ' vue2-toast/lib/toast.css' ;
29
29
import Toast from ' vue2-toast' ;
30
30
Vue .use (Toast, {
31
- defaultType : ' center' ,
31
+ type : ' center' ,
32
32
duration: 3000 ,
33
33
wordWrap: true ,
34
34
width: ' 150px'
@@ -88,7 +88,7 @@ build: {
88
88
89
89
Vue.use(Toast, [options])
90
90
91
- - defaultType : Toast 的位置. | String | 默认: 'bottom' | 可选值 'top, center,bottom'
91
+ - type : Toast 的位置. | String | 默认: 'bottom' | 可选值 'top, center,bottom'
92
92
- duration : Number | 默认 2500ms
93
93
- wordWrap : 是否自动换行. | Boolean | 默认: false
94
94
- width : Toast 的宽度. | String | 默认: 'auto'
Original file line number Diff line number Diff line change 1
- /**
2
- * Updated by linxin on 2017/7/27.
1
+ /*
2
+ * @Author : linxin
3
+ * @Date : 2017-07-27
4
+ * @Last Modified time: 2018-07-31 11:46:52
3
5
*/
6
+
4
7
var Toast = { } ;
5
8
var toastTimer = false , // 存储toast定时器id
6
9
toastVM = null , // 存储toast vm
@@ -19,7 +22,7 @@ Toast.install = function (Vue, options) {
19
22
opt [ property ] = options [ property ] ;
20
23
}
21
24
Vue . prototype . $toast = function ( tip , config ) {
22
- let options = JSON . parse ( JSON . stringify ( opt ) ) ;
25
+ var options = JSON . parse ( JSON . stringify ( opt ) ) ;
23
26
if ( typeof config === 'object' ) {
24
27
for ( var property in config ) {
25
28
options [ property ] = config [ property ] ;
You can’t perform that action at this time.
0 commit comments