vue 字符串拼接

vue,,,js代码中怎么拼接字符串
如下:const model = '<img src="' + res.full_url + '" width=100 height=100>';
这么写的话报错了

阅读 5k
2 个回答

使用`

const model = `<img src="${res.full_url}" width=100 height=100>`;

最好和data数据绑定

推荐问题