mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Text transform - no default value
This commit is contained in:
@@ -19,6 +19,7 @@ export function pageLoaded(args: EventData) {
|
||||
examples.set("tabmore", "tab-view/tab-view-more");
|
||||
examples.set("tabViewCss", "tab-view/tab-view-css");
|
||||
examples.set("tab-view-icons", "tab-view/tab-view-icon");
|
||||
examples.set("text-transform", "tab-view/text-transform");
|
||||
|
||||
let viewModel = new SubMainPageViewModel(wrapLayout, examples);
|
||||
page.bindingContext = viewModel;
|
||||
|
||||
18
apps/app/ui-tests-app/tab-view/text-transform.ts
Normal file
18
apps/app/ui-tests-app/tab-view/text-transform.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Page } from "tns-core-modules/ui/page";
|
||||
|
||||
const CSS = `
|
||||
#tab1 { text-transform: none; }
|
||||
#tab2 { text-transform: lowercase; }
|
||||
#tab3 { text-transform: uppercase; }
|
||||
#tab4 { text-transform: capitalize; }
|
||||
`
|
||||
|
||||
export function applyTap(args) {
|
||||
var page = <Page>args.object.page;
|
||||
page.css = CSS;
|
||||
}
|
||||
|
||||
export function resetTap(args) {
|
||||
var page = <Page>args.object.page;
|
||||
page.css = "";
|
||||
}
|
||||
29
apps/app/ui-tests-app/tab-view/text-transform.xml
Normal file
29
apps/app/ui-tests-app/tab-view/text-transform.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="onNavigate">
|
||||
<TabView>
|
||||
<TabView.items>
|
||||
<TabViewItem title="tAb ViEw" id="tab1">
|
||||
<TabViewItem.view>
|
||||
<StackLayout>
|
||||
<Button text="apply" tap="applyTap"/>
|
||||
<Button text="reset" tap="resetTap"/>
|
||||
</StackLayout>
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
<TabViewItem title="tAb ViEw" id="tab2">
|
||||
<TabViewItem.view>
|
||||
<Label text="empty tab" />
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
<TabViewItem title="tAb ViEw" id="tab3">
|
||||
<TabViewItem.view>
|
||||
<Label text="empty tab" />
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
<TabViewItem title="tAb ViEw" id="tab4">
|
||||
<TabViewItem.view>
|
||||
<Label text="empty tab" />
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
</TabView.items>
|
||||
</TabView>
|
||||
</Page>
|
||||
Reference in New Issue
Block a user