@cloudbase/weda-ui-mp 3.27.0 → 3.27.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -95,15 +95,11 @@ Component({
|
|
|
95
95
|
const { windowWidth, windowHeight } = wx.getSystemInfoSync();
|
|
96
96
|
|
|
97
97
|
const widthRasio = (windowWidth * SCALE_RASIO_H5) / this.data.realWidth;
|
|
98
|
-
const heightRasio =
|
|
99
|
-
|
|
100
|
-
const scale
|
|
101
|
-
Math.min(widthRasio, heightRasio, ASPECT_RASIO) || ASPECT_RASIO;
|
|
102
|
-
const offsetHeight =
|
|
103
|
-
(windowHeight - this.data.realHeight * scale) * OFFSET_RASIO;
|
|
98
|
+
const heightRasio = (windowHeight * SCALE_RASIO_H5) / this.data.realHeight;
|
|
99
|
+
const scale = Math.min(widthRasio, heightRasio, ASPECT_RASIO) || ASPECT_RASIO;
|
|
100
|
+
const offsetHeight = (windowHeight - this.data.realHeight * scale) * OFFSET_RASIO;
|
|
104
101
|
|
|
105
|
-
const offsetWidth =
|
|
106
|
-
(windowWidth - this.data.realWidth * scale) * OFFSET_RASIO;
|
|
102
|
+
const offsetWidth = (windowWidth - this.data.realWidth * scale) * OFFSET_RASIO;
|
|
107
103
|
const showHeight = this.data.realHeight * scale;
|
|
108
104
|
const showWidth = this.data.realWidth * scale;
|
|
109
105
|
this.setData({
|
|
@@ -178,7 +174,7 @@ Component({
|
|
|
178
174
|
app.cloud
|
|
179
175
|
.getTempFileURL(src)
|
|
180
176
|
.then((res) => {
|
|
181
|
-
this.setData({ realSrc: res ||
|
|
177
|
+
this.setData({ realSrc: res || src });
|
|
182
178
|
})
|
|
183
179
|
.catch(() => {
|
|
184
180
|
this.setData({
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
after="{{after}}"
|
|
25
25
|
>
|
|
26
26
|
<block wx:if="{{stepOption === 'both'}}">
|
|
27
|
-
<wd-button className="{{root}}-btn size-{{_size}} {{stepMinusDisabled ? 'is-disabled' : ''}} {{root}}-btn__before " iconType="icon-only" iconPosition="before" iconSource="inner" variant="outline" theme="secondary" icon="td:remove" bind:
|
|
27
|
+
<wd-button className="{{root}}-btn size-{{_size}} {{stepMinusDisabled ? 'is-disabled' : ''}} {{root}}-btn__before " iconType="icon-only" iconPosition="before" iconSource="inner" variant="outline" theme="secondary" icon="td:remove" bind:tap="stepMinus"> </wd-button>
|
|
28
28
|
</block>
|
|
29
29
|
<wd-input-group before="{{before}}" after="{{after}}" block="{{true}}" size="{{_size}}" classRoot="{{classRoot}}" className="is-not-h5">
|
|
30
30
|
<view class="{{cls}}">
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
</view>
|
|
61
61
|
</wd-input-group>
|
|
62
62
|
<block wx:if="{{stepOption === 'both'}}">
|
|
63
|
-
<wd-button className="{{root}}-btn size-{{_size}} {{stepPlusDisabled ? 'is-disabled' : ''}} {{root}}-btn__after" iconType="icon-only" iconPosition="before" iconSource="inner" variant="outline" theme="secondary" icon="td:add" bind:
|
|
63
|
+
<wd-button className="{{root}}-btn size-{{_size}} {{stepPlusDisabled ? 'is-disabled' : ''}} {{root}}-btn__after" iconType="icon-only" iconPosition="before" iconSource="inner" variant="outline" theme="secondary" icon="td:add" bind:tap="stepAdd"> </wd-button>
|
|
64
64
|
</block>
|
|
65
65
|
</wd-form-item>
|
|
66
66
|
</block>
|