链接深度画布

This commit is contained in:
lzp
2026-03-06 17:29:45 +08:00
parent 077f298fe4
commit 7048b3f646
5 changed files with 113 additions and 12 deletions

View File

@@ -11,7 +11,7 @@
<span class="icon" @click="onDownload">
<svg-icon name="download" size="20" size-unit="px" />
</span>
<button class="edit">
<button class="edit" @click="onEdit">
<span class="icon"><svg-icon name="edit" size="13" /></span>
<span class="text">Edit</span>
</button>
@@ -41,6 +41,7 @@
</template>
<script setup lang="ts">
import myEvent from '@/utils/myEvent'
import { downloadImage } from '../../../tools/tools'
import { reactive, ref, onBeforeUnmount, useAttrs, inject, watch } from 'vue'
const openImagePreview = inject('openImagePreview') as (url: string) => void
@@ -129,6 +130,9 @@
const hideMenu = () => {
showMenu.value = false
}
const onEdit = () => {
myEvent.emit('openDepthCanvas', { url: data.url })
}
document.addEventListener('mousedown', hideMenu)
onBeforeUnmount(() => {
document.removeEventListener('mousedown', hideMenu)
@@ -183,7 +187,7 @@
height: 30px;
border-radius: 4px;
border: none;
background-color: #ED8936;
background-color: #ed8936;
color: #fff;
font-size: 12px;
display: flex;