js: add slidePosition

This commit is contained in:
pengfei.zhou
2023-04-04 19:49:10 +08:00
committed by osborn
parent f1177e27b4
commit 930593fe0c
11 changed files with 98 additions and 14 deletions

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { View, Property, Superview, NativeViewModel } from "../ui/view";
import { View, Property, Superview, NativeViewModel, InconsistProperty } from "../ui/view";
import { Stack } from "./layouts";
import { layoutConfig } from "../util/layoutconfig";
import { BridgeContext } from "../runtime/global";
@@ -71,7 +71,7 @@ export class List extends Superview {
@Property
onScrollEnd?: (offset: { x: number, y: number }) => void
@Property
@InconsistProperty
scrolledPosition?: number
@Property

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Superview, View, Property } from "../ui/view";
import { Superview, View, Property, InconsistProperty } from "../ui/view";
import { Stack } from "./layouts";
import { layoutConfig } from "../util/layoutconfig";
import { BridgeContext } from "../runtime/global";
@@ -71,6 +71,9 @@ export class Slider extends Superview {
@Property
slideStyle?: "zoomOut" | { type: "zoomOut", minScale: number, maxScale: number }
@InconsistProperty
slidePosition?: number
/**
* Reload all list items.
* @param context