Vue.js 模板错误:Unexpected token '{' in {{item.imgurl}}
The error message suggests that there is an issue with the template code in your Vue component. Specifically, it highlights an unexpected token '{' in the expression {{item.imgurl}} that is used as a binding for the src attribute of an <image> tag.
To resolve this error, you need to remove the curly braces from the :src binding so that it becomes :src="item.imgurl". The corrected code should look like this:
<template>
<view class="new">
<view class="new-title">自动驾驶</view>
<image :src="item.imgurl" mode="aspectFit"></image>
</view>
<view class="new-like">什么意思,怎么解决</view>
</template>
By removing the curly braces, you are now using the correct syntax for Vue's attribute binding.
原文地址: https://www.cveoy.top/t/topic/qc8Z 著作权归作者所有。请勿转载和采集!