v-down-img
v1.0.0
Published
vue2给v-html下的img标签添加下载功能
Downloads
5
Readme
给 v-html 渲染的富文本中,添加图片添加下载图片的功能
用法:
先安装 npm install v-down-img
// main.js中引入
import vDownImg from "v-down-img";
import "v-down-img/index.css";
Vue.use(vDownImg);
// 使用
<div v-downImg v-html="dome"></div>
此时 v-html 下所渲染的图片会多一个鼠标移入的下载图标,点击即可下载图片