perf: 代码优化

This commit is contained in:
pipipi-pikachu 2021-07-25 13:26:01 +08:00
parent 1809f30ba8
commit 9d63cb680c
3 changed files with 4 additions and 2 deletions

View File

@ -38,9 +38,11 @@ export default () => {
store.commit(MutationTypes.SET_ACTIVE_ELEMENT_ID_LIST, [element.id])
if (creatingElement.value) store.commit(MutationTypes.SET_CREATING_ELEMENT, null)
setTimeout(() => {
store.commit(MutationTypes.SET_EDITORAREA_FOCUS, true)
}, 0)
addHistorySnapshot()
}

View File

@ -247,7 +247,7 @@ export default () => {
}
else if (el.type === 'shape') {
if (el.special) {
const svgRef = document.querySelector(`#base-element-${el.id} svg`) as HTMLElement
const svgRef = document.querySelector(`.thumbnail-list .base-element-${el.id} svg`) as HTMLElement
const base64SVG = svg2Base64(svgRef)
const options: pptxgen.ImageProps = {

View File

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