Commit c283b9ecc86155595760a32030e1fa389023efbc

Authored by fengwotao
1 parent 95f3dbde

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

@@ -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 // 包分类名称
@@ -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, '')