import { WuSwipeCell } from '@itrain/wu-ui'
WuSwipeCell({
customLeft: this.renderBasicLeft,
customContent: this.renderBasicContent,
customRight: this.renderBasicRight,
})
@Builder
renderBasicContent() {
WuCell({
title: '单元格',
value: '内容',
bordered: false,
})
}
@Builder
renderBasicLeft() {
Button('选择')
.type(ButtonType.Normal)
.height('100%')
}
@Builder
renderBasicRight() {
Row() {
Button('删除')
.type(ButtonType.Normal)
.backgroundColor(Color.Red)
.height('100%')
Button('收藏')
.type(ButtonType.Normal)
.height('100%')
}
}
WuSwipeCell({
customContent: this.renderCustomContent,
customRight: this.renderCustomRight,
})
@Builder
renderCustomContent() {
WuCard({
thumb: $r('app.media.banner1'),
title: '这是商品标题',
price: 9.9,
num: 18,
tag: 'hot'
})
}
@Builder
renderCustomRight() {
Button('删除')
.type(ButtonType.Normal)
.backgroundColor(Color.Red)
.height('100%')
}