imatrix-ui 2.8.97-dw-tmp8 → 2.8.97-dw-tmp10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imatrix-ui",
3
- "version": "2.8.97-dw-tmp8",
3
+ "version": "2.8.97-dw-tmp10",
4
4
  "description": "前端组件库:表格、表单、组织结构树等",
5
5
  "main": "lib/super-ui.umd.min.js",
6
6
  "private": false,
@@ -40,7 +40,7 @@ export default {
40
40
  data() {
41
41
  const menus = getMenus()
42
42
  return {
43
- menus
43
+ menus: Object.freeze(menus)
44
44
  }
45
45
  },
46
46
  computed: {
@@ -55,6 +55,7 @@ export default {
55
55
  }
56
56
  },
57
57
  created() {
58
+ const a = new Date().getTime()
58
59
  this.firstLeafMenu = this.getMyFirstMenu(this.menus)
59
60
  if (this.firstLeafMenu && this.firstLeafMenu.fullPath) {
60
61
  // 跳转到第一个页面
@@ -71,6 +72,8 @@ export default {
71
72
  this.$router.push({ path: '/dsc-index/page', query: query })
72
73
  // this.$router.push({ path: this.firstLeafMenu.fullPath })
73
74
  }
75
+ const b = new Date().getTime()
76
+ console.log('菜单组件==>created==>b-a', (b - a))
74
77
  }
75
78
  },
76
79
  methods: {
@@ -92,11 +95,14 @@ export default {
92
95
  Cookies.set('selectMenu', index)
93
96
  },
94
97
  getMyFirstMenu(menus) {
98
+ const a = new Date().getTime()
95
99
  if (menus && menus.length > 0) {
96
100
  let shouldSelectMenu = this.getFirstMenu(menus)
97
101
  if (!shouldSelectMenu) {
98
102
  shouldSelectMenu = this.getFirstMenuWithCookie(menus)
99
103
  }
104
+ const b = new Date().getTime()
105
+ console.log('菜单组件==>getMyFirstMenu==>b-a', (b - a))
100
106
  // 默认不展示第一个有权限的菜单了,可以去掉下面的代码
101
107
  // if (!shouldSelectMenu) {
102
108
  // shouldSelectMenu = this.getSelectMenuWithFirstMenu(menus[0])