File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed
platform/nativescript/runtime/components Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -24,17 +24,7 @@ export default {
24
24
'native-list-view' ,
25
25
{
26
26
ref : 'listView' ,
27
- on : {
28
- itemLoading : this . onItemLoading ,
29
- itemTap : args =>
30
- this . $emit (
31
- 'itemTap' ,
32
- Object . assign ( { item : this . items [ args . index ] } , args )
33
- ) ,
34
- loaded : args => this . $emit ( 'loaded' , args ) ,
35
- unloaded : args => this . $emit ( 'unloaded' , args ) ,
36
- loadMoreItems : args => this . $emit ( 'loadMoreItems' , args )
37
- } ,
27
+ on : this . _on ,
38
28
domProps : {
39
29
items : this . items ,
40
30
separatorColor : this . separatorColor
@@ -54,6 +44,20 @@ export default {
54
44
}
55
45
} ,
56
46
47
+ created ( ) {
48
+ this . _on = {
49
+ itemLoading : this . onItemLoading ,
50
+ itemTap : args =>
51
+ this . $emit (
52
+ 'itemTap' ,
53
+ Object . assign ( { item : this . items [ args . index ] } , args )
54
+ ) ,
55
+ loaded : args => this . $emit ( 'loaded' , args ) ,
56
+ unloaded : args => this . $emit ( 'unloaded' , args ) ,
57
+ loadMoreItems : args => this . $emit ( 'loadMoreItems' , args )
58
+ }
59
+ } ,
60
+
57
61
mounted ( ) {
58
62
this . getItemContext = ( item , index ) =>
59
63
getItemContext ( item , index , this . $props [ '+alias' ] , this . $props [ '+index' ] )
29D6
div>
You can’t perform that action at this time.
0 commit comments