eoss-ui 0.5.73 → 0.5.74

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.
Files changed (54) hide show
  1. package/lib/button-group.js +16 -6
  2. package/lib/button.js +16 -6
  3. package/lib/checkbox-group.js +16 -6
  4. package/lib/clients.js +16 -7
  5. package/lib/data-table-form.js +16 -6
  6. package/lib/data-table.js +16 -6
  7. package/lib/date-picker.js +16 -6
  8. package/lib/dialog.js +16 -6
  9. package/lib/eoss-ui.common.js +176 -82
  10. package/lib/flow-group.js +16 -6
  11. package/lib/flow-list.js +16 -6
  12. package/lib/flow.js +16 -6
  13. package/lib/form.js +16 -6
  14. package/lib/handle-user.js +16 -6
  15. package/lib/handler.js +16 -6
  16. package/lib/index.js +1 -1
  17. package/lib/input-number.js +16 -6
  18. package/lib/input.js +16 -6
  19. package/lib/login.js +24 -14
  20. package/lib/main.js +98 -28
  21. package/lib/nav.js +64 -29
  22. package/lib/page.js +16 -6
  23. package/lib/player.js +16 -6
  24. package/lib/qr-code.js +16 -6
  25. package/lib/radio-group.js +16 -6
  26. package/lib/retrial-auth.js +16 -6
  27. package/lib/select-ganged.js +16 -6
  28. package/lib/select.js +16 -6
  29. package/lib/selector-panel.js +16 -6
  30. package/lib/selector.js +16 -6
  31. package/lib/sizer.js +16 -6
  32. package/lib/steps.js +16 -6
  33. package/lib/switch.js +16 -6
  34. package/lib/table-form.js +16 -6
  35. package/lib/tabs.js +16 -6
  36. package/lib/theme-chalk/index.css +1 -1
  37. package/lib/theme-chalk/nav.css +1 -1
  38. package/lib/tips.js +16 -6
  39. package/lib/tree-group.js +16 -6
  40. package/lib/tree.js +16 -6
  41. package/lib/upload.js +16 -6
  42. package/lib/utils/webSocket.js +16 -6
  43. package/lib/wujie.js +16 -6
  44. package/lib/wxlogin.js +16 -6
  45. package/package.json +1 -1
  46. package/packages/clients/src/main.vue +3 -1
  47. package/packages/login/src/resetPassword.vue +1 -1
  48. package/packages/main/src/main.vue +44 -10
  49. package/packages/nav/src/main.vue +25 -8
  50. package/packages/theme-chalk/lib/index.css +1 -1
  51. package/packages/theme-chalk/lib/nav.css +1 -1
  52. package/packages/theme-chalk/src/nav.scss +4 -1
  53. package/src/index.js +1 -1
  54. package/src/utils/webSocket.js +14 -7
@@ -39,9 +39,9 @@
39
39
  :biserial="biserial"
40
40
  :style="{
41
41
  width: biserial ? width : boxWidth,
42
- left: show ? '15px' : navWidth
42
+ left: biserial ? (show ? '15px' : navWidth) : ''
43
43
  }"
44
- v-show="biserial ? subMenu.length : menu.length"
44
+ v-show="showMenu"
45
45
  >
46
46
  <div class="es-nav-title" v-if="showTitle" ref="navTitle">
47
47
  <span v-show="!isCollapse">{{ headline }}</span>
@@ -91,6 +91,7 @@
91
91
  </template>
92
92
  <script>
93
93
  import util from 'eoss-ui/src/utils/util';
94
+ import { debounce } from 'throttle-debounce';
94
95
  export default {
95
96
  name: 'EsNav',
96
97
  inheritAttrs: false,
@@ -131,7 +132,9 @@ export default {
131
132
  type: Boolean,
132
133
  default: true
133
134
  },
134
- overlap: Boolean
135
+ overlap: Boolean,
136
+ //隐藏菜单
137
+ hideSubMenu: Boolean
135
138
  },
136
139
  computed: {
137
140
  show() {
@@ -178,7 +181,11 @@ export default {
178
181
  return this.navWidth;
179
182
  }
180
183
  }
181
- return this.subMenu && this.subMenu.length && this.isShow && !this.overlap
184
+ return this.subMenu &&
185
+ this.subMenu.length &&
186
+ this.isShow &&
187
+ !this.overlap &&
188
+ !this.hideSubMenu
182
189
  ? parseInt(this.width, 10) + parseInt(this.navWidth, 10) + 'px'
183
190
  : this.navWidth;
184
191
  },
@@ -197,10 +204,13 @@ export default {
197
204
  this.headline = val;
198
205
  }
199
206
  },
207
+ boxWidth() {
208
+ this.getHeight();
209
+ },
200
210
  biserial: {
201
211
  handler(val) {
202
212
  this.isShow = !val;
203
- this.resetHeight();
213
+ this.getHeight();
204
214
  }
205
215
  },
206
216
  defaultActive: {
@@ -251,8 +261,10 @@ export default {
251
261
  this.subMenu = [];
252
262
  }
253
263
  },
254
- showMenu() {
255
- this.resetHeight();
264
+ showMenu(val) {
265
+ if (val) {
266
+ this.getHeight();
267
+ }
256
268
  }
257
269
  },
258
270
  data() {
@@ -267,8 +279,13 @@ export default {
267
279
  subMenu: []
268
280
  };
269
281
  },
282
+ beforeCreate() {
283
+ this.getHeight = debounce(500, () => {
284
+ this.resetHeight();
285
+ });
286
+ },
270
287
  mounted() {
271
- this.resetHeight();
288
+ this.getHeight();
272
289
  this.move();
273
290
  },
274
291
  methods: {