fix: 默认剪裁功能丢失原图片信息
This commit is contained in:
parent
1864762de5
commit
3d09afd587
@ -71,7 +71,9 @@ const getCutDownResult = () => {
|
||||
const canvas = _cropper.getCroppedCanvas();
|
||||
let imgData = canvas.toDataURL('"image/png"');
|
||||
let currentTimeStamp = new Date().valueOf();
|
||||
emit("cutdone", Object.assign({ currentTimeStamp, msg: imgData }));
|
||||
let orgInfo = activeUploadFiles.value[0];
|
||||
console.log(orgInfo);
|
||||
emit("cutdone", Object.assign({ currentTimeStamp, cutResult: imgData,orginal:orgInfo }));
|
||||
let newFile = dataURLtoFile(imgData);
|
||||
commonUploadTransaction([newFile]);
|
||||
nextTick(() => clearAllCutEffect());
|
||||
@ -350,7 +352,10 @@ const cutTransaction = () => {};
|
||||
//内部方法 -> end
|
||||
</script>
|
||||
<template>
|
||||
<div class="layui-upload layui-upload-wrap" :class="disabledPreview?'layui-upload-file-disabled':''">
|
||||
<div
|
||||
class="layui-upload layui-upload-wrap"
|
||||
:class="disabledPreview ? 'layui-upload-file-disabled' : ''"
|
||||
>
|
||||
<input
|
||||
class="layui-upload-file"
|
||||
@click="clickOrgInput"
|
||||
@ -417,7 +422,10 @@ const cutTransaction = () => {};
|
||||
/>
|
||||
</div>
|
||||
</lay-layer>
|
||||
<div class="layui-upload-list" :class="disabledPreview?'layui-upload-list-disabled':''">
|
||||
<div
|
||||
class="layui-upload-list"
|
||||
:class="disabledPreview ? 'layui-upload-list-disabled' : ''"
|
||||
>
|
||||
<slot name="preview"></slot>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user