File tree Expand file tree Collapse file tree 7 files changed +28
-10
lines changed
pages/components/response/pages/toast Expand file tree Collapse file tree 7 files changed +28
-10
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ Component({
68
68
type : Boolean ,
69
69
value : true ,
70
70
} ,
71
+ offsetX :Number ,
72
+ offsetY :Number
71
73
72
74
} ,
73
75
@@ -118,7 +120,9 @@ Component({
118
120
center = true ,
119
121
mask = false ,
120
122
success = null ,
121
- complete = null
123
+ complete = null ,
124
+ offsetX = 0 ,
125
+ offsetY = 0 ,
122
126
} = options ;
123
127
this . setData ( {
124
128
title,
@@ -132,7 +136,9 @@ Component({
132
136
mask,
133
137
show : true ,
134
138
success,
135
- complete
139
+ complete,
140
+ offsetY,
141
+ offsetX
136
142
} ) ;
137
143
this . changeStatus ( ) ;
138
144
return this ;
Original file line number Diff line number Diff line change 6
6
hidden="{{!status}}"
7
7
style="z-index:{{zIndex}}">
8
8
<view class="toast-bg" wx:if="{{mask}}"></view>
9
- <view class="toast toast-{{placement || 'bottom'}}" style="{{ placement || 'bottom' === 'bottom' ? image || icon ? 'padding-top: 25rpx': '': ''}}" >
9
+ <view class="toast toast-{{placement || 'bottom'}}" style="padding-top:{{( placement || 'bottom') === 'bottom' ? image || icon ? '25rpx': '': ''}};position:relative;left:{{offsetX}}rpx;top:{{offsetY}}rpx " >
10
10
<image class="toast-icon"
11
11
wx:if="{{image}}"
12
12
src="{{image}}"
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ Component({
68
68
type : Boolean ,
69
69
value : true ,
70
70
} ,
71
+ offsetX :Number ,
72
+ offsetY :Number
71
73
72
74
} ,
73
75
@@ -118,7 +120,9 @@ Component({
118
120
center = true ,
119
121
mask = false ,
120
122
success = null ,
121
- complete = null
123
+ complete = null ,
124
+ offsetX = 0 ,
125
+ offsetY = 0 ,
122
126
} = options ;
123
127
this . setData ( {
124
128
title,
@@ -132,7 +136,9 @@ Component({
132
136
mask,
133
137
show : true ,
134
138
success,
135
- complete
139
+ complete,
140
+ offsetY,
141
+ offsetX
136
142
} ) ;
137
143
this . changeStatus ( ) ;
138
144
return this ;
Original file line number Diff line number Diff line change 6
6
hidden="{{!status}}"
7
7
style="z-index:{{zIndex}}">
8
8
<view class="toast-bg" wx:if="{{mask}}"></view>
9
- <view class="toast toast-{{placement || 'bottom'}}" style="{{ placement || 'bottom' === 'bottom' ? image || icon ? 'padding-top: 25rpx': '': ''}}" >
9
+ <view class="toast toast-{{placement || 'bottom'}}" style="padding-top:{{( placement || 'bottom') === 'bottom' ? image || icon ? '25rpx': '': ''}};position:relative;left:{{offsetX}}rpx;top:{{offsetY}}rpx " >
10
10
<image class="toast-icon"
11
11
wx:if="{{image}}"
12
12
src="{{image}}"
Original file line number Diff line number Diff line change 31
31
placement="{{currentConf.placement}}"
32
32
duration="{{currentConf.duration}}"
33
33
center="{{currentConf.center}}"
34
- mask="{{currentConf.mask}}"
34
+ mask="{{currentConf.mask}}"
35
35
/>
36
36
37
37
</view>
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ Component({
68
68
type : Boolean ,
69
69
value : true ,
70
70
} ,
71
+ offsetX :Number ,
72
+ offsetY :Number
71
73
72
74
} ,
73
75
@@ -118,7 +120,9 @@ Component({
118
120
center = true ,
119
121
mask = false ,
120
122
success = null ,
121
- complete = null
123
+ complete = null ,
124
+ offsetX = 0 ,
125
+ offsetY = 0 ,
122
126
} = options ;
123
127
this . setData ( {
124
128
title,
@@ -132,7 +136,9 @@ Component({
132
136
mask,
133
137
show : true ,
134
138
success,
135
- complete
139
+ complete,
140
+ offsetY,
141
+ offsetX
136
142
} ) ;
137
143
this . changeStatus ( ) ;
138
144
return this ;
Original file line number Diff line number Diff line change 6
6
hidden="{{!status}}"
7
7
style="z-index:{{zIndex}}">
8
8
<view class="toast-bg" wx:if="{{mask}}"></view>
9
- <view class="toast toast-{{placement || 'bottom'}}" style="{{ placement || 'bottom' === 'bottom' ? image || icon ? 'padding-top: 25rpx': '': ''}}" >
9
+ <view class="toast toast-{{placement || 'bottom'}}" style="padding-top:{{( placement || 'bottom') === 'bottom' ? image || icon ? '25rpx': '': ''}};position:relative;left:{{offsetX}}rpx;top:{{offsetY}}rpx " >
10
10
<image class="toast-icon"
11
11
wx:if="{{image}}"
12
12
src="{{image}}"
You can’t perform that action at this time.
0 commit comments