Skip to content

Commit 5d7562e

Browse files
committed
test: demo app
1 parent 9d7f21e commit 5d7562e

File tree

5 files changed

+44
-7
lines changed

5 files changed

+44
-7
lines changed

demo-vue/app/examples/BottomSheet.vue

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
</ActionBar>
66
<StackLayout>
77
<MDButton id="bottomsheet" text="bottomsheet" @tap="onTap" />
8+
<MDButton id="dont_ignore_top_safe_area" text="dont_ignore_top_safe_area" @tap="onTap" />
9+
<MDButton id="ignore_bottom_safe_area" text="ignore_bottom_safe_area" @tap="onTap" />
10+
<MDButton id="dont_ignore_top_ignore_bottom_safe_area" text="dont_ignore_top_ignore_bottom_safe_area" @tap="onTap" />
811
<MDButton id="bottomsheet-keyboard" text="bottomsheet-keyboard" @tap="onTap" />
912
</StackLayout>
1013
</Page>
@@ -48,6 +51,37 @@ export default Vue.extend({
4851
});
4952
break;
5053
}
54+
case 'dont_ignore_top_safe_area': {
55+
(this as NativeScriptVue).$showBottomSheet(BottomSheetInner, {
56+
ignoreTopSafeArea:false,
57+
// transparent:true,
58+
closeCallback: objId => {
59+
console.log('bottom sheet closed');
60+
}
61+
});
62+
break;
63+
}
64+
case 'ignore_bottom_safe_area': {
65+
(this as NativeScriptVue).$showBottomSheet(BottomSheetInner, {
66+
// transparent:true,
67+
ignoreBottomSafeArea:true,
68+
closeCallback: objId => {
69+
console.log('bottom sheet closed');
70+
}
71+
});
72+
break;
73+
}
74+
case 'dont_ignore_top_ignore_bottom_safe_area': {
75+
(this as NativeScriptVue).$showBottomSheet(BottomSheetInner, {
76+
// transparent:true,
77+
ignoreTopSafeArea:false,
78+
ignoreBottomSafeArea:true,
79+
closeCallback: objId => {
80+
console.log('bottom sheet closed');
81+
}
82+
});
83+
break;
84+
}
5185
case 'bottomsheet-keyboard': {
5286
(this as NativeScriptVue).$showBottomSheet(BottomSheetInnerKeyboard, {
5387
closeCallback: objId => {

demo-vue/app/examples/BottomSheetInner.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<template>
2-
<MDCardView backgroundColor="green" @shownInBottomSheet="onShownInBottomSheet" borderRadius="20" elevation="30">
2+
<!-- <Page iosOverflowSafeArea="true"> -->
3+
<MDCardView @shownInBottomSheet="onShownInBottomSheet" borderRadius="20" elevation="30" backgroundColor="red">
34
<StackLayout>
45
<MDButton id="test1" text="test1" borderRadius="20" margin="20" />
56
<MDButton id="test2" text="test2" />
67
</StackLayout>
78
</MDCardView>
9+
<!-- </Page> -->
810
</template>
911

1012
<script lang="ts">

demo-vue/app/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ if (isIOS) {
7171
}
7272

7373
// import { getExamples } from './examples';
74-
import * as views from './views';
74+
import * as views from './views';
7575

7676
// for (let item of getExamples()) {
7777
// Vue.component(item.component.name, item.component);
7878
// }
7979

8080
Vue.component(views.Home.name, views.Home);
8181

82-
Vue.config.silent = false;
82+
Vue.config.silent = true;
8383

8484
Vue.config.errorHandler = (e, vm, info) => {
8585
console.log('vue error', e, e.stack);

demo-vue/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
"nativescript": {
77
"id": "org.nativescript.demovuematerial",
88
"tns-android": {
9-
"version": "6.3.1"
9+
"version": "6.4.1"
1010
},
1111
"tns-ios": {
12-
"version": "6.3.0"
12+
"version": "6.4.1"
1313
}
1414
},
1515
"dependencies": {
16-
"@nativescript/core": "6.3.2",
17-
"nativescript-vue-template-compiler": "^2.1.14",
16+
"@nativescript/core": "6.4.1",
17+
"nativescript-vue-template-compiler": "^2.4.0",
1818
"nativescript-vue": "~2.4.0",
1919
"nativescript-akylas-vue": "2.5.0-alpha.10",
2020
"nativescript-iqkeyboardmanager": "^1.5.1",

demo-vue/webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ module.exports = env => {
5959
'nativescript-material-core/core': '#/core/core.' + platform,
6060
'nativescript-material-core/android/utils$': '#/core/android/utils',
6161
'nativescript-material-core/cssproperties$': '#/core/cssproperties',
62+
'nativescript-material-core/textbase/cssproperties$': '#/core/textbase/cssproperties',
6263

6364
'nativescript-material-bottomsheet$': '#/bottomsheet/bottomsheet.' + platform,
6465
'nativescript-material-bottomsheet/vue$': '#/bottomsheet/vue/index',

0 commit comments

Comments
 (0)