Skip to content

Commit 72b9c8b

Browse files
committed
chore: demo
1 parent e68a13b commit 72b9c8b

File tree

2 files changed

+31
-26
lines changed

2 files changed

+31
-26
lines changed

demo-snippets/vue/Ripples.vue

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
<template>
2-
<Page>
3-
<ActionBar :title="title">
4-
<NavigationButton text="Back"
5-
android.systemIcon="ic_menu_back"
6-
@tap="onNavigationButtonTap"></NavigationButton>
7-
</ActionBar>
8-
<StackLayout>
9-
<MDRipple backgroundColor="gray" rippleColor="green" width="100" height="100" borderRadius="10"/>
10-
<MDRipple width="100" height="100" borderRadius="10"/>
11-
</StackLayout>
12-
</Page>
2+
<Page>
3+
<ActionBar :title="title">
4+
<NavigationButton text="Back" android.systemIcon="ic_menu_back" @tap="onNavigationButtonTap"></NavigationButton>
5+
</ActionBar>
6+
<StackLayout>
7+
<MDRipple backgroundColor="gray" rippleColor="green" width="100" height="100" borderRadius="10" />
8+
<MDRipple width="100" height="100" borderRadius="10" />
9+
</StackLayout>
10+
</Page>
1311
</template>
1412

1513
<script lang="ts">
1614
import * as frameModule from '@nativescript/core/ui/frame';
17-
import Vue from 'vue'
15+
import Vue from 'vue';
1816
1917
export const title = 'Ripples sample';
2018
@@ -23,14 +21,14 @@ export default Vue.extend({
2321
2422
data() {
2523
return {
26-
title: title
24+
title
2725
};
2826
},
2927
3028
methods: {
3129
onNavigationButtonTap() {
3230
frameModule.Frame.topmost().goBack();
3331
}
34-
},
35-
})
32+
}
33+
});
3634
</script>

demo-snippets/vue/TextFields.vue

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<Button text="setSelection" @tap="$refs.textField1.nativeView.setSelection(1, 4)" />
1111
</StackLayout>
1212
<StackLayout backgroundColor="red" horizontalAlignment="center" orientation="horizontal">
13-
<Label width="20" height="20" backgroundColor="green" verticalAlignment="top"/>
13+
<Label width="20" height="20" backgroundColor="green" verticalAlignment="top" />
1414
<MDTextField
1515
ref="textField1"
1616
id="textField1"
@@ -20,6 +20,7 @@
2020
width="250"
2121
height="60"
2222
paddingTop="4"
23+
lineHeight="20"
2324
paddingBottom="0"
2425
paddingLeft="0"
2526
placeholderColor="green"
@@ -48,12 +49,18 @@
4849
floating="true"
4950
/>
5051
</GridLayout>
51-
<MDTextField id="textField34" hint="test"
52-
helper="helper text" helperColor="green" errorColor="purple"
53-
error="error text"
54-
class="md-textfield-outline" variant="outline"/>
55-
<MDTextField id="textField3" hint="filled" @focus="onFocus" @blur="onBlur" @textChange="onTextChange" @returnPress="onReturnPress" margin="10"
56-
text="this si a text not editable" editable="false" />
52+
<MDTextField id="textField34" hint="test" helper="helper text" helperColor="green" errorColor="purple" error="error text" class="md-textfield-outline" variant="outline" />
53+
<MDTextField
54+
id="textField3"
55+
hint="filled"
56+
@focus="onFocus"
57+
@blur="onBlur"
58+
@textChange="onTextChange"
59+
@returnPress="onReturnPress"
60+
margin="10"
61+
text="this si a text not editable"
62+
editable="false"
63+
/>
5764
<MDTextField
5865
id="textField4"
5966
variant="outline"
@@ -89,7 +96,7 @@
8996
variant="filled"
9097
required="true"
9198
email="true"
92-
maxLength="10"
99+
maxLength="10"
93100
hint="fill this out..."
94101
@focus="onFocus"
95102
@blur="onBlur"
@@ -108,8 +115,8 @@
108115
floating="false"
109116
@textChange="onTextChange"
110117
@returnPress="onReturnPress"
111-
keyboardType="decimal"
112-
digits="0123456789."
118+
keyboardType="decimal"
119+
digits="0123456789."
113120
margin="10"
114121
/>
115122
<MDTextField
@@ -140,7 +147,7 @@ export default Vue.extend({
140147
141148
data() {
142149
return {
143-
title: title,
150+
title,
144151
value: ''
145152
};
146153
},

0 commit comments

Comments
 (0)