002201 1 год назад
Родитель
Сommit
b8084806e1

+ 2 - 7
src/components/super-table/index.vue

@@ -391,7 +391,7 @@ export default {
           </slot>
         </template>
       </el-table-column>
-      <slot ></slot>
+      <slot></slot>
     </el-table>
     <div
       style="
@@ -440,14 +440,9 @@ export default {
   </div>
 </template>
 
-<style lang="scss">
+<style lang="scss" scoped>
 .el-super-table {
   position: relative;
-  display: flex;
-  flex-direction: column;
-  > .el-table {
-    flex: 1;
-  }
 }
 .el-super-table .el-table__header .cell {
   display: flex;

+ 0 - 1
src/layout/components/Sidebar/index.vue

@@ -66,7 +66,6 @@ export default {
       return variables;
     },
     isCollapse() {
-      return false;
       return !this.sidebar.opened;
     },
   },

+ 31 - 29
src/store/modules/app.js

@@ -1,66 +1,68 @@
-import Cookies from 'js-cookie'
+import Cookies from "js-cookie";
 
 const state = {
   sidebar: {
-    opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
+    opened: Cookies.get("sidebarStatus")
+      ? !!+Cookies.get("sidebarStatus")
+      : false,
     withoutAnimation: false,
-    hide: false
+    hide: false,
   },
-  device: 'desktop',
-  size: Cookies.get('size') || 'medium'
-}
+  device: "desktop",
+  size: Cookies.get("size") || "medium",
+};
 
 const mutations = {
-  TOGGLE_SIDEBAR: state => {
+  TOGGLE_SIDEBAR: (state) => {
     if (state.sidebar.hide) {
       return false;
     }
-    state.sidebar.opened = !state.sidebar.opened
-    state.sidebar.withoutAnimation = false
+    state.sidebar.opened = !state.sidebar.opened;
+    state.sidebar.withoutAnimation = false;
     if (state.sidebar.opened) {
-      Cookies.set('sidebarStatus', 1)
+      Cookies.set("sidebarStatus", 1);
     } else {
-      Cookies.set('sidebarStatus', 0)
+      Cookies.set("sidebarStatus", 0);
     }
   },
   CLOSE_SIDEBAR: (state, withoutAnimation) => {
-    Cookies.set('sidebarStatus', 0)
-    state.sidebar.opened = false
-    state.sidebar.withoutAnimation = withoutAnimation
+    Cookies.set("sidebarStatus", 0);
+    state.sidebar.opened = false;
+    state.sidebar.withoutAnimation = withoutAnimation;
   },
   TOGGLE_DEVICE: (state, device) => {
-    state.device = device
+    state.device = device;
   },
   SET_SIZE: (state, size) => {
-    state.size = size
-    Cookies.set('size', size)
+    state.size = size;
+    Cookies.set("size", size);
   },
   SET_SIDEBAR_HIDE: (state, status) => {
-    state.sidebar.hide = status
-  }
-}
+    state.sidebar.hide = status;
+  },
+};
 
 const actions = {
   toggleSideBar({ commit }) {
-    commit('TOGGLE_SIDEBAR')
+    commit("TOGGLE_SIDEBAR");
   },
   closeSideBar({ commit }, { withoutAnimation }) {
-    commit('CLOSE_SIDEBAR', withoutAnimation)
+    commit("CLOSE_SIDEBAR", withoutAnimation);
   },
   toggleDevice({ commit }, device) {
-    commit('TOGGLE_DEVICE', device)
+    commit("TOGGLE_DEVICE", device);
   },
   setSize({ commit }, size) {
-    commit('SET_SIZE', size)
+    commit("SET_SIZE", size);
   },
   toggleSideBarHide({ commit }, status) {
-    commit('SET_SIDEBAR_HIDE', status)
-  }
-}
+    commit("SET_SIDEBAR_HIDE", status);
+  },
+};
 
 export default {
   namespaced: true,
   state,
   mutations,
-  actions
-}
+  actions,
+};

+ 2 - 4
src/views/purchase/task/index.vue

@@ -120,8 +120,6 @@ export default {
     :body-style="{
       height: '100%',
       padding: 0,
-      display: 'flex',
-      'flex-direction': 'column',
     }"
   >
     <el-super-search
@@ -182,7 +180,7 @@ export default {
       index
       checkbox
       hiddenColumns
-      height="100%"
+      height="600"
       @row-select="useSelect"
       @pagination="useQuery(params, page)"
       style="flex: 1"
@@ -193,7 +191,7 @@ export default {
 <style scoped lang="scss">
 .el-card {
   width: calc(100% - 32px);
-  height: calc(100vh - 32px);
+  // height: calc(100vh - 32px);
   margin: 16px;
   padding: 16px;
   border-radius: 8px;