File tree Expand file tree Collapse file tree 5 files changed +7
-13
lines changed Expand file tree Collapse file tree 5 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export function renderMixin (Vue: Class<Component>) {
69
69
resolveSlots ( vm , _renderChildren )
70
70
}
71
71
// render self
72
- let vnode = render . call ( vm . _renderProxy )
72
+ let vnode = render . call ( vm . _renderProxy , vm . $createElement )
73
73
// return empty vnode in case the render function errored out
74
74
if ( ! ( vnode instanceof VNode ) ) {
75
75
if ( process . env . NODE_ENV !== 'production' && Array . isArray ( vnode ) ) {
Original file line number Diff line number Diff line change @@ -123,8 +123,7 @@ describe('Directive v-on', () => {
123
123
data : {
124
124
ok : true
125
125
} ,
126
- render ( ) {
127
- const h = this . $createElement
126
+ render ( h ) {
128
127
return this . ok
129
128
? h ( 'input' , { on : { click : this . foo } } )
130
129
: h ( 'input' , { on : { input : this . bar } } )
@@ -155,8 +154,7 @@ describe('Directive v-on', () => {
155
154
template : '<div></div>'
156
155
}
157
156
} ,
158
- render ( ) {
159
- const h = this . $createElement
157
+ render ( h ) {
160
158
return this . ok
161
159
? h ( 'test' , { on : { foo : this . foo } } )
162
160
: h ( 'test' , { on : { bar : this . bar } } )
Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ describe('Directive v-ref', () => {
28
28
it ( 'should work as a hyperscript prop' , ( ) => {
29
29
const vm = new Vue ( {
30
30
components,
31
- render ( ) {
32
- const h = this . $createElement
31
+ render ( h ) {
33
32
return h ( 'div' , null , [
34
33
h ( 'test' , { ref : 'test' } )
35
34
] )
Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ describe('Options el', () => {
29
29
el . innerHTML = '<span>{{message}}</span>'
30
30
const vm = new Vue ( {
31
31
el,
32
- render ( ) {
33
- const h = this . $createElement
32
+ render ( h ) {
34
33
return h ( 'p' , { staticAttrs : { id : 'app' } } , [
35
34
h ( 'span' , { } , [ this . message ] )
36
35
] )
Original file line number Diff line number Diff line change @@ -3,8 +3,7 @@ import Vue from 'entries/web-runtime'
3
3
describe ( 'Options render' , ( ) => {
4
4
it ( 'basic usage' , ( ) => {
5
5
const vm = new Vue ( {
6
- render ( ) {
7
- const h = this . $createElement
6
+ render ( h ) {
8
7
const children = [ ]
9
8
for ( let i = 0 ; i < this . items . length ; i ++ ) {
10
9
children . push ( h ( 'li' , { staticClass : 'task' } , [ this . items [ i ] . name ] ) )
@@ -25,8 +24,7 @@ describe('Options render', () => {
25
24
26
25
it ( 'allow null data' , ( ) => {
27
26
const vm = new Vue ( {
28
- render ( ) {
29
- const h = this . $createElement
27
+ render ( h ) {
30
28
return h ( 'div' , null , 'hello' /* string as children*/ )
31
29
}
32
30
} ) . $mount ( )
You can’t perform that action at this time.
0 commit comments