Pārlūkot izejas kodu

fix: 客户api需求

wzl 3 mēneši atpakaļ
vecāks
revīzija
b5ad052020

+ 1 - 1
packages/webview/src/components/DocumentContainer/DocumentContainer.vue

@@ -88,7 +88,7 @@ const leftPanelSpace = computed(() => {
   return isLeftPanelOpen.value ? 260 : 0
 })
 const rightPanelSpace = computed(() => {
-  return (useViewer.isElementOpen('rightPanel') || useViewer.isElementOpen('pageModePanel') || useViewer.isElementOpen('stampPanel') || useViewer.isElementOpen('linkPanel')) ? 260 : 0
+  return (useViewer.isElementOpen('rightPanel') || useViewer.isElementOpen('pageModePanel') || useViewer.isElementOpen('stampPanel') || useViewer.isElementOpen('linkPanel') || useViewer.isElementOpen('contentEditorPanel')) ? 260 : 0
 })
 const toolMode = computed(() => useViewer.getToolMode)
 const compareStatus = computed(() => useViewer.getCompareStatus)

+ 7 - 3
packages/webview/src/components/ToggleRightPanelButton/index.vue

@@ -38,12 +38,16 @@
     useViewer.setRightPanelButtonDisabled(disabled)
   })
 
-  watch(() => isActive.value, (newValue, oldValue) => {
-    core.eventBus().dispatch('isRightSidePanelOpened', newValue)
+  watch([isActive, contentEditorPanel], (newValue, oldValue) => {
+    if (newValue[0] || newValue[1]) {
+      core.eventBus().dispatch('isRightSidePanelOpened', true)
+    } else {
+      core.eventBus().dispatch('isRightSidePanelOpened', false)
+    }
   })
 
   watch(rightPanelButtonDisabled, (newValue, oldValue) => {
-    core.eventBus().dispatch('isRightPanelDisabled', newValue)
+    core.eventBus().dispatch('isRightSidePanelBtnDisabled', newValue)
   })
 
   const onClick = () => {