当前位置:网站首页>Vant weave swipecell sets multiple buttons

Vant weave swipecell sets multiple buttons

2022-07-05 06:26:00 Heerey525

situation

stay weapp There is no code to set two buttons in the document
 stay weapp There is no code to set two buttons in the document
Unfortunately, after looking around, I didn't find a solution

Solution

On the console, I see that in fact <view slot="right"> Width is not enough. , It's not that the second button doesn't come out .
Found to have right-width This attribute , hold right-width Bigger to accommodate more buttons

Code

<van-swipe-cell right-width="{
    { 130 }}" left-width="{
    { 65 }}">
  <view slot="left"> choice </view>
  <van-cell-group>
    <van-cell title=" Cell " value=" Content " />
  </van-cell-group>
  <view slot="right">
  	<van-button type="primary" > edit </van-button>
    <van-button type="danger" > Delete </van-button>
  </view>
</van-swipe-cell>
原网站

版权声明
本文为[Heerey525]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050623068773.html