it('v-for', function (done) {
new Vue({
el: el,
template: '<test v-for="n in list" :n="n"></test>',
data: {
list: [1, 2, 3]
},
components: {
test: function (resolve) {
setTimeout(function () {
resolve({
props: ['n'],
template: '{{n}}'
})
next()
}, 0)
}
}
})
function next () {
expect(el.textContent).toBe('123')
done()
}
})
I think it should be OK if we have
template: '<test v-for="n in list" n="n"></test>',
omit the ":"
:n is a shorthand of v-bind:n.
sorry I mean
template: '<test v-for="n in list" n="n"></test>' should be Okay
@yyx990803 this is kind of like a feature request XD
@fnlctrl
Please make sure to read the Issue Reporting Guidelines before opening new issues. The issue list only accepts bug reports and feature requests. Questions should be posted to the Gitter chat room, forum or StackOverflow. Thanks.
Most helpful comment
Please make sure to read the Issue Reporting Guidelines before opening new issues. The issue list only accepts bug reports and feature requests. Questions should be posted to the Gitter chat room, forum or StackOverflow. Thanks.