Skip to content

Commit c783ae3

Browse files
committed
chore” demo
1 parent 1a33a3e commit c783ae3

File tree

5 files changed

+31
-42
lines changed

5 files changed

+31
-42
lines changed

demo-snippets/vue/BasicPager.vue

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ export default {
2727
data() {
2828
return {
2929
items: [
30-
{title: "First", color: "#e67e22"},
31-
{title: "Second", color: "#3498db"},
32-
{title: "Third", color: "#e74c3c"},
33-
{title: "Fourth", color: "#9b59b6"},
30+
{ title: 'First', color: '#e67e22' },
31+
{ title: 'Second', color: '#3498db' },
32+
{ title: 'Third', color: '#e74c3c' },
33+
{ title: 'Fourth', color: '#9b59b6' }
3434
]
35-
}
35+
};
3636
},
3737
methods: {
3838
moveTo3() {
@@ -46,7 +46,6 @@ export default {
4646
</script>
4747

4848
<style lang="scss" scoped>
49-
5049
.page Label {
5150
font-size: 35;
5251
text-align: center;
@@ -55,5 +54,4 @@ export default {
5554
color: #ffffff;
5655
text-transform: uppercase;
5756
}
58-
59-
</style>
57+
</style>

demo-snippets/vue/Indicator.vue

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,22 @@
1313
</GridLayout>
1414
</v-template>
1515
</Pager>
16-
<PagerIndicator pagerViewId="pager" type="fill" verticalAlignment="bottom" horizontalAlignment="center" marginBottom="10"/>
17-
<Button row="1" text="Reset" @tap="resetPager" />
16+
<PagerIndicator pagerViewId="pager" type="fill" verticalAlignment="bottom" horizontalAlignment="center" marginBottom="10" />
17+
<Button row="1" text="Reset" @tap="resetPager" />
1818
</GridLayout>
1919
</Page>
2020
</template>
2121

2222
<script>
23-
2423
export default {
2524
data() {
2625
return {
2726
selectedIndex: 2,
2827
items: [
29-
{title: 'First', color: '#e67e22'},
30-
{title: 'Second', color: '#3498db'},
31-
{title: 'Third', color: '#e74c3c'},
32-
{title: 'Fourth', color: '#9b59b6'},
28+
{ title: 'First', color: '#e67e22' },
29+
{ title: 'Second', color: '#3498db' },
30+
{ title: 'Third', color: '#e74c3c' },
31+
{ title: 'Fourth', color: '#9b59b6' }
3332
]
3433
};
3534
},
@@ -38,7 +37,7 @@ export default {
3837
this.selectedIndex = 0;
3938
},
4039
selectedIndexChange(args) {
41-
console.log("SELECTED INDEX CHANGES", args.value)
40+
console.log('SELECTED INDEX CHANGES', args.value);
4241
this.selectedIndex = args.value;
4342
}
4443
}

demo-snippets/vue/RenderIssue.vue

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<template>
32
<Page>
43
<ActionBar>
@@ -20,7 +19,7 @@
2019
</StackLayout>
2120
<StackLayout marginBottom="50">
2221
<Label :text="item.field3" />
23-
<StackLayout v-show="item.field3" backgroundColor="blue" height="10" width="10"/>
22+
<StackLayout v-show="item.field3" backgroundColor="blue" height="10" width="10" />
2423
</StackLayout>
2524
</StackLayout>
2625
</v-template>
@@ -34,18 +33,16 @@ export default {
3433
data() {
3534
return {
3635
items: [
37-
{ field1: true, field2: true, field3: true},
38-
{ field1: true, field2: true, field3: false},
39-
{ field1: true, field2: false, field3: true},
40-
{ field1: false, field2: true, field3: true},
41-
{ field1: false, field2: true, field3: true},
42-
{ field1: true, field2: true, field3: false},
36+
{ field1: true, field2: true, field3: true },
37+
{ field1: true, field2: true, field3: false },
38+
{ field1: true, field2: false, field3: true },
39+
{ field1: false, field2: true, field3: true },
40+
{ field1: false, field2: true, field3: true },
41+
{ field1: true, field2: true, field3: false }
4342
]
44-
}
43+
};
4544
}
4645
};
4746
</script>
4847

49-
<style lang="scss" scoped>
50-
51-
</style>
48+
<style lang="scss" scoped></style>

demo-snippets/vue/StaticPager.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</ActionBar>
77

88
<StackLayout class="page">
9-
<Pager height="100%" peaking="30" spacing="10">
9+
<Pager height="100%" peaking="30">
1010
<PagerItem backgroundColor="#e67e22"><Label text="First" /></PagerItem>
1111
<PagerItem backgroundColor="#3498db"><Label text="Second" /></PagerItem>
1212
<PagerItem backgroundColor="#e74c3c"><Label text="Third" /></PagerItem>
@@ -21,13 +21,11 @@ export default {};
2121
</script>
2222

2323
<style lang="scss" scoped>
24-
2524
.page Label {
2625
font-size: 35;
2726
horizontal-alignment: center;
2827
vertical-alignment: center;
2928
color: #ffffff;
3029
text-transform: uppercase;
3130
}
32-
33-
</style>
31+
</style>

demo-snippets/vue/Transformer.vue

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,25 @@
1818
</template>
1919

2020
<script>
21-
2221
import { Pager } from '@nativescript-community/ui-pager';
2322
import transformer from '@nativescript-community/ui-pager/transformers/Scale';
2423
25-
Pager.registerTransformer('scale', transformer)
24+
Pager.registerTransformer('scale', transformer);
2625
export default {
2726
data() {
2827
return {
2928
items: [
30-
{title: "First", color: "#e67e22"},
31-
{title: "Second", color: "#3498db"},
32-
{title: "Third", color: "#e74c3c"},
33-
{title: "Fourth", color: "#9b59b6"},
29+
{ title: 'First', color: '#e67e22' },
30+
{ title: 'Second', color: '#3498db' },
31+
{ title: 'Third', color: '#e74c3c' },
32+
{ title: 'Fourth', color: '#9b59b6' }
3433
]
35-
}
34+
};
3635
}
3736
};
3837
</script>
3938

4039
<style lang="scss" scoped>
41-
4240
.page Label {
4341
font-size: 35;
4442
text-align: center;
@@ -47,5 +45,4 @@ export default {
4745
color: #ffffff;
4846
text-transform: uppercase;
4947
}
50-
51-
</style>
48+
</style>

0 commit comments

Comments
 (0)