mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
perf: 代码优化
This commit is contained in:
parent
1809f30ba8
commit
9d63cb680c
@ -38,9 +38,11 @@ export default () => {
|
|||||||
store.commit(MutationTypes.SET_ACTIVE_ELEMENT_ID_LIST, [element.id])
|
store.commit(MutationTypes.SET_ACTIVE_ELEMENT_ID_LIST, [element.id])
|
||||||
|
|
||||||
if (creatingElement.value) store.commit(MutationTypes.SET_CREATING_ELEMENT, null)
|
if (creatingElement.value) store.commit(MutationTypes.SET_CREATING_ELEMENT, null)
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
store.commit(MutationTypes.SET_EDITORAREA_FOCUS, true)
|
store.commit(MutationTypes.SET_EDITORAREA_FOCUS, true)
|
||||||
}, 0)
|
}, 0)
|
||||||
|
|
||||||
addHistorySnapshot()
|
addHistorySnapshot()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ export default () => {
|
|||||||
}
|
}
|
||||||
else if (el.type === 'shape') {
|
else if (el.type === 'shape') {
|
||||||
if (el.special) {
|
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 base64SVG = svg2Base64(svgRef)
|
||||||
|
|
||||||
const options: pptxgen.ImageProps = {
|
const options: pptxgen.ImageProps = {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="base-element"
|
class="base-element"
|
||||||
:id="`base-element-${elementInfo.id}`"
|
:class="`base-element-${elementInfo.id}`"
|
||||||
:style="{
|
:style="{
|
||||||
zIndex: elementIndex,
|
zIndex: elementIndex,
|
||||||
}"
|
}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user