123456789101112131415161718192021222324252627282930313233343536 |
- <view catchtouchmove="stop">
- <view class="tui-fab-box {{!left || (left && right)?'tui-fab-right':''}}" style="left:{{parse.getLeft(left,right)}};right:{{parse.getRight(left,right)}};bottom:{{bottom}}rpx">
- <view class="tui-fab-btn {{isOpen?'tui-visible':''}} {{hidden?'tui-fab-hidden':''}}">
- <view class="tui-fab-item-box {{left && !right && item.imgUrl?'tui-fab-item-left':''}}" wx:for="{{btnList}}" wx:key="{{index}}" catchtap="handleClick" data-index="{{index}}">
- <view class="{{left && !right?'tui-text-left':'tui-text-right'}}" wx:if="{{item.imgUrl}}" style="font-size:{{item.fontSize}}rpx;color:{{item.color}}">{{item.text || ""}}</view>
- <view class="tui-fab-item" style="width:{{width}}rpx;height:{{height}}rpx;background :{{item.bgColor || bgColor}};border-radius:{{radius}}">
- <view class="tui-fab-title" wx:if="{{!item.imgUrl}}" style="font-size:{{item.fontSize}}rpx;color:{{item.color}}">{{item.text || ""}}</view>
- <image src="{{item.imgUrl}}" class="tui-fab-img" wx:else style="width:{{item.imgWidth}}rpx;height:{{item.imgHeight}}rpx"></image>
- </view>
- </view>
- </view>
- <view class="tui-fab-item {{isOpen?'tui-active':''}}" style="width:{{width}}rpx;height:{{height}}rpx;border-radius:{{radius}};background:{{bgColor}};color:{{color}}" catchtap="handleClick" data-index="-1">
- <view class="tui-fab-icon tui-icon-plus"></view>
- </view>
- </view>
- <view class="tui-fab-mask {{isOpen? 'tui-visible': ''}} " bindtap="handleClickCancel"></view>
- </view>
- <wxs module="parse">
- module.exports = {
- getLeft: function(left,right) {
- var val = "auto "
- if (left && !right) {
- val =left + 'rpx'
- }
- return val
- },
- getRight:function(left,right){
- var val = right + 'rpx'
- if (left && !right) {
- val = "auto "
- }
- return val
- }
- }
- </wxs>
|