index.wxml 1.07 KB
<view class="my-action-sheet-bg {{isShow ? 'open' : ''}}" hidden="{{!isSwitch}}" catchtap="tapSheet" data-index="-2">
    <view class="my-action-sheet" animation="{{indicatorAnimation}}">
        <view class="sheet-item icon" wx:if="{{menus[0].icon}}">
            <button open-type="{{item.type}}" plain="true" hover-class="none" catchtap="tapSheet"
                wx:for="{{menus}}" wx:key="index" data-index="{{index}}" data-type="{{item.type}}">
                <view class="conver">
                    <image src="{{item.icon}}"></image>
                </view>
                <view class="text ellipsis">{{item.name}}</view>
            </button>
        </view>
        <block wx:else>
            <view class="sheet-item" catchtap="tapSheet"
                wx:for="{{menus}}" wx:key="index" data-index="{{index}}" data-type="{{item.type}}">
                <button open-type="{{item.type}}" plain="true" hover-class="none">{{item.name}}</button>
            </view>
        </block>
        <view class="sheet-item" catchtap="tapSheet" data-index="-1">取消</view>
    </view>
</view>