mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
14 lines
430 B
TypeScript
14 lines
430 B
TypeScript
import { View, EventData } from "tns-core-modules/ui/core/view";
|
|
|
|
export function setClass(args: EventData) {
|
|
const btn = (<View & { tag: any }>args.object);
|
|
const img = btn.page.getViewById<View>("img");
|
|
img.className = btn.tag;
|
|
}
|
|
|
|
export function setImg2Class(args: EventData) {
|
|
const btn = (<View & { tag: any }>args.object);
|
|
const img2 = btn.page.getViewById<View>("img2");
|
|
img2.className = btn.tag;
|
|
}
|