diff --git a/core/core-frontend/src/hooks/web/useMoveLine.ts b/core/core-frontend/src/hooks/web/useMoveLine.ts
index 9187bea56b..4b9970d033 100644
--- a/core/core-frontend/src/hooks/web/useMoveLine.ts
+++ b/core/core-frontend/src/hooks/web/useMoveLine.ts
@@ -1,11 +1,13 @@
import { ref, onBeforeUnmount, onMounted } from 'vue'
import { useCache } from '@/hooks/web/useCache'
+import { useEmitt } from '@/hooks/web/useEmitt'
type Sidebar = 'DATASET' | 'DASHBOARD' | 'DATASOURCE' | 'DATA-FILLING'
export const useMoveLine = (type: Sidebar) => {
const { wsCache } = useCache('localStorage')
const width = ref(wsCache.get(type) || 280)
+ wsCache.set('current-collapse_bar', width.value)
const getCoordinates = () => {
if (document.querySelector('.sidebar-move-line')) {
@@ -16,15 +18,22 @@ export const useMoveLine = (type: Sidebar) => {
document.querySelector('body').style['user-select'] = 'none'
}
+ const setCollapseBarWidth = () => {
+ wsCache.set('current-collapse_bar', width.value)
+ useEmitt().emitter.emit('current-collapse_bar')
+ }
+
const setCoordinates = (e: MouseEvent) => {
const x = e.clientX
if (x > 401 || x < 279) {
width.value = Math.max(Math.min(401, x), 279)
ele.style.left = width.value - 5 + 'px'
+ setCollapseBarWidth()
return
}
ele.style.left = width.value - 5 + 'px'
width.value = x
+ setCollapseBarWidth()
}
const cancelEvent = () => {
diff --git a/core/core-frontend/src/layout/components/CollapseBar.vue b/core/core-frontend/src/layout/components/CollapseBar.vue
index 83f03b7075..5bdacf8668 100644
--- a/core/core-frontend/src/layout/components/CollapseBar.vue
+++ b/core/core-frontend/src/layout/components/CollapseBar.vue
@@ -1,7 +1,9 @@
diff --git a/core/core-frontend/src/views/share/share/ShareGrid.vue b/core/core-frontend/src/views/share/share/ShareGrid.vue
index f5c1a1f69a..48b2038890 100644
--- a/core/core-frontend/src/views/share/share/ShareGrid.vue
+++ b/core/core-frontend/src/views/share/share/ShareGrid.vue
@@ -47,8 +47,7 @@ const triggerFilterPanel = () => {
}
const preview = id => {
const routeUrl = `/#/preview?dvId=${id}`
- const openType = wsCache.get('open-backend') === '1' ? '_self' : '_blank'
- window.open(routeUrl, openType)
+ window.open(routeUrl, '_blank')
}
const formatterTime = (_, _column, cellValue) => {
if (!cellValue) {
diff --git a/core/core-frontend/src/views/workbranch/ShortcutTable.vue b/core/core-frontend/src/views/workbranch/ShortcutTable.vue
index 8c99d2589a..3061fb2206 100644
--- a/core/core-frontend/src/views/workbranch/ShortcutTable.vue
+++ b/core/core-frontend/src/views/workbranch/ShortcutTable.vue
@@ -104,7 +104,7 @@ const preview = id => {
path: '/preview',
query: { dvId: id }
})
- window.open(routeUrl.href, openType)
+ window.open(routeUrl.href, '_blank')
}
const openDataset = id => {