Commit f9898969a603cf32105790d86e13f07cdf40109a

Authored by xp.Huang
2 parents 9e1bdb20 c283b9ec

Merge branch 'ft' into 'main'

pref:隐藏工作空间修改,工作空间后面显示大屏设计器名字

See merge request yunteng/thingskit-view!4
@@ -90,12 +90,10 @@ const selectValue = ref('') @@ -90,12 +90,10 @@ const selectValue = ref('')
90 //TODO待封装 成传文件夹名字获取下面所有图片 90 //TODO待封装 成传文件夹名字获取下面所有图片
91 const getFetchImages = () => { 91 const getFetchImages = () => {
92 const imagesModules = import.meta.globEager('@/assets/external/headbackground/*') 92 const imagesModules = import.meta.globEager('@/assets/external/headbackground/*')
93 - for (const key in imagesModules) {  
94 - selectBgOptions.value.push({  
95 - label: imagesModules[key]?.default.slice(25),  
96 - value: imagesModules[key]?.default  
97 - })  
98 - } 93 + selectBgOptions.value = Object.keys(imagesModules).map(item => ({
  94 + label: imagesModules[item]?.default.split('/').at(-1),
  95 + value: imagesModules[item]?.default
  96 + }))
99 } 97 }
100 getFetchImages() 98 getFetchImages()
101 99
@@ -151,7 +151,7 @@ export enum PackagesCategoryEnum { @@ -151,7 +151,7 @@ export enum PackagesCategoryEnum {
151 INFORMATIONS = 'Informations', 151 INFORMATIONS = 'Informations',
152 DECORATES = 'Decorates', 152 DECORATES = 'Decorates',
153 // THINGS_KIT 153 // THINGS_KIT
154 - COMPOSES = 'Composes', 154 + COMPOSES = 'external/Composes',
155 } 155 }
156 156
157 // 包分类名称 157 // 包分类名称
@@ -168,12 +168,10 @@ const selectBgOptions = ref<Array<SelectOption>>([]) @@ -168,12 +168,10 @@ const selectBgOptions = ref<Array<SelectOption>>([])
168 //TODO待封装 成传文件夹名字获取下面所有图片 168 //TODO待封装 成传文件夹名字获取下面所有图片
169 const getFetchImages = () => { 169 const getFetchImages = () => {
170 const imagesModules = import.meta.globEager('@/assets/external/background/*') 170 const imagesModules = import.meta.globEager('@/assets/external/background/*')
171 - for (const key in imagesModules) {  
172 - selectBgOptions.value.push({  
173 - label: imagesModules[key]?.default.slice(25),  
174 - value: imagesModules[key]?.default  
175 - })  
176 - } 171 + selectBgOptions.value = Object.keys(imagesModules).map(item => ({
  172 + label: imagesModules[item]?.default.split('/').at(-1),
  173 + value: imagesModules[item]?.default
  174 + }))
177 } 175 }
178 getFetchImages() 176 getFetchImages()
179 177
@@ -3,16 +3,17 @@ @@ -3,16 +3,17 @@
3 <n-icon size="20" :depth="3"> 3 <n-icon size="20" :depth="3">
4 <fish-icon></fish-icon> 4 <fish-icon></fish-icon>
5 </n-icon> 5 </n-icon>
  6 + <!-- THINGS_KIT -->
6 <n-text @click="handleFocus"> 7 <n-text @click="handleFocus">
7 工作空间 - 8 工作空间 -
8 - <n-button v-show="!focus" secondary round size="tiny"> 9 + <n-button secondary round size="tiny">
9 <span class="title"> 10 <span class="title">
10 {{ comTitle }} 11 {{ comTitle }}
11 </span> 12 </span>
12 </n-button> 13 </n-button>
13 </n-text> 14 </n-text>
14 15
15 - <n-input 16 + <!-- <n-input
16 v-show="focus" 17 v-show="focus"
17 ref="inputInstRef" 18 ref="inputInstRef"
18 size="small" 19 size="small"
@@ -24,12 +25,12 @@ @@ -24,12 +25,12 @@
24 v-model:value.trim="title" 25 v-model:value.trim="title"
25 @keyup.enter="handleBlur" 26 @keyup.enter="handleBlur"
26 @blur="handleBlur" 27 @blur="handleBlur"
27 - ></n-input> 28 + ></n-input> -->
28 </n-space> 29 </n-space>
29 </template> 30 </template>
30 31
31 <script setup lang="ts"> 32 <script setup lang="ts">
32 -import { ref, nextTick, computed } from 'vue' 33 +import { ref, nextTick, computed,watchEffect } from 'vue'
33 import { fetchRouteParamsLocation, setTitle } from '@/utils' 34 import { fetchRouteParamsLocation, setTitle } from '@/utils'
34 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore' 35 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
35 import { EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d' 36 import { EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
@@ -41,17 +42,12 @@ const chartEditStore = useChartEditStore() @@ -41,17 +42,12 @@ const chartEditStore = useChartEditStore()
41 const focus = ref<boolean>(false) 42 const focus = ref<boolean>(false)
42 const inputInstRef = ref(null) 43 const inputInstRef = ref(null)
43 44
44 -// 根据路由 id 参数获取项目信息  
45 -const fetchProhectInfoById = () => {  
46 - const id = fetchRouteParamsLocation()  
47 - if (id.length) {  
48 - return id[0]  
49 - }  
50 - return ''  
51 -}  
52 -  
53 -const title = ref<string>(fetchProhectInfoById() || '') 45 +// THINGS_KIT
  46 +const title = ref<string>(fetchRouteParamsLocation())
54 47
  48 +watchEffect(() => {
  49 + title.value = chartEditStore.getProjectInfo.projectName || ''
  50 +})
55 const comTitle = computed(() => { 51 const comTitle = computed(() => {
56 // eslint-disable-next-line vue/no-side-effects-in-computed-properties 52 // eslint-disable-next-line vue/no-side-effects-in-computed-properties
57 title.value = title.value.replace(/\s/g, '') 53 title.value = title.value.replace(/\s/g, '')