qdt-admin-layout 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,22 +1,21 @@
1
- # el-admin-layout
2
-
3
- 这是一个基于`element-ui`的后台管理layout组件,需要配合`vue2`、`vue-router3`使用。
1
+ # qdt-admin-layout
4
2
 
3
+ 签到通定制版
5
4
 
6
5
  ## 功能特性
7
6
 
8
- - flex布局、有限的移动端适配
7
+ - flex 布局、有限的移动端适配
9
8
  - 仿`ant-design-pro`的三种导航
10
9
  - 多页签
11
10
  - 侧边栏和顶栏的深色\亮色主题
12
11
  - 侧边栏可搜索
13
12
  - 路由和菜单分离
14
13
  - 支持各种页面缓存(不支持嵌套路由)
15
- - 支持iframe、外链
14
+ - 支持 iframe、外链
16
15
  - 数据外部可控,满足大部分定制化需求
17
16
 
18
17
  ## 安装
19
18
 
20
19
  ```
21
- npm i el-admin-layout -S
20
+ npm i qdt-admin-layout -S
22
21
  ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qdt-admin-layout",
3
- "version": "1.0.0",
4
- "description": "基于element-ui的后台管理layout",
3
+ "version": "1.0.1",
4
+ "description": "基于element-ui的后台管理layout的管家婆改版",
5
5
  "main": "src/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "jsdelivr": "dist/index.umd.min.js",
@@ -88,16 +88,18 @@ export default {
88
88
  on-mouseleave={() => this.handleMouseleave(true)}
89
89
  on-focus={(e) => this.handleMouseenter(e, 100)}
90
90
  >
91
- {this.$slots.default.map((item) => {
92
- return (
93
- <ul
94
- style="display:inline-block;width:200px"
95
- class={this.popupMenuClass}
96
- >
97
- {item}
98
- </ul>
99
- );
100
- })}
91
+ <div class="menu-display">
92
+ {this.$slots.default.map((item) => {
93
+ return (
94
+ <ul
95
+ style="display:inline-block;width:200px;vertical-align: top;margin:0;box-shadow: 0 0 black;border-radius:0px"
96
+ class={this.popupMenuClass}
97
+ >
98
+ {item}
99
+ </ul>
100
+ );
101
+ })}
102
+ </div>
101
103
  </div>
102
104
  </transition>
103
105
  ) : (
@@ -21,7 +21,7 @@ export default {
21
21
 
22
22
  computed: {
23
23
  isLeftRight() {
24
- return appGetters.struct === 'left-right'
24
+ return appGetters.struct === 'top-bottom'
25
25
  },
26
26
  renderAside() {
27
27
  return appGetters.isMobile || ['aside', 'mix'].includes(appGetters.navMode)
@@ -94,7 +94,7 @@ export default {
94
94
  if (slot) return slot(h, { menu, depth });
95
95
 
96
96
  const icon = menu.meta.icon;
97
- return icon && <i style="margin-top:-18px" class={`menu-icon ${icon}`} />;
97
+ return icon && <i class={`menu-icon ${icon}`} />;
98
98
  },
99
99
  // 渲染菜单内容
100
100
  renderMenuContent(h, menu, depth) {
@@ -132,13 +132,12 @@ export default {
132
132
  >
133
133
  <template slot="title">
134
134
  {depth == 1 && (
135
- <div>
135
+ <div style="padding: 10% 0;">
136
136
  {this.renderMenuIcon(h, menu, depth)}
137
- <div style="margin-top:-24px;font-size:14px;margin-left:-2px">
138
- {menu.meta.title}
139
- </div>
137
+ <div>{menu.meta.title}</div>
140
138
  </div>
141
139
  )}
140
+
142
141
  {!noContent && this.renderMenuContent(h, menu, depth)}
143
142
  </template>
144
143
  {children}
@@ -156,7 +155,10 @@ export default {
156
155
  });
157
156
  data.push(
158
157
  <div>
159
- <div class="popover-menu__title">
158
+ <div
159
+ style="font-weight:800;color:black"
160
+ class="popover-menu__title"
161
+ >
160
162
  {this.renderMenuContent(h, x, depth)}
161
163
  </div>
162
164
  <div class="el-menu el-menu--inline">{childrens}</div>
@@ -1,16 +1,25 @@
1
+ .menu-display {
2
+ margin-left: 5px;
3
+ border-radius: 2px;
4
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
5
+ ul {
6
+ border-left: 1px solid rgb(228, 231, 237);
7
+ }
8
+ ul:first-child {
9
+ border: none;
10
+ }
11
+ }
12
+ .el-menu--collapse .el-submenu {
13
+ height: 88px !important;
14
+ }
15
+
1
16
  .el-menu {
2
17
  width: 100%;
3
- border: none !important;
4
18
 
5
19
  // 菜单图标
6
20
  .menu-icon {
7
21
  color: inherit;
8
22
  font-size: 38px;
9
-
10
- // 与菜单内容的间隔
11
- & + * {
12
- margin-left: $menu-icon-text-gap;
13
- }
14
23
  }
15
24
 
16
25
  // 子级菜单激活时,父级同样高亮
@@ -100,7 +109,7 @@
100
109
  // 折叠时
101
110
  &.el-menu--collapse {
102
111
  .el-submenu__title {
103
- padding-right: $menu-padding;
112
+ padding: 5% 0 !important;
104
113
  }
105
114
 
106
115
  // 使用过渡动画会用span标签包裹,导致原始使用'>'选择器失效
@@ -26,7 +26,7 @@
26
26
  // 子级菜单的背景颜色和内阴影
27
27
  .el-menu--inline {
28
28
  background-color: $sub-menu-background-dark;
29
- box-shadow: inset 0 2px 8px darken($sub-menu-background-dark, 10%)
29
+ // box-shadow: inset 0 2px 8px darken($sub-menu-background-dark, 10%)
30
30
  }
31
31
  }
32
32
 
@@ -1,9 +1,8 @@
1
1
  .collapse {
2
2
  .el-submenu__title {
3
+ text-align: center;
3
4
  height: 100%;
4
- padding-top: 15px;
5
- padding-left: 25px;
6
- padding-right: 23px;
5
+ line-height: normal !important;
7
6
  }
8
7
  }
9
8
 
@@ -13,7 +12,7 @@
13
12
  // 菜单的文字以及hover颜色
14
13
  .el-menu-item,
15
14
  .el-submenu__title {
16
- color: $menu-text-color-light;
15
+ color: rgb(109, 110, 110);
17
16
  &:hover {
18
17
  color: #f56d45;
19
18
  }
@@ -21,7 +20,7 @@
21
20
 
22
21
  // 设置了显示弹出菜单的父级
23
22
  .el-menu--popup .popover-menu__title {
24
- color: $menu-text-color-light;
23
+ color: rgb(109, 110, 110);
25
24
  border-bottom-color: $--border-color-light;
26
25
  }
27
26
 
@@ -71,7 +70,7 @@
71
70
  // 菜单的文字以及hover颜色
72
71
  .el-menu-item,
73
72
  .el-submenu__title {
74
- color: $menu-text-color-light;
73
+ color: rgb(109, 110, 110);
75
74
 
76
75
  &:hover {
77
76
  color: $menu-text-hover-color-light;
package/src/store/app.js CHANGED
@@ -31,10 +31,10 @@ const state = {
31
31
  loadingMenu: false,
32
32
 
33
33
  // 分层结构,上下('top-bottom')、左右('left-right')
34
- struct: 'left-right',
34
+ struct: 'top-bottom',
35
35
 
36
36
  // 导航模式,'aside'、'head'、'mix'
37
- navMode: 'mix',
37
+ navMode: 'aside',
38
38
 
39
39
  // 自定义渲染logo,(h, {img, title, props}) => VNode | VNode[]
40
40
  logoSlot: undefined