Commit 40c7afd6 authored by zhengke's avatar zhengke

no message

parent f9b77fb7
...@@ -8,19 +8,23 @@ ...@@ -8,19 +8,23 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted,ref } from 'vue' import { onMounted,ref,provide } from 'vue'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { useScreenStore, useMainStore, useSnapshotStore } from '@/store' import { useScreenStore, useMainStore, useSnapshotStore } from '@/store'
import { LOCALSTORAGE_KEY_DISCARDED_DB } from '@/configs/storage' import { LOCALSTORAGE_KEY_DISCARDED_DB } from '@/configs/storage'
import { deleteDiscardedDB } from '@/utils/database' import { deleteDiscardedDB } from '@/utils/database'
import { isPC, query } from './utils/common' import { isPC, query } from './utils/common'
import { userStore } from './store/user' import { userStore } from './store/user'
import { injectKeyTemplate } from '@/types/injectKey'
import Editor from './views/Editor/index.vue' import Editor from './views/Editor/index.vue'
import Screen from './views/Screen/index.vue' import Screen from './views/Screen/index.vue'
import Mobile from './views/Mobile/index.vue' import Mobile from './views/Mobile/index.vue'
import Market from './views/Market/Index.vue' import Market from './views/Market/Index.vue'
const searchData = ref({} as any)
provide(injectKeyTemplate,searchData)
const isFinish = ref(false) const isFinish = ref(false)
const userLoginHandler = async ()=>{ const userLoginHandler = async ()=>{
let param = query() let param = query()
......
...@@ -11,3 +11,4 @@ export const injectKeySlideScale: InjectionKey<SlideScale> = Symbol() ...@@ -11,3 +11,4 @@ export const injectKeySlideScale: InjectionKey<SlideScale> = Symbol()
export const injectKeySlideId: InjectionKey<SlideId> = Symbol() export const injectKeySlideId: InjectionKey<SlideId> = Symbol()
export const injectKeyRadioGroupValue: InjectionKey<RadioGroupValue> = Symbol() export const injectKeyRadioGroupValue: InjectionKey<RadioGroupValue> = Symbol()
export const injectKeyDataSource: InjectionKey<SlideDataSource> = Symbol() export const injectKeyDataSource: InjectionKey<SlideDataSource> = Symbol()
export const injectKeyTemplate: InjectionKey<SlideDataSource> = Symbol()
\ No newline at end of file
...@@ -35,7 +35,7 @@ import { storeToRefs } from 'pinia' ...@@ -35,7 +35,7 @@ import { storeToRefs } from 'pinia'
import { useMainStore } from '@/store' import { useMainStore } from '@/store'
import useGlobalHotkey from '@/hooks/useGlobalHotkey' import useGlobalHotkey from '@/hooks/useGlobalHotkey'
import usePasteEvent from '@/hooks/usePasteEvent' import usePasteEvent from '@/hooks/usePasteEvent'
import { injectKeyDataSource } from '@/types/injectKey' import { injectKeyDataSource, injectKeyTemplate } from '@/types/injectKey'
import { useSlidesStore } from '@/store' import { useSlidesStore } from '@/store'
import EditorHeader from './EditorHeader/index.vue' import EditorHeader from './EditorHeader/index.vue'
...@@ -51,6 +51,7 @@ import Modal from '@/components/Modal.vue' ...@@ -51,6 +51,7 @@ import Modal from '@/components/Modal.vue'
import DataaSource from './DataaSource/index.vue' import DataaSource from './DataaSource/index.vue'
import ConfigService from '@/services/ConfigService' import ConfigService from '@/services/ConfigService'
// inject(injectKeyTemplate).TempId?inject(injectKeyTemplate).TempId:
const datas = reactive({ const datas = reactive({
DataSource:{ DataSource:{
pageType: 1,//1基础 2酒店 3景 4餐 pageType: 1,//1基础 2酒店 3景 4餐
......
...@@ -62,18 +62,13 @@ ...@@ -62,18 +62,13 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { import { reactive, ref, inject} from "vue";
reactive,
ref
} from "vue";
import LineService from '@/services/LineService' import LineService from '@/services/LineService'
import ConfigService from '@/services/ConfigService' import ConfigService from '@/services/ConfigService'
import { import { userStore } from "@/store/user";
userStore import { useScreenStore } from "@/store/screen";
} from "@/store/user"; import { storeToRefs } from "pinia";
import { import { injectKeyTemplate } from '@/types/injectKey'
storeToRefs
} from "pinia";
const { const {
userInfo userInfo
...@@ -95,11 +90,17 @@ ...@@ -95,11 +90,17 @@
pageCount: 0, //总页数 pageCount: 0, //总页数
}) })
const searchData = ref({} as any)
searchData.value = inject(injectKeyTemplate)
const marketStore = useScreenStore()
const { screening, market } = storeToRefs(useScreenStore())
/** /**
* 页面跳转 * 页面跳转
*/ */
const goToTemplate = (item: any) => { const goToTemplate = (item: any) => {
console.log("item", item); // searchData.value.TempId = item.TempId
marketStore.setMarket(!market)
// console.log("item", item.TempId);
} }
/*** /***
......
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