perf: 代码优化

This commit is contained in:
pipipi-pikachu 2021-04-09 11:19:13 +08:00
parent 59cadd849d
commit 48660ed8ec
4 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
<div
class="editable-element"
ref="elementRef"
:id="'editable-element-' + elementInfo.id"
:id="`editable-element-${elementInfo.id}`"
:style="{
zIndex: elementIndex,
color: theme.fontColor,

View File

@ -14,9 +14,9 @@
<div class="shape-clip">
<div
class="shape-clip-item"
v-for="(item, index) in shapeClipPathOptions"
:key="index"
@click="presetImageClip(index)"
v-for="(item, key) in shapeClipPathOptions"
:key="key"
@click="presetImageClip(key)"
>
<div class="shape" :style="{ backgroundImage: `url(${handleElement.src})`, clipPath: item.style }"></div>
</div>

View File

@ -1,6 +1,7 @@
<template>
<div
class="screen-element"
:id="`screen-element-${elementInfo.id}`"
:style="{
zIndex: elementIndex,
color: theme.fontColor,

View File

@ -9,7 +9,6 @@
>
<div class="background" :style="{ ...backgroundStyle }"></div>
<ScreenElement
:id="`screen-element-${element.id}`"
v-for="(element, index) in slide.elements"
:key="element.id"
:elementInfo="element"