Commit 6ac5f031 authored by zhengke's avatar zhengke

数据匹配

parent 99a88ca8
......@@ -258,7 +258,7 @@ const goBack = (type:any) =>{
if(searchData.value.sellId) {
clearInterval(intervalId.value);
intervalId.value = null;
setTemplate(0)
// setTemplate(0)
}
if(type==1) {
searchData.value.SalesEditor = router.currentRoute.value.params
......
......@@ -13,7 +13,7 @@
</template>
<script lang="ts" setup>
import { ref, computed, watch } from 'vue'
import { ref, computed, watch, inject } from 'vue'
import { storeToRefs } from 'pinia'
import { useMainStore } from '@/store'
import { useScreenStore } from '@/store'
......@@ -29,6 +29,7 @@ import SlideAnimationPanel from './SlideAnimationPanel.vue'
import MultiPositionPanel from './MultiPositionPanel.vue'
import SymbolPanel from './SymbolPanel.vue'
import Tabs from '@/components/Tabs.vue'
import { injectKeyTemplate } from '@/types/injectKey'
interface ElementTabs {
label: string
......@@ -39,15 +40,28 @@ const mainStore = useMainStore()
const { activeElementIdList, handleElement, toolbarState } = storeToRefs(mainStore)
const { model } = storeToRefs(useScreenStore())
const searchData = ref({} as any)
searchData.value = inject(injectKeyTemplate)
const elementTabs = computed<ElementTabs[]>(() => {
if (handleElement.value?.type === 'text') {
return [
{ label: '样式', key: ToolbarStates.EL_STYLE },
{ label: '符号', key: ToolbarStates.SYMBOL },
{ label: '位置', key: ToolbarStates.EL_POSITION },
// { label: '动画', key: ToolbarStates.EL_ANIMATION }
{ label: '匹配数据', key: ToolbarStates.EL_NORMALDATA }
]
if(!searchData.value.isTeamManage){
return [
{ label: '样式', key: ToolbarStates.EL_STYLE },
{ label: '符号', key: ToolbarStates.SYMBOL },
{ label: '位置', key: ToolbarStates.EL_POSITION },
// { label: '动画', key: ToolbarStates.EL_ANIMATION }
{ label: '匹配数据', key: ToolbarStates.EL_NORMALDATA }
]
}else{
return [
{ label: '样式', key: ToolbarStates.EL_STYLE },
{ label: '符号', key: ToolbarStates.SYMBOL },
{ label: '位置', key: ToolbarStates.EL_POSITION },
// { label: '动画', key: ToolbarStates.EL_ANIMATION }
]
}
}
return [
{ label: '样式', key: ToolbarStates.EL_STYLE },
......
......@@ -67,7 +67,7 @@
</template>
<script lang="ts" setup>
import { computed, onMounted, onUnmounted, ref, watch } from 'vue'
import { computed, onMounted, onUnmounted, ref, watch, inject } from 'vue'
import { storeToRefs } from 'pinia'
import { debounce } from 'lodash'
import { useMainStore, useSlidesStore } from '@/store'
......@@ -79,6 +79,8 @@ import useHistorySnapshot from '@/hooks/useHistorySnapshot'
import ElementOutline from '@/views/components/element/ElementOutline.vue'
import ProsemirrorEditor from '@/views/components/element/ProsemirrorEditor.vue'
import { ToolbarStates } from '@/types/toolbar'
import { injectKeyTemplate } from '@/types/injectKey'
const props = defineProps<{
elementInfo: PPTTextElement
......@@ -98,12 +100,15 @@ const editorRef = ref()
const shadow = computed(() => props.elementInfo.shadow)
const { shadowStyle } = useElementShadow(shadow)
const fullLockVisible = ref(0)
const searchData = ref({} as any)
searchData.value = inject(injectKeyTemplate)
const handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {
if(e.button && e.button== 1) return
if (props.elementInfo.lock) return
e.stopPropagation()
mainStore.setToolbarState(ToolbarStates.EL_NORMALDATA)
if(!searchData.value.isTeamManage) mainStore.setToolbarState(ToolbarStates.EL_NORMALDATA)
props.selectElement(e, props.elementInfo, canMove)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment