mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: require relative path within tns-core-modules
This commit is contained in:
@@ -78,7 +78,7 @@ export module capitalizationType {
|
||||
let frame: typeof frameModule;
|
||||
export function getCurrentPage(): Page {
|
||||
if (!frame) {
|
||||
frame = require("ui/frame");
|
||||
frame = require("../frame");
|
||||
}
|
||||
|
||||
let topmostFrame = frame.topmost();
|
||||
@@ -108,7 +108,7 @@ let textField: View;
|
||||
|
||||
export function getButtonColors(): { color: Color, backgroundColor: Color } {
|
||||
if (!button) {
|
||||
const Button = require("ui/button").Button;
|
||||
const Button = require("../button").Button;
|
||||
button = new Button;
|
||||
if (isIOS) {
|
||||
button._setupUI({});
|
||||
@@ -127,7 +127,7 @@ export function getButtonColors(): { color: Color, backgroundColor: Color } {
|
||||
|
||||
export function getLabelColor(): Color {
|
||||
if (!label) {
|
||||
const Label = require("ui/label").Label;
|
||||
const Label = require("../label").Label;
|
||||
label = new Label;
|
||||
if (isIOS) {
|
||||
label._setupUI({});
|
||||
@@ -144,7 +144,7 @@ export function getLabelColor(): Color {
|
||||
|
||||
export function getTextFieldColor(): Color {
|
||||
if (!textField) {
|
||||
const TextField = require("ui/text-field").TextField;
|
||||
const TextField = require("../text-field").TextField;
|
||||
textField = new TextField();
|
||||
if (isIOS) {
|
||||
textField._setupUI({});
|
||||
|
||||
Reference in New Issue
Block a user