module-menu-vue 0.0.4 → 0.0.6

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": "module-menu-vue",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "城市大数据平台菜单--Vue版",
5
5
  "main": "/index.js",
6
6
  "scripts": {
@@ -4,7 +4,7 @@
4
4
  <div class='menuIcon' @click="showMenuList = !showMenuList">
5
5
  <img class="menuIcon_img" :src="menuIconSrc" />
6
6
  </div>
7
- <div class="menu_title_content" v-show="collapse">
7
+ <div class="menu_title_content" v-if="showCollapse">
8
8
  <img class="menu_title_content_img" :src="getLogoAndTitle().logoSrc" alt="logo" />
9
9
  <span class="menu_title">{{getLogoAndTitle().title}}</span>
10
10
  </div>
@@ -46,14 +46,23 @@ export default {
46
46
  name: 'ModuleMenu',
47
47
  props: {
48
48
  sysName: {
49
- type: String,
50
- default: 'admin'
49
+ type: String,
50
+ default: 'admin'
51
51
  },
52
52
  collapse: {
53
53
  type: Boolean,
54
54
  default: true,
55
55
  }
56
56
  },
57
+ watch: {
58
+ collapse: {
59
+ handler: function (newVal, oldVal) {
60
+ console.log('---', newVal, oldVal)
61
+ this.showCollapse = newVal
62
+ },
63
+ deep: true
64
+ }
65
+ },
57
66
  data () {
58
67
  return {
59
68
  showMenuList: false,
@@ -61,7 +70,8 @@ export default {
61
70
  menuList: [],
62
71
  sessionMenu: [],
63
72
  menuListInit: menuListInit,
64
- sysNameMap: sysNameMap
73
+ sysNameMap: sysNameMap,
74
+ showCollapse: true
65
75
  }
66
76
  },
67
77
  created () {
@@ -46,6 +46,7 @@ export default {
46
46
  props: {
47
47
  sysName: {
48
48
  type: String,
49
+ default: 'admin'
49
50
  },
50
51
  },
51
52
  methods: {
@@ -106,6 +107,6 @@ export default {
106
107
  color: rgba(0, 0, 0, 0.85);
107
108
  }
108
109
  .el-popper{
109
- margin-top: -2px;
110
+ margin-top: -2px !important;
110
111
  }
111
112
  </style>