Commit a3602cc7 authored by zhengke's avatar zhengke

编辑可滚动, 更新封面图路由优化,导入模版过滤!visible

parent 3a9620d6
......@@ -18,7 +18,7 @@ export const ResolveThumbHandler = async (psd:any)=>{
Z_INDEX = 2000
const item = _children[i];
if(item.layer.artboard) {
if(item.layer.artboard && item.layer.visible) {
let cropImagePath = await cropImage(imgBase64String,"image/jpeg",item.layer.artboard().export().coords)
let imagePath = await compressionThumbnail(cropImagePath,"image/jpeg",600)
imgs.push(imagePath)
......
......@@ -370,7 +370,7 @@ provide(injectKeySlideScale, canvasScale)
.canvas {
height: 100%;
user-select: none;
overflow: hidden;
/* overflow: hidden; */
background-color: $lightGray;
position: relative;
}
......
......@@ -389,19 +389,21 @@
// mainStore.setDialogForExport(type)
let CoverImgPath = CoverImg.value.split('/')
let namePath = ''
let namePaths = ''
queryObj.value.CoverImg = ''
mainMenuVisible.value = false
isCoverImgStore.setIsCoverImg(true)
let datas = await exportFeatureImg(FeatureImgRef.value, 'jpeg', 1, false,0)
if(datas){
let t =new Date().getTime()
let name = new Date().getTime()+".jpg"
let name = new Date().getTime()+".jpeg"
const file = dataURLtoFile(datas, name)
let url = ''
if(CoverImgPath[CoverImgPath.length-1].indexOf('CoverImg_')==-1){
namePath = `CoverImg_${name}`
}else {
namePath = CoverImgPath[CoverImgPath.length-1]
namePaths = CoverImgPath[CoverImgPath.length-1]
namePath = namePaths.split('?')[0]
}
url = await AliyunUpload.UploadAsync(file,`Feature/${namePath}?t=${t}`)
coverImgStore.setCoverImg(url)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment