소스 검색

fix: 修改需求

bill 2 년 전
부모
커밋
ac68840e67
6개의 변경된 파일30개의 추가작업 그리고 8개의 파일을 삭제
  1. 1 1
      src/layout/header/index.vue
  2. 1 1
      src/layout/left-pano.vue
  3. 1 1
      src/layout/right-fill-pano.vue
  4. 2 1
      src/store/model.ts
  5. 9 1
      src/store/sys.ts
  6. 16 3
      src/views/merge/index.vue

+ 1 - 1
src/layout/header/index.vue

@@ -26,7 +26,7 @@ import { computed, watchEffect } from 'vue'
 import { isEdit, title, isOld, leave, save } from '@/store'
 
 const props = defineProps<{ title?: string }>()
-const sysTitle = computed(() => props.title || title)
+const sysTitle = computed(() => props.title || title.value)
 
 watchEffect(() => (document.title = sysTitle.value))
 

+ 1 - 1
src/layout/left-pano.vue

@@ -16,7 +16,7 @@ import { custom } from '@/env'
 
 const hidePano = () => {
   custom.showLeftPano = !custom.showLeftPano
-  custom.showRightPano = !custom.showLeftPano
+  // custom.showRightPano = !custom.showLeftPano
 }
 </script>
 

+ 1 - 1
src/layout/right-fill-pano.vue

@@ -16,7 +16,7 @@ import { custom } from '@/env'
 
 const hidePano = () => {
   custom.showRightPano = !custom.showRightPano
-  custom.showLeftPano = !custom.showRightPano
+  // custom.showLeftPano = !custom.showRightPano
   console.log(custom.showRightPano)
 }
 

+ 2 - 1
src/store/model.ts

@@ -1,4 +1,4 @@
-import { computed, ref, watchPostEffect } from 'vue'
+import { computed, ref,  watchPostEffect } from 'vue'
 import { autoSetModeCallback, unSetModelUpdate } from './sys'
 import { showModelsMapStack, custom } from '@/env'
 import { 
@@ -39,6 +39,7 @@ export const getModelShowVariable = (model: Model) =>
     }
   })
   
+
 export const modelsLoaded = ref(false)
 watchPostEffect(() => {
   const loaded = models.value.every(model => model.loaded || model.error)

+ 9 - 1
src/store/sys.ts

@@ -4,6 +4,7 @@ import { Dialog } from 'bill/index'
 import { useViewStack } from '@/hook'
 
 import type { UnwrapRef } from 'vue'
+import { models, ModelType } from './model'
 
 const Flags = {
   EDIT: 0b10,
@@ -18,7 +19,14 @@ export const isEdit = computed(() => !!(mode.value & Flags.EDIT))
 export const isLogin = computed(() => !!(mode.value & Flags.LOGIN))
 export const isOld = computed(() => !(mode.value & Flags.NOW))
 export const isNow = computed(() => !!(mode.value & Flags.NOW))
-export const title = '融合平台'
+export const title = computed(() => {
+  const defaultModel = models.value.find(model => model.type === ModelType.SWSS)
+  if (defaultModel) {
+    return defaultModel.title + ' | 多元融合'
+  } else {
+    return '融合平台'
+  }
+}) 
 
 let currentTempIndex = 0
 export const isTemploraryID = (id: string) => id.includes('__currentTempIndex__')

+ 16 - 3
src/views/merge/index.vue

@@ -1,6 +1,6 @@
 <template>
   <RightPano v-if="custom.currentModel && active">
-    <ui-group>
+    <ui-group class="merge-group">
       <template #header>
         <Actions class="edit-header" :items="actionItems" />
       </template>
@@ -90,10 +90,23 @@ const reset = async () => {
 }
 
 useViewStack(() => togetherCallback([
-  showLeftCtrlPanoStack.push(ref(false)),
+  // showLeftCtrlPanoStack.push(ref(false)),
   showLeftPanoStack.push(ref(true)),
   modelsChangeStoreStack.push(ref(true))
 ]))
 useViewStack(autoSaveModels)
 
-</script>
+</script>
+
+<style lang="scss">
+.merge-group {
+  .ui-input .text.suffix input {
+    padding-right: 20px;
+    padding-left: 5px;
+    font-size: 12px;
+  }
+  .ui-input .text.suffix .retouch {
+    right: 5px;
+  }
+}
+</style>