【问题标题】:Searching with input使用输入搜索
【发布时间】:2018-06-19 23:29:22
【问题描述】:

我不明白为什么,但我的搜索字段无法正确使用 Vue.js。

  • 首先,如果搜索结果不可用,我需要隐藏它。
  • 我的第二个问题是我不能在需要的地方使用变量。

附:哦,我忘了,我需要删除 div 和 'li' 之间的空格: sorry, I haven't access to post images because my reputation is low.
我会把我的代码放在这里:https://jsfiddle.net/4r2oqz2x/

【问题讨论】:

  • 这种映射真的很抱歉,StackOverflow关注jsfiddle链接

标签: javascript html css twitter-bootstrap vue.js


【解决方案1】:

你的线路

            <a href={{ searchResult.href }}><img src={{ searchResult.img }}>

应该是

           <a :href="searchResult.href"><img :src="searchResult.img">

How to solve Interpolation inside attributes has been removed. Use v-bind or the colon shorthand ? Vue.JS 2

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-02
    • 1970-01-01
    • 2021-10-09
    • 1970-01-01
    • 2021-11-23
    • 2021-06-16
    相关资源
    最近更新 更多