- page-container圆角模式配置有白边,可以优化掉吗?
[图片] [图片]
06-10 - IOS阻止scroll-view回弹,在使用page-container时失效,兼容问题?
使用的是MPX构建的小程序,父组件有scroll-view组件设置了bounces、enhanced后,IOS阻止scroll-view回弹会生效 原需求是在page-container包裹一个子组件,子组件里面也有一个scroll-view也设置了bounces、enhanced了,但是阻止回弹不生效,同时在子组件弹出后也就是showPage为true时,结果父组件scroll-view回弹失效 现在想要的效果是父子组件的两个scroll-view的回弹都被阻止 减少代码后,如下 <template> <scroll-view scroll-y="{{true}}" bounces="{{false}}" enhanced="{{true}}" style="height: 100vh; width: 100%" catchtouchmove="noop" > <view style="height: 500rpx; background: red">1111</view> <view style="height: 500rpx; background: green">222</view> <view style="height: 500rpx; background: black">333</view> <view style="height: 500rpx; background: red">3444</view> </scroll-view> <view style="width: 100rpx; height: 100rpx; position: absolute; bottom: 300rpx; left: 0; z-index: 1000; background: red" catchtap="showPageContainer" ></view> <page-container show="{{showPage}}" round="true" catchtouchmove="noop"></page-container> </template> <script lang="ts"> import mpx, { createComponent } from '@mpxjs/core' createComponent({ data: { showPage: false, }, methods: { showPageContainer() { this.showPage = true }, noop() {}, }, }) </script> <script name="json"> const result = { usingComponents: {}, } result.disableScroll = true result.navigationStyle = 'custom' module.exports = result </script>
03-14 - canvas 2d 绘制图片 怎么在图片上再绘制文字并居中啊?
[图片]
2023-10-07 - web-view里自定义分享按钮,button样式设置无效,怎样让button按钮样式生效?
[图片] [图片] 代码片段:https://developers.weixin.qq.com/s/R4H2GmmH7izm 另:<button open-type="share" style="...">分享</button> 这样写才显示 <view class="page-body"> <view class="page-section page-section-gap"> <web-view src="https://mp.weixin.qq.com/"> <cover-view style="position:fixed;right: 0px;bottom:13%;height:80px;width:80px;z-index:999999;background-color:red;"> <cover-image style="width:100%;height:100%;" src="{{imgSrc}}"></cover-image> <button open-type="share" style="position:absolute;top:0;left:0;height:100%;width:100%;opacity:0;z-index:9999999;"></button> </cover-view> </web-view> </view> </view>
2022-05-19 - 屏幕截图API有吗?
想问下微信小程序有页面截图的API吗?
2021-12-18 - 苹果真机swiper嵌套scrollView,swiper滑动时scroll-view绝对定位失效?
苹果真机调试swiper里嵌套scroll-view,在scroll-view图层上添加一个绝对定位元素,当swiper滑动时,绝对定位元素别scroll-view覆盖了[图片] <view> <swiper> <swiper-item class="swiper"> <view class="swiper-item-wrapper"> <view class="swiper-item-pos"></view> <scroll-view scroll-y style="height: 500rpx;" > <view class="scroll-view-item">1</view> <view class="scroll-view-item">2</view> <view class="scroll-view-item">3</view> <view class="scroll-view-item">4</view> <view class="scroll-view-item">6</view> <view class="scroll-view-item">7</view> </scroll-view> </view> </swiper-item> <swiper-item> <view class="swiper-item-wrapper"> <view class="swiper-item-pos"></view> <scroll-view scroll-y style="height: 500rpx;" > <view class="scroll-view-item">one</view> <view class="scroll-view-item">two</view> <view class="scroll-view-item">three</view> <view class="scroll-view-item">four</view> <view class="scroll-view-item">five</view> <view class="scroll-view-item">six</view> <view class="scroll-view-item">seven</view> </scroll-view> </view> </swiper-item> <swiper-item> <view class="swiper-item-wrapper"> <view class="swiper-item-pos"></view> <scroll-view scroll-y style="height: 500rpx;" > <view class="scroll-view-item">一</view> <view class="scroll-view-item">二</view> <view class="scroll-view-item">三</view> <view class="scroll-view-item">四</view> <view class="scroll-view-item">五</view> <view class="scroll-view-item">六</view> <view class="scroll-view-item">七</view> </scroll-view> </view> </swiper-item> </swiper> </view> .swiper-item-wrapper { position: relative; background: yellow; border-radius: 30rpx; } .swiper-item-pos { position: absolute; left: 0; top: 0; height: 150rpx; width: 100rpx; background-color: red; z-index: 999; } .scroll-view-item { width: 100%; height: 100rpx; margin-bottom: 10rpx; background-color: aquamarine; }
2021-11-25 - ts文件中,调用wx.previewMedia,提示类型Wx上不存在属性previewMedia?
[图片]
2021-04-29 - 怎么获取小程序页面加载时长?,并在加载完成后触发函数,求解
需求:页面加载成功时触发,计算加载时间,触发函数
2020-05-25