iOS:add ListItem actions api

This commit is contained in:
pengfei.zhou
2021-04-23 19:05:33 +08:00
committed by osborn
parent cc7df5d2ca
commit e18b7e781e
18 changed files with 167 additions and 36 deletions

View File

@@ -1,11 +1,17 @@
import { View, Superview, NativeViewModel } from "../ui/view";
import { Stack } from "./layouts";
import { BridgeContext } from "../runtime/global";
import { Color } from "../util/color";
export declare class ListItem extends Stack {
/**
* Set to reuse native view
*/
identifier?: string;
actions?: {
title: string;
backgroundColor?: Color;
callback: () => void;
}[];
}
export declare class List extends Superview {
private cachedViews;

View File

@@ -31,6 +31,10 @@ __decorate([
Property,
__metadata("design:type", String)
], ListItem.prototype, "identifier", void 0);
__decorate([
Property,
__metadata("design:type", Array)
], ListItem.prototype, "actions", void 0);
export class List extends Superview {
constructor() {
super(...arguments);