feat:any view can be used to be refreshable

This commit is contained in:
pengfei.zhou 2019-11-27 20:04:24 +08:00
parent 459aab61e3
commit 0fa35d3464
2 changed files with 3 additions and 5 deletions

View File

@ -35,7 +35,7 @@ class RefreshableDemo extends Panel {
refreshImage.setRotation(context, rotation)
},
}),
content: scroller(vlayout([
content: (vlayout([
title("Refreshable Demo"),
label('start Refresh').apply({
width: 300,
@ -99,9 +99,7 @@ class RefreshableDemo extends Panel {
layoutConfig: layoutConfig().atmost().h(LayoutSpec.WRAP_CONTENT),
gravity: gravity().center(),
space: 10,
} as IVLayout)).apply({
layoutConfig: layoutConfig().atmost(),
})
} as IVLayout))
}).apply({
bgColor: Color.YELLOW
}).in(rootView)

View File

@ -5,7 +5,7 @@ import { BridgeContext } from "../runtime/global";
import { layoutConfig } from "./declarative";
export interface IRefreshable extends IView {
content: List | Scroller
content: View
header?: View
onRefresh?: () => void
}