提交 92c41735 编写于 作者: 雪洛's avatar 雪洛

fix: 修正web端不正常的示例

上级 b5f7ba32
......@@ -23,11 +23,13 @@
</view>
</view>
<!--#ifdef APP -->
<view slot="refresher">
<view class="head-img-box-1">
<image class="img" ref="head-img-1" src="/static/template/pull-zoom-image/head-img.jpg" mode="scaleToFill"></image>
</view>
</view>
<!--#endif-->
</scroll-view>
</template>
......@@ -51,7 +53,7 @@
s = 0.7
}
let x : number = (1 - s) * -100
this.setElementStyle("user-info", "transform", `translate(${x},${y + (s-1)* -50}px) scale(${s})`)
this.setElementStyle("user-info", "transform", `translate(${x}px, ${y + (s-1)* -50}px) scale(${s})`)
this.setElementStyle("head-img-box-2", "transform", `translateY(${y}px)`)
},
onRefresherpulling(e : RefresherEvent) {
......
......@@ -57,7 +57,7 @@
onScroll(e : ScrollEvent) {
let scrollTop = e.detail.scrollTop
this.boxNode?.style?.setProperty('height', (125 - (scrollTop > this.statusBarHeight ? this.statusBarHeight : scrollTop)) + 'px');
this.boxNode?.style?.setProperty('backgroundColor', 'rgba(255, 255, 255, ' + (scrollTop * 3 > 100 ? 100 : scrollTop * 3) / 100.0 + ')');
this.boxNode?.style?.setProperty('background-color', 'rgba(255, 255, 255, ' + (scrollTop * 3 > 100 ? 100 : scrollTop * 3) / 100.0 + ')');
this.navNode?.style?.setProperty('opacity', 1 - (scrollTop * 3 > 100 ? 100 : scrollTop * 3) / 100.0);
this.searchNode?.style?.setProperty('width', 700 - (scrollTop > 40 ? 40 : scrollTop) + 'rpx');
this.searchNode?.style?.setProperty('top', 0 - (scrollTop > 40 ? 40 : scrollTop) + 'px');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册