如何解決內部屬性中的插值已被刪除。使用v-bind還是結腸速記?我的vue組件是這樣的:<template>
<div>
<div class="panel-group" v-for="item in list">
...
<div class="panel-body">
<a role="button" data-toggle="collapse" href="#purchase-{{ item.id }}" class="pull-right" aria-expanded="false" aria-controls="collapseOne">
Show
</a>
</div>
<div id="purchase-{{ item.id }}" class="table-responsive panel-collapse collapse" role="tabpanel">
...
</div>
</div>
</div></template><script>
export default {
...
computed: {
list: function() {
return this.$store.state.transaction.list
},
...
}
}</script>執行時,會出現如下錯誤:Vue模板語法錯誤:id =“purchase - {{item.id}}”:已移除內部屬性內插。改為使用v-bind或冒號。我該如何解決?
如何解決內部屬性中的插值已被刪除。使用v-bind還是結腸速記?
12345678_0001
2019-08-02 17:24:38