【问题标题】:Result vue.js to text input html结果 vue.js 到文本输入 html
【发布时间】:2018-07-31 14:31:07
【问题描述】:

我正在使用网络摄像头扫描二维码。 instascan

index.html 调用函数app.js(instascan/docs/..) 但我不能使用标签{{scan.content}} 中的结果值来标记输入类型文本以发送到java servlet

<transition-group name="scans" tag="ul">
<ul id="resultQR" v-for="scan in scans" :key="scan.date" :title="scan.content">
  {{ scan.content }}
</ul>   

我必须这样做

&lt;input type="text" name="qrcode" value="{{ scan.content }}"&gt;

【问题讨论】:

    标签: jquery html servlets vue.js qr-code


    【解决方案1】:

    问题在于:key 绑定。您没有匹配的键绑定。

    改变这个:

    v-for="scan in scans" :key="scan.date"
    

    有了这个:

    v-for="(scan,key) in scans" :key="key"
    

    现在,一切都会好起来的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-04-05
      • 2018-06-28
      • 2016-01-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-12
      • 1970-01-01
      相关资源
      最近更新 更多