vue组件上面拼接字符串

993 阅读1分钟

直接上代码

<a  
     v-for="(item,index) of floorsList" 
    :key="index"
    :href="['#'+item.val]"
   >这是字符串拼接
</a>
<img :src="['xxx(需要拼接的字符串)'+img]" alt="" width="100%" height="auto" />
:title="` ${item.name} ` "