|
本帖最后由 海螺一枚 于 2018-7-13 17:53 编辑
设备:小米
现象:ViewModel 更新数据,第一次更新界面正常,之后的所有更新都无效
代码:- <input id="input-text" class="input-text" type="text" enterkeytype="done" placeholder="查单词或翻译句子..." value="{{inputValue}}" onenterkeyclick="onEnterkeyclick"/>
-
-
- export default {
- data: {
- inputValue: "onInit"
- },
-
- onEnterkeyclick(e) {
- console.log("onEnterkeyclick: ", e.value)
- //this.inputValue = ""
- this.$set('inputValue', "")
- // this.$forceUpdate()
- },
- }
复制代码
|
|