Skip to content

Commit 3522e33

Browse files
committed
chore: demo
1 parent a8c666b commit 3522e33

File tree

5 files changed

+18
-34
lines changed

5 files changed

+18
-34
lines changed

demo-snippets/vue/ColorFilter.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const filters = {
3030
};
3131
3232
export default {
33-
data: function () {
33+
data() {
3434
return {
3535
colorMatrix: filters.nightVision,
3636
src: '~/assets/images/dessert.jpg'

demo-snippets/vue/Details.vue

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,12 @@
22
</script>
33

44
<template>
5-
<Page >
6-
<ActionBar>
5+
<Page>
6+
<ActionBar>
77
<Label text="Details" />
88
</ActionBar>
9-
<GridLayout rows="auto, *">
10-
<Img
11-
height="200"
12-
row="1"
13-
width="200"
14-
src="https://images.unsplash.com/photo-1615870216519-2f9fa575fa5c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8TWV4aWNhbiUyMGZvb2R8ZW58MHx8MHx8fDA%3D&auto=format&fit=crop&w=500&q=60"
15-
/>
16-
</GridLayout>
17-
</Page>
9+
<GridLayout rows="auto, *">
10+
<Img height="200" row="1" width="200" src="https://images.unsplash.com/photo-1615870216519-2f9fa575fa5c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8TWV4aWNhbiUyMGZvb2R8ZW58MHx8MHx8fDA%3D&auto=format&fit=crop&w=500&q=60" />
11+
</GridLayout>
12+
</Page>
1813
</template>

demo-snippets/vue/NavigationTest.vue

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,10 @@
55
</ActionBar>
66

77
<GridLayout rows="auto,*, auto">
8-
<Img
9-
height="200"
10-
width="200"
11-
src="https://images.unsplash.com/photo-1615870216519-2f9fa575fa5c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8TWV4aWNhbiUyMGZvb2R8ZW58MHx8MHx8fDA%3D&auto=format&fit=crop&w=500&q=60"
12-
/>
8+
<Img height="200" width="200" src="https://images.unsplash.com/photo-1615870216519-2f9fa575fa5c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8TWV4aWNhbiUyMGZvb2R8ZW58MHx8MHx8fDA%3D&auto=format&fit=crop&w=500&q=60" />
139

14-
<Button
15-
row="2"
16-
text="View Details"
17-
@tap="onNavigate"
18-
class="mt-4 px-4 py-2 bg-white border-2 border-blue-400 rounded-lg"
19-
horizontalAlignment="center"
20-
>
21-
</Button>
22-
</StackLayout>
10+
<Button row="2" text="View Details" @tap="onNavigate" class="mt-4 px-4 py-2 bg-white border-2 border-blue-400 rounded-lg" horizontalAlignment="center">
11+
</Button>
2312
</GridLayout>
2413
</Page>
2514
</template>
@@ -31,8 +20,8 @@ import Details from './Details.vue';
3120
export default {
3221
methods: {
3322
onNavigate(args) {
34-
this.$navigateTo(Details, {transition: {name: 'slideLeft', duration: 2000}});
35-
},
23+
this.$navigateTo(Details, { transition: { name: 'slideLeft', duration: 2000 } });
24+
}
3625
}
3726
};
3827
</script>

demo-snippets/vue/Simple.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<GridLayout rows="*, auto, auto, auto, auto, auto">
88
<StackLayout orientation="horizontal">
99
<NSImg backgroundColor="yellow" height="400" ref="opacityImg" verticalAlignment="center" borderRadius="100" width="50%" src="~/assets/images/dessert.jpg"> </NSImg>
10-
<NSImg backgroundColor="red" width="50%" height="100" verticalAlignment="center" borderRadius="100" :src="imgSource" > </NSImg>
10+
<NSImg backgroundColor="red" width="50%" height="100" verticalAlignment="center" borderRadius="100" :src="imgSource"> </NSImg>
1111
</StackLayout>
1212
<Button text="Set 1" row="1" @tap="onSeOpacityTo1"></Button>
1313
<Button text="Set 0.5" row="2" @tap="onSeOpacityTo05"></Button>
@@ -22,7 +22,7 @@
2222
import { ImageSource } from '@nativescript/core';
2323
2424
export default {
25-
data: function() {
25+
data() {
2626
return {
2727
// warning image source native android image will not be released!
2828
imgSource: ImageSource.fromFileSync('~/assets/images/drink.jpg')

demo-snippets/vue/ZoomImage.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
<Label text="Zoom Image" />
55
</ActionBar>
66

7-
<NSZoomImg :src="imgSource"/>
7+
<NSZoomImg :src="imgSource" />
88
</Page>
99
</template>
1010

1111
<script lang="ts">
1212
import { ImageSource } from '@nativescript/core';
1313
1414
export default {
15-
data: function() {
15+
data() {
1616
return {
1717
// warning image source native android image will not be released!
18-
imgSource: ImageSource.fromFileSync('~/assets/images/dessert.jpg')
18+
imgSource: ImageSource.fromFileSync('~/assets/images/drink.jpg')
1919
};
20-
},
20+
}
2121
};
2222
</script>
2323

0 commit comments

Comments
 (0)