|
5 | 5 | </ActionBar> |
6 | 6 |
|
7 | 7 | <GridLayout rows="*, auto, auto, auto, auto, auto"> |
8 | | - <NSImg ref="opacityImg" |
| 8 | + <NSImg |
| 9 | + ref="opacityImg" |
9 | 10 | verticalAlignment="center" |
10 | | - blurRadius="25" |
| 11 | + borderRadius="100" |
11 | 12 | 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 | + > |
13 | 15 | </NSImg> |
14 | 16 | <Button text="Set 1" row="1" @tap="onSeOpacityTo1"></Button> |
15 | 17 | <Button text="Set 0.5" row="2" @tap="onSeOpacityTo05"></Button> |
|
21 | 23 | </template> |
22 | 24 |
|
23 | 25 | <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 | + }); |
47 | 48 | } |
48 | | - }; |
| 49 | + } |
| 50 | +}; |
49 | 51 | </script> |
50 | 52 |
|
51 | 53 | <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 |
55 | 57 |
|
56 | | - // Custom styles |
57 | | - .fa { |
58 | | - color: $accent-dark; |
59 | | - } |
| 58 | +// Custom styles |
| 59 | +.fa { |
| 60 | + color: $accent-dark; |
| 61 | +} |
60 | 62 |
|
61 | | - .info { |
62 | | - font-size: 20; |
63 | | - } |
| 63 | +.info { |
| 64 | + font-size: 20; |
| 65 | +} |
64 | 66 | </style> |
0 commit comments