备份
这个提交包含在:
父节点
7b1ce19c39
当前提交
67a57048ad
@ -57,6 +57,7 @@ export { WindowHelper } from './src/main/ets/utils/WindowHelper'
|
||||
export { LoadingView } from './src/main/ets/view/LoadingView'
|
||||
export { SafeView } from './src/main/ets/view/SafeView'
|
||||
export { RefreshView } from './src/main/ets/view/refresh/RefreshView'
|
||||
export { SwipeView } from './src/main/ets/view/SwipeView'
|
||||
/**
|
||||
* 自定义view
|
||||
*/
|
||||
|
||||
35
src/main/ets/view/SwipeView.ets
普通文件
35
src/main/ets/view/SwipeView.ets
普通文件
@ -0,0 +1,35 @@
|
||||
@Component
|
||||
export struct SwipeView {
|
||||
@State h: Length = 40
|
||||
|
||||
@Builder
|
||||
doNothingBuilder() {
|
||||
}
|
||||
|
||||
@BuilderParam customBuilderParam: () => void = this.doNothingBuilder
|
||||
|
||||
// @BuilderParam btnBuilder: () => void = this.doNothingBuilder
|
||||
|
||||
build() {
|
||||
Scroll() {
|
||||
Row() {
|
||||
this.customBuilderParam()
|
||||
Text('删除')
|
||||
.backgroundColor('red')
|
||||
.width(70)
|
||||
.fontColor('white')
|
||||
.height(this.h)
|
||||
.textAlign(TextAlign.Center)
|
||||
.fontSize(16)
|
||||
// if (this.btnBuilder === this.doNothingBuilder) {
|
||||
// Text('删除')
|
||||
// }
|
||||
// if (this.btnBuilder !== this.doNothingBuilder) {
|
||||
// this.btnBuilder()
|
||||
// }
|
||||
}.onSizeChange((oldValue: SizeOptions, newValue: SizeOptions) => {
|
||||
this.h = newValue.height ?? 40
|
||||
}).alignItems(VerticalAlign.Center)
|
||||
}.width('100%').scrollable(ScrollDirection.Horizontal).scrollBar(BarState.Off)
|
||||
}
|
||||
}
|
||||
正在加载...
在新工单中引用
屏蔽一个用户