preface

Some time ago to write a small program, using the textarea highest tag, found there are quite a lot of bugs

When I use this component in the order page, I find that the textarea tag has the highest level and blocks the element below where I set the fixed attribute as shown below

Then I looked at the development document of wechat and found that wechat also had a top-ranking component called cover-view, so I started to change the code:

<view class="go_buy"> <view class="btn_lf"> {{dateutil. FM (totalPrice)}}</view> <view class="asdsad"></view> <view class="buy_btn" > Bindtap ="gobuy"> pay </view> </view>Copy the code

To:

<cover-view class="go_buy"> <cover-view class="btn_lf"> </cover-view> <cover-view class=" asdfDDd ">¥{{dateutil. FM (totalPrice)}}</cover-view> <cover-view Class ="asdsad"></cover-view> <cover-view class="buy_btn" bindtap="gobuy"> </cover-view>Copy the code

This will cover up the words in the Textarea box

conclusion

Note that you can only use cover-view or cover-image in a cover-view tag. As it turns out, you don’t have to use the cover-View, you can also set z-Index on the action button below.