1
1
//@license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3
2
2
3
- import Vue from 'nativescript-vue'
3
+ import { createApp , registerElement } from 'nativescript-vue'
4
4
5
5
import { FontIcon , fonticon } from '@nativescript-community/fonticon' ;
6
- import BottomSheetPlugin from '@nativescript-community/ui-material-bottomsheet/vue' ;
6
+ import { BottomSheetPlugin } from '@nativescript-community/ui-material-bottomsheet/vue3' ;
7
+ import { install as installBottomSheet } from "@nativescript-community/ui-material-bottomsheet" ;
7
8
import CanvasSVG from '@nativescript-community/ui-svg/vue' ;
8
9
import ButtonPlugin from '@nativescript-community/ui-material-button/vue' ;
9
- import WebViewPlugin from '@nativescript-community/ui-webview/vue' ;
10
+ import WebView from '@nativescript-community/ui-webview/vue' ;
10
11
import { CheckBox } from '@nstudio/nativescript-checkbox' ;
11
- import CollectionView from '@nativescript-community/ui-collectionview/vue ' ;
12
+ import CollectionView from '@nativescript-community/ui-collectionview/vue3 ' ;
12
13
import RipplePlugin from '@nativescript-community/ui-material-ripple/vue' ;
13
14
import { ImageCacheIt } from '@triniwiz/nativescript-image-cache-it' ;
14
15
@@ -20,25 +21,17 @@ import { initializeTracing } from './app-trace';
20
21
initializeTracing ( ) ;
21
22
ImageCacheIt . enableAutoMM ( ) ;
22
23
24
+ // Install BottomSheet plugin
25
+ installBottomSheet ( ) ;
26
+
23
27
FontIcon . paths = {
24
28
'fa' : './assets/css/Font-Awesome.css' ,
25
29
} ;
26
30
FontIcon . loadCssSync ( ) ;
27
- Vue . filter ( 'fonticon' , fonticon ) ;
28
-
29
- import { install } from "@nativescript-community/ui-material-bottomsheet" ;
30
- install ( ) ;
31
- Vue . use ( BottomSheetPlugin ) ;
32
-
33
- Vue . use ( CanvasSVG ) ;
34
- Vue . use ( ButtonPlugin ) ;
35
- Vue . use ( WebViewPlugin ) ;
36
- Vue . use ( CollectionView ) ;
37
- Vue . use ( RipplePlugin ) ;
38
31
39
- Vue . registerElement ( 'HTMLLabel' , ( ) => require ( '@nativescript-community/ui-label' ) . Label ) ;
40
- Vue . registerElement ( 'ImageCacheIt' , ( ) => require ( '@triniwiz/nativescript-image-cache-it' ) . ImageCacheIt ) ;
41
- Vue . registerElement (
32
+ registerElement ( 'HTMLLabel' , ( ) => require ( '@nativescript-community/ui-label' ) . Label ) ;
33
+ registerElement ( 'ImageCacheIt' , ( ) => require ( '@triniwiz/nativescript-image-cache-it' ) . ImageCacheIt ) ;
34
+ registerElement (
42
35
'CheckBox' ,
43
36
( ) => CheckBox ,
44
37
{
@@ -49,9 +42,18 @@ Vue.registerElement(
49
42
}
50
43
) ;
51
44
52
- Vue . config . silent = false ;
45
+ const app = createApp ( Main ) ;
46
+
47
+ app . config . globalProperties . $filters = {
48
+ fonticon : fonticon
49
+ } ;
50
+
51
+ app . use ( store ) ;
52
+ app . use ( WebView ) ;
53
+ app . use ( CollectionView ) ;
54
+ app . use ( CanvasSVG ) ;
55
+ app . use ( ButtonPlugin ) ;
56
+ app . use ( RipplePlugin ) ;
57
+ app . use ( BottomSheetPlugin ) ;
53
58
54
- new Vue ( {
55
- render : ( h ) => h ( 'frame' , [ h ( Main ) ] ) ,
56
- store
57
- } ) . $start ( )
59
+ app . start ( ) ;
0 commit comments