25586
This commit is contained in:
		| @@ -44,7 +44,7 @@ | ||||
|                 type="text" | ||||
|                 icon="iconfont iconExported" | ||||
|                 class="list-item__operate--item" | ||||
|                 @click="downloadImg(item.url)"> | ||||
|                 @click="downloadImg(item.url, dict.getLabel('villagePictureAlbumType', item.type))"> | ||||
|                 下载 | ||||
|               </el-button> | ||||
|               <el-button | ||||
| @@ -158,7 +158,7 @@ | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       downloadImg (url) { | ||||
|       downloadImg (url, name) { | ||||
|         let image = new Image() | ||||
|         image.setAttribute('crossOrigin', 'anonymous') | ||||
|         image.onload = function() { | ||||
| @@ -170,7 +170,7 @@ | ||||
|           let url = canvas.toDataURL("image/png") | ||||
|           let a = document.createElement("a") | ||||
|           let event = new MouseEvent("click") | ||||
|           a.download = '二维码' | ||||
|           a.download = name | ||||
|           a.href = url | ||||
|           a.dispatchEvent(event) | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user