vue || 问题汇总 摘录
问题
问题1 :vue动态判断input readonly属性
只读:isReadOnly = true
可编辑:isReadOnly = false
<input :readonly="isReadOnly" />
问题2、- Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.
vue模板(template)应包含一个根元素。
问题原因:包含了多个<div></div> (只能由一个<div></div>包裹)
+ vue 判断数组是否为空
为空:array == undefined || array.length <= 0
不为空: array !==undefined && array.length > 0
浙公网安备 33010602011771号