File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
platform/nativescript/runtime/components Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ import { patch } from '../patch'
2
2
3
3
export const VUE_VIEW = '__vueVNodeRef__'
4
4
5
+ let tid = 0
5
6
export default {
6
7
name : 'v-template' ,
7
8
8
9
props : {
9
10
name : {
10
- type : String ,
11
- default : 'default'
11
+ type : String
12
12
} ,
13
13
14
14
if : {
@@ -23,7 +23,7 @@ export default {
23
23
24
24
this . $parent . $templates = this . $parent . $templates || new TemplateBag ( )
25
25
this . $parent . $templates . registerTemplate (
26
- this . $props . name ,
26
+ this . $props . name || ( this . $props . if ? `v-template- ${ tid ++ } ` : 'default' ) ,
27
27
this . $props . if ,
28
28
this . $scopedSlots . default
29
29
)
Original file line number Diff line number Diff line change @@ -38,7 +38,12 @@ new Vue({
38
38
<Label :text="item.value" style="color: blue;"/>
39
39
</StackLayout>
40
40
</v-template>
41
- <v-template name="test" if="item.odd">
41
+ <v-template if="item.value.length == 2">
42
+ <StackLayout style="padding: 50;">
43
+ <Label :text="item.value" style="color: green;"/>
44
+ </StackLayout>
45
+ </v-template>
46
+ <v-template if="item.odd">
42
47
<StackLayout style="padding: 50;">
43
48
<Label :text="item.value" style="color: red;"/>
44
49
</StackLayout>
You can’t perform that action at this time.
0 commit comments