优化 去除图片转换逻辑

This commit is contained in:
YuanFeng 2024-10-24 00:12:48 +08:00
parent 21a0ca112e
commit 7f7acfea0c
2 changed files with 34 additions and 34 deletions

View File

@ -258,23 +258,23 @@ export default defineComponent({
}
}, info)
if(!this.hrefBase64 && this.cellInfo.style.shape.href && this.cellInfo.style.shape.href.indexOf("data:image") < 0){
// DataUri.imageToDataUri(this.cellInfo.style.shape.href,
// function (nu, url) {
// console.log("base64 ")
// //
// // @ts-ignore
// this.hrefBase64 = url; //
// }
// );
convertImageToBase64(this.cellInfo.style.shape.href).then((res)=>{
// @ts-ignore
this.hrefBase64 = res
console.log("base64 完成")
// this.cellInfo.style.shape.href = res
})
}
// if(!this.hrefBase64 && this.cellInfo.style.shape.href && this.cellInfo.style.shape.href.indexOf("data:image") < 0){
// // DataUri.imageToDataUri(this.cellInfo.style.shape.href,
// // function (nu, url) {
// // console.log("base64 ")
// // //
// // // @ts-ignore
// // this.hrefBase64 = url; //
// // }
//
// // );
// convertImageToBase64(this.cellInfo.style.shape.href).then((res)=>{
// // @ts-ignore
// this.hrefBase64 = res
// console.log("base64 ")
// // this.cellInfo.style.shape.href = res
// })
// }
setTimeout(() => {
if (this.nodeInfo.store && this.nodeInfo.store.data) {
this.nodeInfo.store.data.data = this.cellInfo

View File

@ -258,23 +258,23 @@ export default defineComponent({
}
}, info)
if(!this.hrefBase64 && this.cellInfo.style.shape.href && this.cellInfo.style.shape.href.indexOf("data:image") < 0){
// DataUri.imageToDataUri(this.cellInfo.style.shape.href,
// function (nu, url) {
// console.log("base64 ")
// //
// // @ts-ignore
// this.hrefBase64 = url; //
// }
// );
convertImageToBase64(this.cellInfo.style.shape.href).then((res)=>{
// @ts-ignore
this.hrefBase64 = res
console.log("base64 完成")
// this.cellInfo.style.shape.href = res
})
}
// if(!this.hrefBase64 && this.cellInfo.style.shape.href && this.cellInfo.style.shape.href.indexOf("data:image") < 0){
// // DataUri.imageToDataUri(this.cellInfo.style.shape.href,
// // function (nu, url) {
// // console.log("base64 ")
// // //
// // // @ts-ignore
// // this.hrefBase64 = url; //
// // }
//
// // );
// convertImageToBase64(this.cellInfo.style.shape.href).then((res)=>{
// // @ts-ignore
// this.hrefBase64 = res
// console.log("base64 ")
// // this.cellInfo.style.shape.href = res
// })
// }
setTimeout(() => {
if (this.nodeInfo.store && this.nodeInfo.store.data) {
this.nodeInfo.store.data.data = this.cellInfo