新版本是不是不支持自定义的组件了
发布于 4 年前 作者 qiangdeng 13320 次浏览 来自 问答

一、因为业务需要,就自己实现的动态tabbar,在之前的开发者工具中都正常,新版本开发者工具(170907),就不显示了。

正常显示如图

新版本的bug

二、新版本对actionSheet的支持是不是不能自定义了。

wxml里的代码

<action-sheet hidden="{{ifHide}}">
   <block>
       
       <action-sheet-item  bindtap="">{{infoMessage}}action-sheet-item>
   block>
   <action-sheet-cancel class="cancel" bindtap="knowit">知道了action-sheet-cancel>
action-sheet>

在js里设置ifHide的值来控制显示,之前的效果:

在开发者工具(170907)中使用wx.showActionSheet可以显示,但是如果设置ifHide的值,就只能显示黑色的蒙层。不能显示内容。

三、actionSheet里选取不到元素

选取元素后,还是空白。。。

四、想自定义actionSheet的显示内容,比如显示时间组件

<action-sheet hidden="{{isEndDate}}" >
     <view style='margin-left:1rem;margin-right:1rem;'>
        <text class="">请选择结束时间</text>
        <include src="../../../common/dateTime/timeComp1.wxml" />
    </view>
    <action-sheet-cancel class="" bindtap="getEndDate">确定</action-sheet-cancel>
</action-sheet>

现在如果只能在itemList里面配置的话,好像只能是文字了,如下

wx.showActionSheet({
     itemList: ["请填写用户名","../../../common/dateTime/timeComp1.wxml"],
     success: function (res) {
       console.log(res.tapIndex);
     },
     fail: function (res) {
       console.log(res.errMsg);
     }
   })
1 回复

这么小的需求都不解决。真是蛋疼

回到顶部