forked from gzzfw/frontEnd/gzDyh

zhangyongtian
2024-09-08 f7452b9d6295748c9840245d26df6514e8ed2c1d
1
2
3
4
5
6
7
8
9
10
11
12
<!--components/tooltip/index.wxml-->
<view
    class="tooltip"
    style="{{ placement === 'left' ? 'left:0;' : placement === 'right' ? 'right:0;' : 'left:50%;margin-left:-'+ width / 2 + 'rpx' }}"
    wx:if="{{ visible }}"
>
    <view
        class="tooltip-arrow"
        style="{{ placement === 'left' ? 'left:24rpx;' : placement === 'right' ? 'right:24rpx;' : 'left:50%;margin-left:-16rpx' }}"
    />
    <view class="tooltip-content" style="width:{{ width }}rpx;{{ fontsize ? 'font-size: ' + fontsize : '' }}">{{ content }}</view>
</view>