diff --git a/frontend/src/components/dataease/DeAsideContainer.vue b/frontend/src/components/dataease/DeAsideContainer.vue
index 32a90322fd..7b53d3a455 100644
--- a/frontend/src/components/dataease/DeAsideContainer.vue
+++ b/frontend/src/components/dataease/DeAsideContainer.vue
@@ -1,16 +1,17 @@
-
+
diff --git a/frontend/src/components/dataease/dragbar/DeLeft2RightDragBar.vue b/frontend/src/components/dataease/dragbar/DeLeft2RightDragBar.vue
index 9d26739bae..9a11e677d1 100644
--- a/frontend/src/components/dataease/dragbar/DeLeft2RightDragBar.vue
+++ b/frontend/src/components/dataease/dragbar/DeLeft2RightDragBar.vue
@@ -1,10 +1,16 @@
-
+
diff --git a/frontend/src/directive/index.js b/frontend/src/directive/index.js
index f26cb177cf..1273bd4c9e 100644
--- a/frontend/src/directive/index.js
+++ b/frontend/src/directive/index.js
@@ -1,8 +1,9 @@
import permission from '@/directive/Permission'
-// import dataPermission from '@/directive/DataPermission'
+import { setLayout } from '@/utils/LayoutUtil'
export const left2RightDrag = {
inserted(el, binding) {
+ const value = binding.value
el.onmousedown = function(e) {
const init = e.clientX
const parent = el.parentNode
@@ -15,6 +16,8 @@ export const left2RightDrag = {
}
}
document.onmouseup = function() {
+ value && setLayout(value, parent.style.width)
+
document.onmousemove = document.onmouseup = null
}
}
diff --git a/frontend/src/layout/index.vue b/frontend/src/layout/index.vue
index 2d609a192b..763b188d4c 100644
--- a/frontend/src/layout/index.vue
+++ b/frontend/src/layout/index.vue
@@ -4,7 +4,7 @@
-
+
diff --git a/frontend/src/utils/LayoutUtil.js b/frontend/src/utils/LayoutUtil.js
new file mode 100644
index 0000000000..5ffce3e9c6
--- /dev/null
+++ b/frontend/src/utils/LayoutUtil.js
@@ -0,0 +1,17 @@
+const defaultLayout = {
+ panel: '260px',
+ dataset: '260px',
+ datasource: '260px',
+ system: '260px'
+}
+const STORAGE_KEY = 'global_layout'
+
+export const getLayout = (type) => {
+ const key = STORAGE_KEY + '_' + type
+ return localStorage.getItem(key) || defaultLayout[type]
+}
+
+export const setLayout = (type, val) => {
+ const key = STORAGE_KEY + '_' + type
+ localStorage.setItem(key, val || defaultLayout[type])
+}
diff --git a/frontend/src/views/dataset/index.vue b/frontend/src/views/dataset/index.vue
index 328d47a505..46eb2fa035 100644
--- a/frontend/src/views/dataset/index.vue
+++ b/frontend/src/views/dataset/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -30,7 +30,7 @@ import { removeClass } from '@/utils'
import { checkCustomDs } from '@/api/dataset/dataset'
export default {
name: 'DataSet',
- components: { DeMainContainer, DeContainer, DeAsideContainer, Group, DataHome, ViewTable, AddDB, AddSQL, AddExcel, AddCustom, AddApi},
+ components: { DeMainContainer, DeContainer, DeAsideContainer, Group, DataHome, ViewTable, AddDB, AddSQL, AddExcel, AddCustom, AddApi },
data() {
return {
component: DataHome,
diff --git a/frontend/src/views/panel/list/PanelMain.vue b/frontend/src/views/panel/list/PanelMain.vue
index be1103fc41..4ebd93cf69 100644
--- a/frontend/src/views/panel/list/PanelMain.vue
+++ b/frontend/src/views/panel/list/PanelMain.vue
@@ -1,6 +1,6 @@
-
+
{{ $t('panel.panel_list') }}
diff --git a/frontend/src/views/system/datasource/DsMain.vue b/frontend/src/views/system/datasource/DsMain.vue
index 19eb5076d3..ec203261dc 100644
--- a/frontend/src/views/system/datasource/DsMain.vue
+++ b/frontend/src/views/system/datasource/DsMain.vue
@@ -1,11 +1,17 @@
-
-
+
+
-
+
@@ -20,7 +26,7 @@ import DataHome from './DataHome'
export default {
name: 'DsMain',
- components: {DeMainContainer, DeContainer, DeAsideContainer, DsTree, DataHome},
+ components: { DeMainContainer, DeContainer, DeAsideContainer, DsTree, DataHome },
data() {
return {
component: DataHome,
@@ -37,7 +43,7 @@ export default {
methods: {
// 切换main区内容
switchMain(param) {
- const {component, componentParam, tData} = param
+ const { component, componentParam, tData } = param
this.component = DataHome
this.param = null
this.$nextTick(() => {
@@ -55,7 +61,7 @@ export default {
})
},
refreshType(datasource) {
- this.datasource = datasource;
+ this.datasource = datasource
this.$refs.dsTree && this.$refs.dsTree.refreshType(datasource)
},
msg2Current(sourceParam) {
diff --git a/frontend/src/views/system/datasource/index.vue b/frontend/src/views/system/datasource/index.vue
index e53c1b1857..d5b1b6cfbb 100644
--- a/frontend/src/views/system/datasource/index.vue
+++ b/frontend/src/views/system/datasource/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -14,7 +14,7 @@ import bus from '@/utils/bus'
export default {
name: 'Panel',
- components: {DeMainContainer, DeContainer, DsMain},
+ components: { DeMainContainer, DeContainer, DsMain },
data() {
return {
component: DsMain,