Skip to content

Commit fe28955

Browse files
committed
test: demo
1 parent b6eb63b commit fe28955

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

demo-vue/app/components/Home.vue

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
</ActionBar>
66

77
<GridLayout rows="*, auto, auto, auto, auto, auto">
8-
<NSImg ref="opacityImg"
8+
<NSImg
9+
ref="opacityImg"
910
verticalAlignment="center"
10-
blurRadius="25"
11+
borderRadius="100"
1112
placeholderImageUri="res://ns_logo"
12-
src="https://raw.githubusercontent.com/nativescript-community/ui-image/master/examples-data/breakfast1.jpg">
13+
src="https://raw.githubusercontent.com/nativescript-community/ui-image/master/examples-data/breakfast1.jpg"
14+
>
1315
</NSImg>
1416
<Button text="Set 1" row="1" @tap="onSeOpacityTo1"></Button>
1517
<Button text="Set 0.5" row="2" @tap="onSeOpacityTo05"></Button>
@@ -21,44 +23,44 @@
2123
</template>
2224

2325
<script>
24-
export default {
25-
methods: {
26-
onSeOpacityTo1(args) {
27-
this.$refs.opacityImg.nativeView.opacity = 1;
28-
},
29-
onSeOpacityTo01(args) {
30-
this.$refs.opacityImg.nativeView.opacity = 0.1;
31-
},
32-
onSeOpacityTo05(args) {
33-
this.$refs.opacityImg.nativeView.opacity = 0.5;
34-
},
35-
onAnimateTo01(args) {
36-
this.$refs.opacityImg.nativeView.animate({
37-
opacity: 0.1,
38-
duration: 500
39-
});
40-
},
41-
onAnimateTo1(args) {
42-
this.$refs.opacityImg.nativeView.animate({
43-
opacity: 1,
44-
duration: 500
45-
});
46-
}
26+
export default {
27+
methods: {
28+
onSeOpacityTo1(args) {
29+
this.$refs.opacityImg.nativeView.opacity = 1;
30+
},
31+
onSeOpacityTo01(args) {
32+
this.$refs.opacityImg.nativeView.opacity = 0.1;
33+
},
34+
onSeOpacityTo05(args) {
35+
this.$refs.opacityImg.nativeView.opacity = 0.5;
36+
},
37+
onAnimateTo01(args) {
38+
this.$refs.opacityImg.nativeView.animate({
39+
opacity: 0.1,
40+
duration: 500
41+
});
42+
},
43+
onAnimateTo1(args) {
44+
this.$refs.opacityImg.nativeView.animate({
45+
opacity: 1,
46+
duration: 500
47+
});
4748
}
48-
};
49+
}
50+
};
4951
</script>
5052

5153
<style scoped lang="scss">
52-
// Start custom common variables
53-
@import '../app-variables';
54-
// End custom common variables
54+
// Start custom common variables
55+
@import '../app-variables';
56+
// End custom common variables
5557
56-
// Custom styles
57-
.fa {
58-
color: $accent-dark;
59-
}
58+
// Custom styles
59+
.fa {
60+
color: $accent-dark;
61+
}
6062
61-
.info {
62-
font-size: 20;
63-
}
63+
.info {
64+
font-size: 20;
65+
}
6466
</style>

demo/app/app.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import * as app from '@nativescript/core/application';
33

44
import * as imageModule from '@nativescript-community/ui-image';
55

6-
imageModule.setDebug(true);
7-
86
if (app.android) {
97
app.on(app.launchEvent, () => {
108
imageModule.initialize({ isDownsampleEnabled: true });

0 commit comments

Comments
 (0)