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 90 //TODO待封装 成传文件夹名字获取下面所有图片
91 91 const getFetchImages = () => {
92 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 98 getFetchImages()
101 99
... ...
... ... @@ -151,7 +151,7 @@ export enum PackagesCategoryEnum {
151 151 INFORMATIONS = 'Informations',
152 152 DECORATES = 'Decorates',
153 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 168 //TODO待封装 成传文件夹名字获取下面所有图片
169 169 const getFetchImages = () => {
170 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 176 getFetchImages()
179 177
... ...
... ... @@ -3,16 +3,17 @@
3 3 <n-icon size="20" :depth="3">
4 4 <fish-icon></fish-icon>
5 5 </n-icon>
  6 + <!-- THINGS_KIT -->
6 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 10 <span class="title">
10 11 {{ comTitle }}
11 12 </span>
12 13 </n-button>
13 14 </n-text>
14 15
15   - <n-input
  16 + <!-- <n-input
16 17 v-show="focus"
17 18 ref="inputInstRef"
18 19 size="small"
... ... @@ -24,12 +25,12 @@
24 25 v-model:value.trim="title"
25 26 @keyup.enter="handleBlur"
26 27 @blur="handleBlur"
27   - ></n-input>
  28 + ></n-input> -->
28 29 </n-space>
29 30 </template>
30 31
31 32 <script setup lang="ts">
32   -import { ref, nextTick, computed } from 'vue'
  33 +import { ref, nextTick, computed,watchEffect } from 'vue'
33 34 import { fetchRouteParamsLocation, setTitle } from '@/utils'
34 35 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
35 36 import { EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
... ... @@ -41,17 +42,12 @@ const chartEditStore = useChartEditStore()
41 42 const focus = ref<boolean>(false)
42 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 51 const comTitle = computed(() => {
56 52 // eslint-disable-next-line vue/no-side-effects-in-computed-properties
57 53 title.value = title.value.replace(/\s/g, '')
... ...