Skip to content

Commit 15e78f5

Browse files
perf: 代码优化
1 parent e527799 commit 15e78f5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/hooks/useExport.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { computed, ref } from 'vue'
22
import { storeToRefs } from 'pinia'
3-
import { trim } from 'lodash'
43
import { saveAs } from 'file-saver'
54
import pptxgen from 'pptxgenjs'
65
import tinycolor from 'tinycolor2'
@@ -173,7 +172,7 @@ export default () => {
173172
for (const styleItem of styleArr) {
174173
const match = styleItem.match(/([^:]+):\s*(.+)/)
175174
if (match) {
176-
const [key, value] = [trim(match[1]), trim(match[2])]
175+
const [key, value] = [match[1].trim(), match[2].trim()]
177176
if (key && value) styleObj[key] = value
178177
}
179178
}

0 commit comments

Comments
 (0)