eoss-ui 0.4.44 → 0.4.45

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/lib/main.js CHANGED
@@ -2772,7 +2772,7 @@ module.exports = require("stompjs");
2772
2772
  // ESM COMPAT FLAG
2773
2773
  __webpack_require__.r(__webpack_exports__);
2774
2774
 
2775
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=7e69a69c&
2775
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=6b3fed86&
2776
2776
  var render = function () {
2777
2777
  var _vm = this
2778
2778
  var _h = _vm.$createElement
@@ -2971,6 +2971,9 @@ var render = function () {
2971
2971
  "is-default": _vm.isDefault,
2972
2972
  },
2973
2973
  on: {
2974
+ open: function (res) {
2975
+ _vm.handleSelect(res, "menu")
2976
+ },
2974
2977
  trigger: function (res) {
2975
2978
  _vm.handleSelect(res, "sub")
2976
2979
  },
@@ -3191,7 +3194,7 @@ var staticRenderFns = []
3191
3194
  render._withStripped = true
3192
3195
 
3193
3196
 
3194
- // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=7e69a69c&
3197
+ // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=6b3fed86&
3195
3198
 
3196
3199
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/userinfo.vue?vue&type=template&id=1965153d&
3197
3200
  var userinfovue_type_template_id_1965153d_render = function () {
@@ -4981,6 +4984,11 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
4981
4984
  //
4982
4985
  //
4983
4986
  //
4987
+ //
4988
+ //
4989
+ //
4990
+ //
4991
+ //
4984
4992
 
4985
4993
 
4986
4994
 
@@ -6018,12 +6026,25 @@ var log = util["a" /* default */].getParams('console');
6018
6026
  }
6019
6027
  }
6020
6028
  if (node.url) {
6021
- var _tab = (node.fourthTabs || []).filter(function (item) {
6022
- return item.url === node.url;
6023
- })[0];
6024
- if (_tab) {
6025
- this.tabs = node.fourthTabs;
6026
- this.tabsId = _tab.id;
6029
+ if (node.children && node.children.length) {
6030
+ var _tab = node.children.filter(function (item) {
6031
+ return item.url === node.url;
6032
+ })[0];
6033
+ if (_tab) {
6034
+ if (this.biserial) {
6035
+ this.$set(this.active, 1, _tab.id);
6036
+ } else {
6037
+ this.active = _tab.id;
6038
+ }
6039
+ }
6040
+ } else {
6041
+ var _tab2 = (node.fourthTabs || []).filter(function (item) {
6042
+ return item.url === node.url;
6043
+ })[0];
6044
+ if (_tab2) {
6045
+ this.tabs = node.fourthTabs;
6046
+ this.tabsId = _tab2.id;
6047
+ }
6027
6048
  }
6028
6049
  } else if (node.fourthTabs.length) {
6029
6050
  this.tabs = node.fourthTabs;
package/lib/menu.js CHANGED
@@ -332,13 +332,25 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
332
332
  mode: this.mode
333
333
  });
334
334
  },
335
- handleOpen: function handleOpen(key, keyPath) {
335
+ handleOpen: function handleOpen(key, keyPath, item) {
336
336
  this.menuId = key;
337
- this.$emit('open', { key: key, path: keyPath });
337
+ this.$emit('open', {
338
+ key: key,
339
+ path: keyPath,
340
+ node: item.$attrs.data,
341
+ item: item,
342
+ mode: this.mode
343
+ });
338
344
  },
339
- handleClose: function handleClose(key, keyPath) {
345
+ handleClose: function handleClose(key, keyPath, item) {
340
346
  this.menuId = null;
341
- this.$emit('close', { key: key, path: keyPath });
347
+ this.$emit('close', {
348
+ key: key,
349
+ path: keyPath,
350
+ node: item.$attrs.data,
351
+ item: item,
352
+ mode: this.mode
353
+ });
342
354
  },
343
355
  getSub: function getSub(item, h, popper) {
344
356
  var _this3 = this;
@@ -384,7 +396,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
384
396
  maxHeight: this.maxHeight,
385
397
  paddingLeft: this.paddingLeft
386
398
  },
387
- attrs: { index: item.id, key: item.id }
399
+ attrs: { data: item, index: item.id, key: item.id }
388
400
  }, doms)];
