fix: 从设计详情点编辑按钮进入 canvas时的从Library选择图片
This commit is contained in:
@@ -108,6 +108,10 @@ const props = defineProps({
|
||||
isGeneral: { // 从generalMiniCanvas来的
|
||||
type: Boolean,
|
||||
default:false
|
||||
},
|
||||
isEdit: { // 从design点击喜欢过的图片,再点击顶部的编辑图标
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
});
|
||||
|
||||
@@ -720,8 +724,8 @@ const handleImageSelect = (data) => {
|
||||
})
|
||||
}
|
||||
function triggerLibrary() {
|
||||
console.log('打开收藏')
|
||||
if (props.isGeneral) {
|
||||
// console.log('CanvasEditor', '打开收藏')
|
||||
if (props.isGeneral || props.isEdit) {
|
||||
selectImages.value.init()
|
||||
} else {
|
||||
emit("trigger-library");
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<editCanvas v-if="canvasLoad" :config="canvasConfig"
|
||||
@canvasInit="canvasInit"
|
||||
@changeCanvas="changeCanvas"
|
||||
is-edit
|
||||
:clothingImageUrl="selectDetail.undividedLayer || selectDetail.path"
|
||||
showFixedLayer
|
||||
:canvasJSON="canvasJSON"
|
||||
@@ -32,6 +33,7 @@
|
||||
:clothingImageUrl="selectDetail.path"
|
||||
:redGreenImageUrl="frontBack.front[imgDomIndex].maskUrl"
|
||||
@trigger-red-green-mouseup="frontBackChange"
|
||||
is-edit
|
||||
:clothing-image-opts="{
|
||||
imageMode:'contains',
|
||||
}"
|
||||
@@ -292,6 +294,7 @@ export default defineComponent({
|
||||
saveCanvas('auto')
|
||||
},3000)
|
||||
}
|
||||
|
||||
onBeforeUnmount(()=>{
|
||||
let front = detailData.frontBack.front[detailData.imgDomIndex]
|
||||
let back = detailData.frontBack.back[detailData.imgDomIndex]
|
||||
|
||||
Reference in New Issue
Block a user