<input @paste="pasting">
pasting(e) {
// console.log(e.clipboardData.files[0])
if (e.clipboardData.files[0]) {//获取剪切板图片
this.$http.Imgupload(e.clipboardData.files[0]).then(res => {
let imgtaghtml = '<img src="' + this.$baseURL + res.data.msg.path + '" style="width:80px;height:80px;"/>'
})
}
// else{
// }
},
<p v-html="message" @click="getdetail"></p>
假设message里有多个img标签,getdetail可以获取被点击的img对象
v-text有显示标签
v-html会解析标签