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
74943c3d2b
commit
82dc18f1f1
@ -10,11 +10,17 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import Button from './Button.vue'
|
||||
|
||||
defineProps<{
|
||||
const props = defineProps<{
|
||||
colors: string[]
|
||||
}>()
|
||||
|
||||
const colors = computed(() => {
|
||||
if (props.colors.length > 12) return props.colors.slice(0, 12)
|
||||
return props.colors
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -12,7 +12,7 @@ interface ThemeValueWithArea {
|
||||
|
||||
export default () => {
|
||||
const slidesStore = useSlidesStore()
|
||||
const { slides, currentSlide, theme } = storeToRefs(slidesStore)
|
||||
const { slides, theme } = storeToRefs(slidesStore)
|
||||
|
||||
const { addHistorySnapshot } = useHistorySnapshot()
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="left">
|
||||
<Popover trigger="click" placement="bottom-start" v-model:value="mainMenuVisible">
|
||||
<template #content>
|
||||
<PopoverMenuItem @click="openAIPPTDialog(); mainMenuVisible = false">AI 生成 PPT(测试版)</PopoverMenuItem>
|
||||
<PopoverMenuItem @click="openAIPPTDialog(); mainMenuVisible = false">AI 生成 PPT</PopoverMenuItem>
|
||||
<FileInput accept="application/vnd.openxmlformats-officedocument.presentationml.presentation" @change="files => {
|
||||
importPPTXFile(files)
|
||||
mainMenuVisible = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user