File tree Expand file tree Collapse file tree 4 files changed +56
-2
lines changed Expand file tree Collapse file tree 4 files changed +56
-2
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<Page >
3
3
<ActionBar >
4
- <NavigationButton text =" Back" android.systemIcon =" ic_menu_back" @tap = " $navigateBack " />
4
+ <NavigationButton text =" Back" android.systemIcon =" ic_menu_back" />
5
5
<Label text =" Basic Pager" />
6
6
</ActionBar >
7
7
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <Page >
3
+ <ActionBar >
4
+ <NavigationButton text =" Back" android.systemIcon =" ic_menu_back" />
5
+ <Label text =" Basic Pager" />
6
+ </ActionBar >
7
+
8
+ <StackLayout class =" page" >
9
+ <Pager for =" item in items" height =" 100%" transformers =" scale" >
10
+ <v-template >
11
+ <GridLayout :backgroundColor =" item.color" >
12
+ <Label :text =" item.title" />
13
+ </GridLayout >
14
+ </v-template >
15
+ </Pager >
16
+ </StackLayout >
17
+ </Page >
18
+ </template >
19
+
20
+ <script >
21
+
22
+ import { Pager } from ' @nativescript-community/ui-pager' ;
23
+ import transformer from ' @nativescript-community/ui-pager/transformers/Scale' ;
24
+
25
+ Pager .registerTransformer (' scale' , transformer)
26
+ export default {
27
+ data () {
28
+ return {
29
+ items: [
30
+ {title: " First" , color: " #e67e22" },
31
+ {title: " Second" , color: " #3498db" },
32
+ {title: " Third" , color: " #e74c3c" },
33
+ {title: " Fourth" , color: " #9b59b6" },
34
+ ]
35
+ }
36
+ }
37
+ };
38
+ </script >
39
+
40
+ <style lang="scss" scoped>
41
+
42
+ .page Label {
43
+ font-size : 35 ;
44
+ text-align : center ;
45
+ width : 100% ;
46
+ vertical-alignment : center ;
47
+ color : #ffffff ;
48
+ text-transform : uppercase ;
49
+ }
50
+
51
+ </style >
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import Pager from '@nativescript-community/ui-pager/vue';
4
4
import StaticPager from './StaticPager.vue' ;
5
5
import BasicPager from './BasicPager.vue' ;
6
6
import Indicator from './Indicator.vue' ;
7
+ import Transformer from './Transformer.vue' ;
7
8
import RenderIssue from './RenderIssue.vue' ;
8
9
9
10
export function installPlugin ( ) {
@@ -14,6 +15,7 @@ export function installPlugin() {
14
15
export const demos = [
15
16
{ name : 'Static Pager' , path : 'static' , component : StaticPager } ,
16
17
{ name : 'Basic Pager' , path : 'basic' , component : BasicPager } ,
18
+ { name : 'Transformer' , path : 'Transformer' , component : Transformer } ,
17
19
{ name : 'Indicator' , path : 'indicator' , component : Indicator } ,
18
20
{ name : 'Render Issue' , path : 'indicator' , component : RenderIssue }
19
21
] ;
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ Run the following command from the root of your project:
35
35
| autoPlay | ` boolean ` |
36
36
| disableSwipe | ` boolean ` |
37
37
| showIndicator | ` boolean ` |
38
+ | transformers | ` string ` |
38
39
39
40
40
41
```
@@ -128,4 +129,4 @@ import transformer from '@nativescript-community/ui-pager/transformers/Scale';
128
129
129
130
Pager .registerTransformer (' scale' , transformer )
130
131
```
131
- Then you can use that transformer with the ` transformer ` property of ` Pager `
132
+ Then you can use that transformer with the ` transformers ` property of ` Pager `
You can’t perform that action at this time.
0 commit comments