2.2.6
https://jsfiddle.net/duyang/5nmpyavb/2/
注释代码中有说明,我写了一个正常版本的,也写了一个BUG版本的(已经注释,开启即可,同时把正常版本注释掉)
JSFiddle示例说明了一切,希望两种写法都能够被支持,因为有些场景需要支持两种写法
JSFiddle示例说明了一切,v-model表达式使用三元表达式有些局限
Thanks for reporting, it looks like a problem with the codegen. The code generated is isParentMenu ? buttons[0].name : buttons[0].sub_button[0].name = $event.target.value for the input event which will not set the value.
This is a wontfix - v-model expression must be something that is "assignable".
For your use case, it's much cleaner to have a top level v-if / v-else instead of multiple ternaries.
Most helpful comment
This is a wontfix - v-model expression must be something that is "assignable".
For your use case, it's much cleaner to have a top level v-if / v-else instead of multiple ternaries.