12345上山打老虎

This commit is contained in:
lzp
2026-03-27 09:29:29 +08:00
parent 2b34e45b2d
commit c4df014c03
7 changed files with 51 additions and 12 deletions

View File

@@ -0,0 +1,3 @@
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5 0C5.41421 0 5.75 0.335786 5.75 0.75V4.25H9.25C9.66421 4.25 10 4.58579 10 5C10 5.41421 9.66421 5.75 9.25 5.75H5.75V9.25C5.75 9.66421 5.41421 10 5 10C4.58579 10 4.25 9.66421 4.25 9.25V5.75H0.75C0.335786 5.75 0 5.41421 0 5C0 4.58579 0.335786 4.25 0.75 4.25H4.25V0.75C4.25 0.335786 4.58579 0 5 0Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 424 B

View File

@@ -0,0 +1,3 @@
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.02518 0C1.31675 0 1.55311 0.23564 1.55311 0.526316V1.35367C2.44992 0.514522 3.65683 0 4.98466 0C7.75456 0 10 2.23858 10 5C10 7.76142 7.75456 10 4.98466 10C2.41401 10 0.295731 8.07235 0.00363895 5.58758C-0.0302986 5.29888 0.176946 5.03741 0.466532 5.00358C0.756118 4.96974 1.01839 5.17635 1.05232 5.46505C1.28281 7.42573 2.95587 8.94737 4.98466 8.94737C7.17142 8.94737 8.94414 7.18007 8.94414 5C8.94414 2.81993 7.17142 1.05263 4.98466 1.05263C3.81245 1.05263 2.7587 1.56036 2.03329 2.36842H3.41571C3.70728 2.36842 3.94364 2.60406 3.94364 2.89474C3.94364 3.18541 3.70728 3.42105 3.41571 3.42105H1.02518C0.740438 3.42105 0.508345 3.19631 0.497639 2.91505C0.497164 2.90406 0.497034 2.89304 0.497254 2.882V0.526316C0.497254 0.23564 0.733616 0 1.02518 0Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 880 B

View File

@@ -10,8 +10,14 @@
<span class="icon"><svg-icon :name="item.name" size="16" /></span> <span class="icon"><svg-icon :name="item.name" size="16" /></span>
<span class="label">{{ item.label }}</span> <span class="label">{{ item.label }}</span>
</div> </div>
<button @click="onCreate">创建</button> <button @click="onCreate">
<button @click="onReset">重置</button> <span class="icon"><svg-icon name="dc-create" size="12" /></span>
<span class="text">{{ $t('DepthCanvas.create') }}</span>
</button>
<button @click="onReset">
<span class="icon"><svg-icon name="dc-reset" size="12" /></span>
<span class="text">{{ $t('DepthCanvas.reset') }}</span>
</button>
</div> </div>
</transition> </transition>
<brush-control-panel v-if="show" :currentTool="currentTool2" style="top: 14rem" /> <brush-control-panel v-if="show" :currentTool="currentTool2" style="top: 14rem" />
@@ -114,5 +120,22 @@
background: rgba(235, 235, 235, 0.9); background: rgba(235, 235, 235, 0.9);
} }
} }
> button {
cursor: pointer;
border: none;
display: flex;
align-items: center;
justify-content: center;
height: 2.5rem;
background-color: rgba(13, 13, 13, 1);
color: #fff;
font-size: 1.2rem;
border-radius: 0.4rem;
padding: 0 0.8rem;
gap: 0.8rem;
&:active {
opacity: 0.8;
}
}
} }
</style> </style>

View File

@@ -5,7 +5,9 @@
<svg-icon :name="icon" :size="iconSize" /> <svg-icon :name="icon" :size="iconSize" />
</span> </span>
<span v-show="before" class="before">{{ before }}</span> <span v-show="before" class="before">{{ before }}</span>
<input <input
v-if="!isColor"
v-bind="attrs" v-bind="attrs"
:value="modelValue" :value="modelValue"
@input="onInput" @input="onInput"
@@ -13,15 +15,17 @@
@copy.stop @copy.stop
@keydown.stop @keydown.stop
/> />
<input <template v-else>
v-if="isColor" <input
readonly v-bind="attrs"
type="text" type="color"
:value="colorObj.color" :value="colorObj.color"
@copy.stop @input="onInput"
@keydown.stop @change="onChange"
/> @copy.stop
<template v-if="isColor"> @keydown.stop
/>
<input readonly :value="colorObj.color" @copy.stop @keydown.stop />
<span class="decorate marginl"></span> <span class="decorate marginl"></span>
<input <input
class="alpha" class="alpha"
@@ -35,6 +39,7 @@
@keydown.stop @keydown.stop
/> />
</template> </template>
<span v-show="after" class="after">{{ after }}</span> <span v-show="after" class="after">{{ after }}</span>
</div> </div>
</template> </template>

View File

@@ -136,10 +136,11 @@ export class LayerManager {
copyLayerById(id) { copyLayerById(id) {
const object = this.canvasManager.getObjectById(id) const object = this.canvasManager.getObjectById(id)
if (!object) return console.warn('复制图层失败对象不存在ID:', id) if (!object) return console.warn('复制图层失败对象不存在ID:', id)
this.canvasManager.discardActiveObject()
cloneObjects([object]).then(objects => { cloneObjects([object]).then(objects => {
const newObject = objects[0] const newObject = objects[0]
const info = JSON.parse(JSON.stringify(newObject.info)) const info = JSON.parse(JSON.stringify(newObject.info))
info.id = createId("image") info.id = createId("copylayer")
// info.name = info.name // info.name = info.name
newObject.set({ newObject.set({
top: newObject.top + 15, top: newObject.top + 15,

View File

@@ -242,5 +242,7 @@ export default {
remove: "Remove", remove: "Remove",
brush: "Brush", brush: "Brush",
erase: "Erase", erase: "Erase",
create: "Create",
reset: "Reset"
} }
} }

View File

@@ -239,5 +239,7 @@ export default {
remove: "删除", remove: "删除",
brush: "画笔", brush: "画笔",
erase: "擦除", erase: "擦除",
create: "创建",
reset: "重置"
} }
} }