|
@@ -1,7 +1,6 @@
|
|
|
<template>
|
|
|
- <div class="pointer-events-auto">
|
|
|
- <div @click="changeActive">基础设置页面{{ active }}</div>
|
|
|
- <!-- 基础设置页面 -->
|
|
|
+ <div class="base-setting">
|
|
|
+ <!-- 基础设置页面 -->
|
|
|
<n-drawer
|
|
|
v-model:show="active"
|
|
|
:width="240"
|
|
@@ -15,21 +14,21 @@
|
|
|
<div class="drawerContent m-5">
|
|
|
<div class="text-lg my-2.5" @click="active = false">基础设置</div>
|
|
|
<n-radio-group
|
|
|
- v-model:value="basicConfig.view"
|
|
|
+ v-model:value="basicConfig.mode"
|
|
|
name="radiobuttongroup1"
|
|
|
>
|
|
|
- <n-radio-button :value="true" label="pc端" />
|
|
|
- <n-radio-button :value="false" label="移动端" />
|
|
|
+ <n-radio-button value="pc" label="pc端" />
|
|
|
+ <n-radio-button value="mobile" label="移动端" />
|
|
|
</n-radio-group>
|
|
|
<div class="text-sm my-2.5" @click="changeActive">展示页面风格</div>
|
|
|
<n-select
|
|
|
- v-model:value="basicConfig.theme"
|
|
|
+ v-model:value="basicConfig.themes"
|
|
|
placeholder="选择主题"
|
|
|
:options="options"
|
|
|
/>
|
|
|
<div class="flex justify-between my-2.5">
|
|
|
<span>全景图自动播放</span>
|
|
|
- <n-switch v-model:value="basicConfig.panorama" />
|
|
|
+ <n-switch v-model:value="basicConfig.autoRotate" />
|
|
|
</div>
|
|
|
<div class="flex justify-between my-2.5">
|
|
|
<span>操纵杆</span>
|
|
@@ -55,32 +54,57 @@
|
|
|
<script setup lang="ts">
|
|
|
import { ref, watch, computed, onMounted } from 'vue'
|
|
|
import { useMainStore } from '@/store'
|
|
|
+import { sdk } from '@/sdk'
|
|
|
// import { useMessage } from 'naive-ui'
|
|
|
defineProps<{ msg: string }>()
|
|
|
+
|
|
|
const main = useMainStore()
|
|
|
const { setWidthSceneRef } = main
|
|
|
const active = ref(true)
|
|
|
+
|
|
|
const basicConfig = computed(() => {
|
|
|
return main.basicConfig
|
|
|
})
|
|
|
+
|
|
|
// const message = useMessage()
|
|
|
const fileList = ref([])
|
|
|
const options = [
|
|
|
{
|
|
|
label: '默认',
|
|
|
- value: 0
|
|
|
+ value: ''
|
|
|
},
|
|
|
{
|
|
|
label: '科技感',
|
|
|
- value: 1
|
|
|
+ value: 'ThemesTechnology'
|
|
|
},
|
|
|
{
|
|
|
label: '红色元素',
|
|
|
- value: 2
|
|
|
+ value: 'ThemesParty'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '博物馆',
|
|
|
+ value: 'ThemesMuseum'
|
|
|
}
|
|
|
]
|
|
|
|
|
|
watch(
|
|
|
+ () => basicConfig.value.autoRotate,
|
|
|
+ (val) => {
|
|
|
+ sdk.then(sdk=>{
|
|
|
+ sdk.Camera.autoRotate(val)
|
|
|
+ })
|
|
|
+ }
|
|
|
+)
|
|
|
+
|
|
|
+watch(()=>basicConfig.value.mode,(val)=>{
|
|
|
+ main.setSceneMode(val)
|
|
|
+})
|
|
|
+
|
|
|
+watch(()=>basicConfig.value.themes,(val)=>{
|
|
|
+ main.setSceneConfig({themes:val})
|
|
|
+})
|
|
|
+
|
|
|
+watch(
|
|
|
active,
|
|
|
(newValue) => {
|
|
|
// setWidthSceneRef(newValue ? 240 : 0)
|
|
@@ -97,11 +121,10 @@ function handleChange(file, event) {
|
|
|
}
|
|
|
function changeActive() {
|
|
|
console.log('changeActive', active.value)
|
|
|
- active.value = active.value?false:true
|
|
|
+ active.value = active.value ? false : true
|
|
|
console.log('changeActive', active.value)
|
|
|
-
|
|
|
}
|
|
|
-onMounted(()=>{
|
|
|
+onMounted(() => {
|
|
|
// active.value = true
|
|
|
})
|
|
|
</script>
|