mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import * as view from "tns-core-modules/ui/core/view";
|
||||
import * as pages from "tns-core-modules/ui/page";
|
||||
import { View, Page } from "@nativescript/core";
|
||||
|
||||
export function applyTap(args) {
|
||||
var page = <pages.Page>(<view.View>args.object).page;
|
||||
var page = <Page>(<View>args.object).page;
|
||||
var css = "#test-element { " + args.object.tag + " }";
|
||||
page.css = css;
|
||||
}
|
||||
|
||||
export function resetTap(args) {
|
||||
var page = <pages.Page>(<view.View>args.object).page;
|
||||
var page = <Page>(<View>args.object).page;
|
||||
page.css = "";
|
||||
}
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import { EventData } from "tns-core-modules/data/observable";
|
||||
import { View } from "tns-core-modules/ui/core/view";
|
||||
import { Button } from "tns-core-modules/ui/button";
|
||||
import { Color } from "tns-core-modules/color";
|
||||
import { TextView } from "tns-core-modules/ui/text-view";
|
||||
import { ScrollView } from "tns-core-modules/ui/scroll-view";
|
||||
import { EventData, Frame, Button, ScrollView, TextView, Color, View } from "@nativescript/core";
|
||||
|
||||
let red = new Color("red");
|
||||
let green = new Color("green");
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { EventData, Observable } from "tns-core-modules/data/observable";
|
||||
import { Page } from "tns-core-modules/ui/page";
|
||||
import * as frame from "tns-core-modules/ui/frame";
|
||||
import { EventData, Page, Observable, Frame } from "@nativescript/core";
|
||||
|
||||
export function navigatingTo(args: EventData) {
|
||||
const page = <Page>args.object;
|
||||
@@ -8,7 +6,7 @@ export function navigatingTo(args: EventData) {
|
||||
}
|
||||
|
||||
export function onNavBtnTap(args) {
|
||||
frame.topmost().goBack();
|
||||
Frame.topmost().goBack();
|
||||
}
|
||||
|
||||
export class TestPage extends Observable {
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import { EventData } from "tns-core-modules/data/observable";
|
||||
import { SubMainPageViewModel } from "../sub-main-page-view-model";
|
||||
import { WrapLayout } from "tns-core-modules/ui/layouts/wrap-layout";
|
||||
import { Page } from "tns-core-modules/ui/page";
|
||||
import { EventData, Page, WrapLayout } from "@nativescript/core";
|
||||
|
||||
export function pageLoaded(args: EventData) {
|
||||
const page = <Page>args.object;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { Label } from "tns-core-modules/ui/label";
|
||||
import { EventData, TextBase } from "tns-core-modules/ui/text-base";
|
||||
import { Page } from "tns-core-modules/ui/page";
|
||||
import { EventData, Page, TextBase, Label } from "@nativescript/core";
|
||||
|
||||
export function foxTap(args: EventData) {
|
||||
let page = <Page>(<any>args.object).page;
|
||||
|
||||
Reference in New Issue
Block a user