Commit a3602cc7 authored by zhengke's avatar zhengke

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

parent 3a9620d6
...@@ -18,7 +18,7 @@ export const ResolveThumbHandler = async (psd:any)=>{ ...@@ -18,7 +18,7 @@ export const ResolveThumbHandler = async (psd:any)=>{
Z_INDEX = 2000 Z_INDEX = 2000
const item = _children[i]; 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 cropImagePath = await cropImage(imgBase64String,"image/jpeg",item.layer.artboard().export().coords)
let imagePath = await compressionThumbnail(cropImagePath,"image/jpeg",600) let imagePath = await compressionThumbnail(cropImagePath,"image/jpeg",600)
imgs.push(imagePath) imgs.push(imagePath)
......
...@@ -370,7 +370,7 @@ provide(injectKeySlideScale, canvasScale) ...@@ -370,7 +370,7 @@ provide(injectKeySlideScale, canvasScale)
.canvas { .canvas {
height: 100%; height: 100%;
user-select: none; user-select: none;
overflow: hidden; /* overflow: hidden; */
background-color: $lightGray; background-color: $lightGray;
position: relative; position: relative;
} }
......
...@@ -389,19 +389,21 @@ ...@@ -389,19 +389,21 @@
// mainStore.setDialogForExport(type) // mainStore.setDialogForExport(type)
let CoverImgPath = CoverImg.value.split('/') let CoverImgPath = CoverImg.value.split('/')
let namePath = '' let namePath = ''
let namePaths = ''
queryObj.value.CoverImg = '' queryObj.value.CoverImg = ''
mainMenuVisible.value = false mainMenuVisible.value = false
isCoverImgStore.setIsCoverImg(true) isCoverImgStore.setIsCoverImg(true)
let datas = await exportFeatureImg(FeatureImgRef.value, 'jpeg', 1, false,0) let datas = await exportFeatureImg(FeatureImgRef.value, 'jpeg', 1, false,0)
if(datas){ if(datas){
let t =new Date().getTime() let t =new Date().getTime()
let name = new Date().getTime()+".jpg" let name = new Date().getTime()+".jpeg"
const file = dataURLtoFile(datas, name) const file = dataURLtoFile(datas, name)
let url = '' let url = ''
if(CoverImgPath[CoverImgPath.length-1].indexOf('CoverImg_')==-1){ if(CoverImgPath[CoverImgPath.length-1].indexOf('CoverImg_')==-1){
namePath = `CoverImg_${name}` namePath = `CoverImg_${name}`
}else { }else {
namePath = CoverImgPath[CoverImgPath.length-1] namePaths = CoverImgPath[CoverImgPath.length-1]
namePath = namePaths.split('?')[0]
} }
url = await AliyunUpload.UploadAsync(file,`Feature/${namePath}?t=${t}`) url = await AliyunUpload.UploadAsync(file,`Feature/${namePath}?t=${t}`)
coverImgStore.setCoverImg(url) 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