feat: 从收藏中选择图片组件
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
<div class="canvas" ref="canvasBox">
|
||||
<editCanvas
|
||||
@changeCanvas="changeCanvas"
|
||||
@trigger-library="triggerLibrary"
|
||||
:canvasJSON="canvasJSON"
|
||||
ref="editCanvas">
|
||||
<template #existsImageList>
|
||||
@@ -76,6 +77,12 @@
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
</a-modal>
|
||||
<SelectImages
|
||||
ref="selectImages"
|
||||
@select="handleImageSelect"
|
||||
:api="Https.httpUrls.queryLibraryPage"
|
||||
isLibrary
|
||||
/>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,computed,ref,provide,nextTick,inject,toRefs, reactive, onBeforeMount} from 'vue'
|
||||
@@ -92,11 +99,12 @@ import ExistsImageList from "@/component/Canvas/ExistsImageList/index.vue";
|
||||
import JSZip, { forEach } from "jszip";
|
||||
import publish from "@/component/WorksPage/publish.vue";
|
||||
import canvasAA from '@/component/Canvas/canvasExample.vue'
|
||||
import SelectImages from '@/component/common/SelectImages.vue'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
components:{
|
||||
toProductRelight,poseTransfer,editCanvas,ExistsImageList,publish,canvasAA
|
||||
toProductRelight,poseTransfer,editCanvas,ExistsImageList,publish,canvasAA,SelectImages
|
||||
},
|
||||
props:{
|
||||
source:{
|
||||
@@ -303,6 +311,10 @@ export default defineComponent({
|
||||
data.canvasSelectList.push(obj)
|
||||
}
|
||||
}
|
||||
const selectImages = ref(null)
|
||||
const triggerLibrary = ()=>{
|
||||
selectImages.value.init()
|
||||
}
|
||||
const handleImageSelect = (list:any)=>{
|
||||
list.forEach(item => {
|
||||
dataDom.editCanvas.addImageToLayer(item)
|
||||
@@ -445,6 +457,9 @@ export default defineComponent({
|
||||
share,
|
||||
setPublish,
|
||||
unLike,
|
||||
triggerLibrary,
|
||||
Https,
|
||||
selectImages
|
||||
}
|
||||
},
|
||||
provide() {
|
||||
|
||||
Reference in New Issue
Block a user