389
401
  } else if (this.deep && this.mode === 'horizontal' && item.fourthTabs && item.fourthTabs.length && (!item.extendData || item.extendData.businessStatus != 0)) {
390
402
  doms = doms.concat(item.fourthTabs.map(function (ele, index) {
@@ -402,7 +414,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
402
414
  maxHeight: this.maxHeight,
403
415
  paddingLeft: this.paddingLeft
404
416
  },
405
- attrs: { index: item.id, key: item.id }
417
+ attrs: { data: item, index: item.id, key: item.id }
406
418
  }, doms)];
407
419
  } else {
408
420
  return [h('el-menu-item', {
package/lib/nav.js CHANGED
@@ -2698,7 +2698,7 @@ module.exports = require("eoss-element");
2698
2698
  // ESM COMPAT FLAG
2699
2699
  __webpack_require__.r(__webpack_exports__);
2700
2700
 
2701
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/nav/src/main.vue?vue&type=template&id=a32b0cca&
2701
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/nav/src/main.vue?vue&type=template&id=84cce570&
2702
2702
  var render = function () {
2703
2703
  var _vm = this
2704
2704
  var _h = _vm.$createElement
@@ -2841,7 +2841,7 @@ var staticRenderFns = []
2841
2841
  render._withStripped = true
2842
2842
 
2843
2843
 
2844
- // CONCATENATED MODULE: ./packages/nav/src/main.vue?vue&type=template&id=a32b0cca&
2844
+ // CONCATENATED MODULE: ./packages/nav/src/main.vue?vue&type=template&id=84cce570&
2845
2845
 
2846
2846
  // EXTERNAL MODULE: ./src/utils/util.js
2847
2847
  var util = __webpack_require__(0);
@@ -3067,11 +3067,11 @@ var util = __webpack_require__(0);
3067
3067
  handleSelect: function handleSelect(res) {
3068
3068
  this.$emit('select', res);
3069
3069
  },
3070
- handleOpen: function handleOpen(key, keyPath) {
3071
- this.$emit('open', { key: key, path: keyPath });
3070
+ handleOpen: function handleOpen(res) {
3071
+ this.$emit('open', res);
3072
3072
  },
3073
- handleClose: function handleClose(key, keyPath) {
3074
- this.$emit('close', { key: key, path: keyPath });
3073
+ handleClose: function handleClose(res) {
3074
+ this.$emit('close', res);
3075
3075
  },
3076
3076
  resetHeight: function resetHeight() {
3077
3077
  var _this3 = this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.4.44",
3
+ "version": "0.4.45",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -95,7 +95,7 @@
95
95
  "cp-cli": "^1.0.2",
96
96
  "cross-env": "^3.1.3",
97
97
  "css-loader": "^2.1.0",
98
- "eoss-element": "^0.2.55",
98
+ "eoss-element": "^0.2.56",
99
99
  "es6-promise": "^4.0.5",
100
100
  "eslint": "4.18.2",
101
101
  "eslint-config-elemefe": "0.1.1",
@@ -119,6 +119,11 @@
119
119
  :showCollapse="showNavTitle"
120
120
  :menu-tips="menuTips"
121
121
  :is-default="isDefault"
122
+ @open="
123
+ (res) => {
124
+ handleSelect(res, 'menu');
125
+ }
126
+ "
122
127
  @trigger="
123
128
  (res) => {
124
129
  handleSelect(res, 'sub');
@@ -1340,12 +1345,25 @@ export default {
1340
1345
  }
1341
1346
  }
1342
1347
  if (node.url) {
1343
- let tab = (node.fourthTabs || []).filter((item) => {
1344
- return item.url === node.url;
1345
- })[0];
1346
- if (tab) {
1347
- this.tabs = node.fourthTabs;
1348
- this.tabsId = tab.id;
1348
+ if (node.children && node.children.length) {
1349
+ let tab = node.children.filter((item) => {
1350
+ return item.url === node.url;
1351
+ })[0];
1352
+ if (tab) {
1353
+ if (this.biserial) {
1354
+ this.$set(this.active, 1, tab.id);
1355
+ } else {
1356
+ this.active = tab.id;
1357
+ }
1358
+ }
1359
+ } else {
1360
+ let tab = (node.fourthTabs || []).filter((item) => {
1361
+ return item.url === node.url;
1362
+ })[0];
1363
+ if (tab) {
1364
+ this.tabs = node.fourthTabs;
1365
+ this.tabsId = tab.id;
1366
+ }
1349
1367
  }
1350
1368
  } else if (node.fourthTabs.length) {
1351
1369
  this.tabs = node.fourthTabs;
@@ -128,13 +128,25 @@ export default {
128
128
  mode: this.mode
129
129
  });
130
130
  },
131
- handleOpen(key, keyPath) {
131
+ handleOpen(key, keyPath, item) {
132
132
  this.menuId = key;
133
- this.$emit('open', { key: key, path: keyPath });
133
+ this.$emit('open', {
134
+ key: key,
135
+ path: keyPath,
136
+ node: item.$attrs.data,
137
+ item: item,
138
+ mode: this.mode
139
+ });
134
140
  },
135
- handleClose(key, keyPath) {
141
+ handleClose(key, keyPath, item) {
136
142
  this.menuId = null;
137
- this.$emit('close', { key: key, path: keyPath });
143
+ this.$emit('close', {
144
+ key: key,
145
+ path: keyPath,
146
+ node: item.$attrs.data,
147
+ item: item,
148
+ mode: this.mode
149
+ });
138
150
  },
139
151
  getSub(item, h, popper) {
140
152
  if (popper) {
@@ -226,7 +238,7 @@ export default {
226
238
  maxHeight: this.maxHeight,
227
239
  paddingLeft: this.paddingLeft
228
240
  },
229
- attrs: { index: item.id, key: item.id }
241
+ attrs: { data: item, index: item.id, key: item.id }
230
242
  },
231
243
  doms
232
244
  )
@@ -258,7 +270,7 @@ export default {
258
270
  maxHeight: this.maxHeight,
259
271
  paddingLeft: this.paddingLeft
260
272
  },
261
- attrs: { index: item.id, key: item.id }
273
+ attrs: { data: item, index: item.id, key: item.id }
262
274
  },
263
275
  doms
264
276
  )
@@ -144,7 +144,7 @@ export default {
144
144
  } else {
145
145
  this.active = val[val.length - 1];
146
146
  }
147
- this.menu.forEach(item => {
147
+ this.menu.forEach((item) => {
148
148
  if (item.id === this.active) {
149
149
  this.subMenu = item.children;
150
150
  this.headline = this.title ? this.title : item.text;
@@ -168,7 +168,7 @@ export default {
168
168
  } else {
169
169
  this.active = this.defaultActive[this.defaultActive.length - 1];
170
170
  }
171
- val.forEach(item => {
171
+ val.forEach((item) => {
172
172
  if (item.id === this.active) {
173
173
  this.subMenu = item.children;
174
174
  this.headline = this.title ? this.title : item.text;
@@ -223,16 +223,16 @@ export default {
223
223
  handleSelect(res) {
224
224
  this.$emit('select', res);
225
225
  },
226
- handleOpen(key, keyPath) {
227
- this.$emit('open', { key: key, path: keyPath });
226
+ handleOpen(res) {
227
+ this.$emit('open', res);
228
228
  },
229
- handleClose(key, keyPath) {
230
- this.$emit('close', { key: key, path: keyPath });
229
+ handleClose(res) {
230
+ this.$emit('close', res);
231
231
  },
232
232
  resetHeight() {
233
233
  this.$nextTick(() => {
234
234
  let height = this.$refs.esNav.parentNode.offsetHeight;
235
- Array.from(this.$refs.esNav.parentNode.children).forEach(item => {
235
+ Array.from(this.$refs.esNav.parentNode.children).forEach((item) => {
236
236
  if (item !== this.$refs.esNav) {
237
237
  let mt = util.getStyle(item, 'margin-top');
238
238
  let mb = util.getStyle(item, 'margin-bottom');
package/src/index.js CHANGED
@@ -117,7 +117,7 @@ if (typeof window !== 'undefined' && window.Vue) {
117
117
  }
118
118
 
119
119
  export default {
120
- version: '0.4.44',
120
+ version: '0.4.45',
121
121
  install,
122
122
  Button,
123
123
  ButtonGroup,