mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 13:22:19 +08:00
18 lines
710 B
TypeScript
18 lines
710 B
TypeScript
import view = require("ui/core/view");
|
|
import observable = require("data/observable");
|
|
import label = require("ui/label");
|
|
|
|
export function butonTap(args) {
|
|
var btn = <view.View>args.object;
|
|
var lbl = <label.Label>btn.parent.getViewById("Label1");
|
|
|
|
if (lbl.style.textDecoration === "underline") {
|
|
lbl.style.textDecoration = "line-through";
|
|
} else if (lbl.style.textDecoration === "line-through") {
|
|
lbl.style.textDecoration = "line-through underline";
|
|
} else if (lbl.style.textDecoration === "line-through underline") {
|
|
lbl.style.textDecoration = "none";
|
|
} else if (lbl.style.textDecoration === "none") {
|
|
lbl.style.textDecoration = "underline";
|
|
}
|
|
} |