render: function (h) {
return h('div', {
directives: [{name: 'if', value: this.List.length > 5}]
})
}
[Vue warn]: Failed to resolve directive: if
(found in <Anonymous>)
render: function (h) {
if (this.List.length <= 5) return h('');
return h('div', { ... });
}
display: none
, оставляя сам узел в структуре страницы.