htui-yllkbz 1.4.5 → 1.4.7

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "htui-yllkbz",
3
- "version": "1.4.5",
3
+ "version": "1.4.7",
4
4
  "port": "8082",
5
5
  "typings": "types/index.d.ts",
6
6
  "main": "lib/htui.common.js",
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2023-03-20 18:46:48
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2023-03-30 17:31:00
7
+ * @LastEditTime: 2023-03-30 17:38:51
8
8
  -->
9
9
  <template>
10
10
  <el-menu
@@ -56,7 +56,7 @@ export default class Index extends Vue {
56
56
  // console.log('', this.$route, this.$router);
57
57
  }
58
58
  get menuList() {
59
- return this.data.filter((item) => item.isEnabled);
59
+ return this.data.filter((item) => item.isEnabled && item.position === 1);
60
60
  }
61
61
  /** 方法 */
62
62
  /** 监听 */
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2023-03-20 18:47:12
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2023-03-30 17:31:31
7
+ * @LastEditTime: 2023-03-30 17:45:19
8
8
  -->
9
9
  <template>
10
10
  <el-submenu class="ht-menu-list" :index="data.name" v-if="dataLeng">
@@ -15,7 +15,9 @@
15
15
 
16
16
  <MenuItem
17
17
  :baseUrl="baseUrl"
18
- v-for="item in data.children.filter((item) => item.isEnabled)"
18
+ v-for="item in data.children.filter(
19
+ (item) => item.isEnabled && item.position === 1
20
+ )"
19
21
  :key="item.name"
20
22
  :data="item"
21
23
  ></MenuItem>
@@ -26,7 +28,8 @@
26
28
  :route="setRoute(data).url || '/'"
27
29
  :index="!!setRoute(data).url ? data.path : '/'"
28
30
  >
29
- <i :class="data.icon"></i>
31
+ <i :class="data.icon || 'el-icon-menu'"></i>
32
+ <!-- <i v-else>{{ getFirstName(data.displayName) }}</i> -->
30
33
  <span slot="title">{{ data.displayName }}</span>
31
34
  </el-menu-item>
32
35
  <el-menu-item
@@ -34,7 +37,8 @@
34
37
  :index="data.name"
35
38
  >
36
39
  <div class="ht-jump" @click.stop="jumpUrl(data)">
37
- <i :class="data.icon"> </i>
40
+ <i :class="data.icon || 'el-icon-menu'" v-if="data.icon"></i>
41
+ <!-- <i v-else>{{ getFirstName(data.displayName) }}</i> -->
38
42
  <span slot="title">{{ data.displayName }}</span>
39
43
  </div>
40
44
  </el-menu-item>
@@ -71,6 +75,9 @@ export default class Index extends Vue {
71
75
  window.location.href = row.path || '';
72
76
  }
73
77
  }
78
+ getFirstName(displayName: string) {
79
+ return displayName.slice(0, 1);
80
+ }
74
81
  /** 设置跳转地址 */
75
82
  setRoute(data: MenuDto) {
76
83
  const urlArr = data.path ? data.path.split(this.baseUrl) : [];
@@ -336,7 +336,7 @@
336
336
  <!-- 此处建议使用el-col -->
337
337
  <slot name="footerLeft"></slot>
338
338
 
339
- <el-col :span="12">
339
+ <el-col :span="$slots['footerLeft'] ? 12 : 24">
340
340
  <!-- <p style="width:90px;float:left">共{{data.length}}条</p> -->
341
341
  <PageInfo
342
342
  :hide-on-single-page="pagination && pagination.hideOnSinglePage"