eoss 0.1.0-alpha.24 → 0.1.0-alpha.26

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 (309) hide show
  1. package/lib/0.js +1 -1
  2. package/lib/1.js +1 -1
  3. package/lib/10.js +1 -1
  4. package/lib/11.js +1 -1
  5. package/lib/12.js +1 -1
  6. package/lib/13.js +1 -1
  7. package/lib/14.js +1 -1
  8. package/lib/15.js +1 -1
  9. package/lib/16.js +1 -1
  10. package/lib/17.js +1 -1
  11. package/lib/18.js +1 -1
  12. package/lib/19.js +1 -1
  13. package/lib/20.js +1 -1
  14. package/lib/21.js +1 -1
  15. package/lib/22.js +1 -1
  16. package/lib/23.js +1 -1
  17. package/lib/24.js +1 -1
  18. package/lib/25.js +1 -1
  19. package/lib/26.js +1 -1
  20. package/lib/27.js +1 -1
  21. package/lib/28.js +1 -1
  22. package/lib/29.js +1 -1
  23. package/lib/3.js +1 -1
  24. package/lib/30.js +1 -1
  25. package/lib/31.js +1 -1
  26. package/lib/32.js +1 -1
  27. package/lib/33.js +1 -1
  28. package/lib/34.js +1 -1
  29. package/lib/35.js +1 -1
  30. package/lib/36.js +1 -1
  31. package/lib/37.js +1 -1
  32. package/lib/38.js +1 -1
  33. package/lib/39.js +1 -1
  34. package/lib/4.js +1 -1
  35. package/lib/40.js +1 -1
  36. package/lib/41.js +1 -1
  37. package/lib/42.js +1 -1
  38. package/lib/43.js +1 -1
  39. package/lib/44.js +1 -1
  40. package/lib/45.js +1 -1
  41. package/lib/46.js +1 -1
  42. package/lib/47.js +1 -1
  43. package/lib/48.js +1 -1
  44. package/lib/49.js +1 -1
  45. package/lib/5.js +1 -1
  46. package/lib/50.js +1 -1
  47. package/lib/51.js +1 -1
  48. package/lib/52.js +1 -1
  49. package/lib/53.js +1 -1
  50. package/lib/54.js +1 -1
  51. package/lib/55.js +1 -1
  52. package/lib/56.js +1 -1
  53. package/lib/57.js +1 -1
  54. package/lib/58.js +1 -1
  55. package/lib/59.js +1 -1
  56. package/lib/6.js +1 -1
  57. package/lib/60.js +1 -1
  58. package/lib/61.js +1 -1
  59. package/lib/62.js +1 -1
  60. package/lib/63.js +1 -1
  61. package/lib/64.js +1 -1
  62. package/lib/65.js +1 -1
  63. package/lib/66.js +1 -1
  64. package/lib/67.js +1 -1
  65. package/lib/68.js +1 -1
  66. package/lib/69.js +1 -1
  67. package/lib/7.js +1 -1
  68. package/lib/70.js +1 -1
  69. package/lib/71.js +1 -1
  70. package/lib/72.js +1 -1
  71. package/lib/73.js +1 -1
  72. package/lib/74.js +1 -1
  73. package/lib/75.js +1 -1
  74. package/lib/76.js +1 -1
  75. package/lib/77.js +1 -1
  76. package/lib/78.js +1 -1
  77. package/lib/79.js +1 -1
  78. package/lib/8.js +1 -1
  79. package/lib/80.js +1 -1
  80. package/lib/81.js +1 -1
  81. package/lib/9.js +1 -1
  82. package/lib/account-login.js +1554 -1437
  83. package/lib/alert.js +2 -2
  84. package/lib/aside.js +2 -2
  85. package/lib/audit-trajectory.js +928 -0
  86. package/lib/autocomplete.js +1506 -1506
  87. package/lib/avatar.js +2 -2
  88. package/lib/backtop.js +2 -2
  89. package/lib/badge.js +2 -2
  90. package/lib/breadcrumb-item.js +4 -4
  91. package/lib/breadcrumb.js +4 -4
  92. package/lib/button-group.js +9 -9
  93. package/lib/button.js +2 -2
  94. package/lib/ca-login.js +1290 -1290
  95. package/lib/calendar.js +999 -999
  96. package/lib/card.js +2 -2
  97. package/lib/carousel-item.js +1275 -1275
  98. package/lib/carousel.js +515 -515
  99. package/lib/cascader-panel.js +1302 -1302
  100. package/lib/cascader.js +1561 -1561
  101. package/lib/checkbox-button.js +2 -2
  102. package/lib/checkbox-group.js +1694 -1610
  103. package/lib/checkbox.js +9 -42
  104. package/lib/col.js +2 -2
  105. package/lib/collapse-item.js +1117 -1054
  106. package/lib/collapse.js +1122 -1054
  107. package/lib/color-picker.js +11 -11
  108. package/lib/config/api.js +80 -1
  109. package/lib/container.js +2 -2
  110. package/lib/cron.js +2 -2
  111. package/lib/data-table.js +1446 -1319
  112. package/lib/date-picker.js +1515 -1515
  113. package/lib/dialog.js +1796 -1794
  114. package/lib/divider.js +2 -2
  115. package/lib/drawer.js +4 -4
  116. package/lib/dropdown-item.js +4 -4
  117. package/lib/dropdown-menu.js +6 -6
  118. package/lib/dropdown.js +1477 -1477
  119. package/lib/email-login.js +1544 -1427
  120. package/lib/empty.js +2 -2
  121. package/lib/eoss.common.js +52567 -41727
  122. package/lib/flip.js +2 -2
  123. package/lib/flow-group.js +1278 -1278
  124. package/lib/flow.js +1716 -1599
  125. package/lib/flows.js +1561 -1444
  126. package/lib/footer.js +2 -2
  127. package/lib/form-item.js +1285 -1285
  128. package/lib/form.js +1144 -1067
  129. package/lib/guide.js +620 -0
  130. package/lib/header.js +2 -2
  131. package/lib/icon.js +1505 -1388
  132. package/lib/icons.js +2 -2
  133. package/lib/image-viewer.js +1376 -1376
  134. package/lib/image.js +73 -73
  135. package/lib/index.js +1 -1
  136. package/lib/infinite-scroll.js +71 -71
  137. package/lib/input-number.js +6 -6
  138. package/lib/input.js +1284 -1284
  139. package/lib/link.js +2 -2
  140. package/lib/loading.js +5 -5
  141. package/lib/login.js +1749 -1619
  142. package/lib/lowcode.js +12381 -5094
  143. package/lib/main.js +4049 -3653
  144. package/lib/marquee.js +1279 -1279
  145. package/lib/menu-item-group.js +2 -2
  146. package/lib/menu-item.js +2 -2
  147. package/lib/menu.js +1796 -1796
  148. package/lib/message-box.js +2993 -2993
  149. package/lib/message.js +1389 -1389
  150. package/lib/notification.js +1487 -1487
  151. package/lib/option-group.js +2 -2
  152. package/lib/option.js +1392 -1392
  153. package/lib/page-header.js +2 -2
  154. package/lib/pagination.js +1301 -1301
  155. package/lib/phone-login.js +1529 -1412
  156. package/lib/popconfirm.js +6 -6
  157. package/lib/popover.js +1425 -1425
  158. package/lib/process-config.js +7674 -0
  159. package/lib/process-module.js +7080 -0
  160. package/lib/process-rule.js +8246 -0
  161. package/lib/progress.js +5 -5
  162. package/lib/qr-code.js +7 -7
  163. package/lib/qrcode-login.js +1609 -1492
  164. package/lib/radio-button.js +10 -21
  165. package/lib/radio-group.js +1714 -1626
  166. package/lib/radio.js +10 -25
  167. package/lib/rate.js +1387 -1387
  168. package/lib/row.js +2 -2
  169. package/lib/scrollbar.js +1374 -1374
  170. package/lib/select.js +2376 -2257
  171. package/lib/selector-panel.js +1706 -1651
  172. package/lib/selector.js +1241 -1134
  173. package/lib/slider.js +2 -2
  174. package/lib/step.js +1119 -1051
  175. package/lib/steps.js +1276 -1276
  176. package/lib/submenu.js +530 -530
  177. package/lib/switch.js +1277 -1277
  178. package/lib/tab-pane.js +2 -2
  179. package/lib/table-column.js +1278 -1278
  180. package/lib/table.js +1953 -1836
  181. package/lib/tabs.js +1283 -1283
  182. package/lib/tag.js +2 -2
  183. package/lib/theme-chalk/audit-trajectory.css +0 -0
  184. package/lib/theme-chalk/base.css +1 -1
  185. package/lib/theme-chalk/button-group.css +1 -1
  186. package/lib/theme-chalk/calendar.css +1 -1
  187. package/lib/theme-chalk/guide.css +1 -0
  188. package/lib/theme-chalk/icon.css +1 -1
  189. package/lib/theme-chalk/icons.css +1 -1
  190. package/lib/theme-chalk/index.css +1 -1
  191. package/lib/theme-chalk/lowcode-view.css +1 -0
  192. package/lib/theme-chalk/lowcode.css +1 -1
  193. package/lib/theme-chalk/main.css +1 -1
  194. package/lib/theme-chalk/pagination.css +1 -1
  195. package/lib/theme-chalk/process-config.css +0 -0
  196. package/lib/theme-chalk/process-module.css +0 -0
  197. package/lib/theme-chalk/process-rule.css +1 -0
  198. package/lib/theme-chalk/select-dropdown.css +1 -1
  199. package/lib/theme-chalk/select.css +1 -1
  200. package/lib/theme-chalk/tree.css +1 -1
  201. package/lib/theme-chalk/update-history.css +0 -0
  202. package/lib/theme-chalk/wujie.css +1 -0
  203. package/lib/time-picker.js +1302 -1302
  204. package/lib/time-select.js +1298 -1298
  205. package/lib/timeline-item.js +2 -2
  206. package/lib/timeline.js +2 -2
  207. package/lib/tips.js +1613 -1496
  208. package/lib/toolbar.js +6 -6
  209. package/lib/tooltip.js +1363 -1363
  210. package/lib/transfer.js +1293 -1293
  211. package/lib/tree-group.js +1505 -1388
  212. package/lib/tree.js +1637 -1520
  213. package/lib/update-history.js +883 -0
  214. package/lib/upload.js +1689 -1572
  215. package/lib/utils/ajax.js +3 -5
  216. package/lib/utils/frame.js +133 -0
  217. package/lib/wujie.js +5037 -0
  218. package/package.json +3 -2
  219. package/packages/audit-trajectory/index.js +5 -0
  220. package/packages/audit-trajectory/src/main.vue +99 -0
  221. package/packages/button/src/button-group.vue +1 -1
  222. package/packages/cascader/src/cascader.vue +1 -1
  223. package/packages/checkbox/src/checkbox.vue +9 -14
  224. package/packages/data-table/src/data-table.vue +13 -4
  225. package/packages/date-picker/src/picker.vue +1 -1
  226. package/packages/dialog/src/dialog.vue +2 -0
  227. package/packages/form/src/form-item-render.vue +14 -6
  228. package/packages/form/src/form.vue +2 -2
  229. package/packages/guide/index.js +8 -0
  230. package/packages/guide/src/directive.js +47 -0
  231. package/packages/guide/src/guide.vue +89 -0
  232. package/packages/guide/src/manager.js +133 -0
  233. package/packages/input/src/input.vue +1 -1
  234. package/packages/login/src/login.vue +47 -46
  235. package/packages/lowcode/src/aside.vue +43 -8
  236. package/packages/lowcode/src/attribute/bind.vue +447 -236
  237. package/packages/lowcode/src/attribute/dependency.vue +474 -267
  238. package/packages/lowcode/src/attribute/function.vue +389 -51
  239. package/packages/lowcode/src/attribute/javascript.vue +311 -0
  240. package/packages/lowcode/src/attribute/property.vue +257 -166
  241. package/packages/lowcode/src/attribute/styles.vue +116 -15
  242. package/packages/lowcode/src/attribute.vue +654 -46
  243. package/packages/lowcode/src/canvas.vue +361 -60
  244. package/packages/lowcode/src/editor.vue +15 -2
  245. package/packages/lowcode/src/iframe.vue +60 -0
  246. package/packages/lowcode/src/lowcode.vue +233 -21
  247. package/packages/lowcode/src/mixins/history.js +132 -0
  248. package/packages/lowcode/src/pages.vue +1 -53
  249. package/packages/lowcode/src/render.vue +381 -56
  250. package/packages/lowcode/src/source.vue +12 -5
  251. package/packages/lowcode/src/toolbar.vue +43 -20
  252. package/packages/lowcode/src/util/source-generator.js +531 -0
  253. package/packages/lowcode/src/{source-parser.js → util/source-parser.js} +86 -32
  254. package/packages/lowcode-view/index.js +5 -0
  255. package/packages/lowcode-view/src/Iframe.vue +55 -0
  256. package/packages/lowcode-view/src/Modulels.vue +239 -0
  257. package/packages/lowcode-view/src/render.vue +337 -0
  258. package/packages/lowcode-view/src/view.vue +763 -0
  259. package/packages/main/src/components/pages.vue +11 -2
  260. package/packages/main/src/event-center.js +160 -0
  261. package/packages/main/src/minxs.js +60 -90
  262. package/packages/process-config/index.js +5 -0
  263. package/packages/process-config/src/FormList.vue +180 -0
  264. package/packages/process-config/src/NodeConfig.vue +212 -0
  265. package/packages/process-config/src/NodeForm.vue +237 -0
  266. package/packages/process-config/src/main.vue +257 -0
  267. package/packages/process-module/index.js +5 -0
  268. package/packages/process-module/src/FormList.vue +177 -0
  269. package/packages/process-module/src/main.vue +233 -0
  270. package/packages/process-rule/index.js +5 -0
  271. package/packages/process-rule/src/FormList.vue +614 -0
  272. package/packages/process-rule/src/companyReportDetail.vue +92 -0
  273. package/packages/process-rule/src/main.vue +749 -0
  274. package/packages/progress/src/progress.vue +1 -1
  275. package/packages/radio/src/radio-button.vue +12 -9
  276. package/packages/radio/src/radio-group.vue +10 -14
  277. package/packages/radio/src/radio.vue +12 -11
  278. package/packages/select/src/option-tree.vue +4 -4
  279. package/packages/select/src/option.vue +2 -2
  280. package/packages/select/src/select.vue +34 -37
  281. package/packages/selector/src/selector.vue +10 -12
  282. package/packages/theme-chalk/src/audit-trajectory.scss +0 -0
  283. package/packages/theme-chalk/src/button-group.scss +7 -0
  284. package/packages/theme-chalk/src/common/var.scss +34 -10
  285. package/packages/theme-chalk/src/guide.scss +93 -0
  286. package/packages/theme-chalk/src/icon.scss +425 -426
  287. package/packages/theme-chalk/src/icons.scss +1 -1
  288. package/packages/theme-chalk/src/index.scss +7 -0
  289. package/packages/theme-chalk/src/lowcode-view.scss +288 -0
  290. package/packages/theme-chalk/src/lowcode.scss +59 -2
  291. package/packages/theme-chalk/src/process-config.scss +0 -0
  292. package/packages/theme-chalk/src/process-module.scss +0 -0
  293. package/packages/theme-chalk/src/process-rule.scss +57 -0
  294. package/packages/theme-chalk/src/select-dropdown.scss +1 -1
  295. package/packages/theme-chalk/src/tree.scss +1 -0
  296. package/packages/theme-chalk/src/update-history.scss +0 -0
  297. package/packages/theme-chalk/src/wujie.scss +5 -0
  298. package/packages/update-history/index.js +5 -0
  299. package/packages/update-history/src/main.vue +54 -0
  300. package/packages/wujie/index.js +10 -0
  301. package/packages/wujie/src/wujie.vue +205 -0
  302. package/src/components/field-render.vue +5 -0
  303. package/src/config/api.js +80 -0
  304. package/src/index.js +23 -2
  305. package/src/utils/ajax.js +2 -2
  306. package/src/utils/frame.js +102 -0
  307. package/packages/lowcode/src/source-generator.js +0 -316
  308. /package/packages/lowcode/src/{json-repair.js → util/json-repair.js} +0 -0
  309. /package/packages/lowcode/src/{monaco-vue-completions.js → util/monaco-vue-completions.js} +0 -0
package/lib/submenu.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 152);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 163);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -543,23 +543,6 @@ function scrollMove(wrap) {
543
543
 
544
544
  /***/ }),
545
545
 
546
- /***/ 152:
547
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
548
-
549
- "use strict";
550
- __webpack_require__.r(__webpack_exports__);
551
- /* harmony import */ var _menu_src_submenu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
552
-
553
-
554
- /* istanbul ignore next */
555
- _menu_src_submenu__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].install = function (Vue) {
556
- Vue.component(_menu_src_submenu__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].name, _menu_src_submenu__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
557
- };
558
-
559
- /* harmony default export */ __webpack_exports__["default"] = (_menu_src_submenu__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
560
-
561
- /***/ }),
562
-
563
546
  /***/ 16:
564
547
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
565
548
 
@@ -582,6 +565,23 @@ _menu_src_submenu__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].install = func
582
565
 
583
566
  /***/ }),
584
567
 
568
+ /***/ 163:
569
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
570
+
571
+ "use strict";
572
+ __webpack_require__.r(__webpack_exports__);
573
+ /* harmony import */ var _menu_src_submenu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92);
574
+
575
+
576
+ /* istanbul ignore next */
577
+ _menu_src_submenu__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].install = function (Vue) {
578
+ Vue.component(_menu_src_submenu__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].name, _menu_src_submenu__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
579
+ };
580
+
581
+ /* harmony default export */ __webpack_exports__["default"] = (_menu_src_submenu__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
582
+
583
+ /***/ }),
584
+
585
585
  /***/ 26:
586
586
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
587
587
 
@@ -598,7 +598,7 @@ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
598
598
  var merge = __webpack_require__(16);
599
599
 
600
600
  // EXTERNAL MODULE: ./src/utils/dom.js
601
- var utils_dom = __webpack_require__(5);
601
+ var utils_dom = __webpack_require__(6);
602
602
 
603
603
  // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
604
604
 
@@ -2591,7 +2591,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
2591
2591
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2592
2592
 
2593
2593
  "use strict";
2594
- /* harmony import */ var eoss_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
2594
+ /* harmony import */ var eoss_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
2595
2595
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2596
2596
 
2597
2597
 
@@ -2689,411 +2689,152 @@ var Transition = function () {
2689
2689
 
2690
2690
  /***/ }),
2691
2691
 
2692
- /***/ 5:
2692
+ /***/ 57:
2693
2693
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2694
2694
 
2695
2695
  "use strict";
2696
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
2697
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
2698
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
2699
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
2700
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
2701
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
2702
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
2703
- /* unused harmony export setStyle */
2704
- /* unused harmony export isScroll */
2705
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
2706
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
2707
- /* unused harmony export insertAfter */
2708
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
2709
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
2710
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
2711
-
2712
- /* istanbul ignore next */
2713
2696
 
2697
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu-item.vue?vue&type=template&id=133351e8&
2698
+ var render = function () {
2699
+ var _vm = this
2700
+ var _h = _vm.$createElement
2701
+ var _c = _vm._self._c || _h
2702
+ return _c(
2703
+ "li",
2704
+ {
2705
+ staticClass: "es-menu-item",
2706
+ class: {
2707
+ "is-active": _vm.active,
2708
+ "is-disabled": _vm.disabled,
2709
+ "is-tips": _vm.tips && !_vm.collapse,
2710
+ },
2711
+ style: [
2712
+ _vm.paddingStyle,
2713
+ _vm.itemStyle,
2714
+ {
2715
+ backgroundColor: _vm.isHovering
2716
+ ? _vm.hoverBackground
2717
+ : _vm.backgroundColor,
2718
+ },
2719
+ ],
2720
+ attrs: { role: "menuitem" },
2721
+ on: {
2722
+ click: _vm.handleClick,
2723
+ mouseenter: function ($event) {
2724
+ _vm.isHovering = true
2725
+ },
2726
+ focus: function ($event) {
2727
+ _vm.isHovering = true
2728
+ },
2729
+ blur: function ($event) {
2730
+ _vm.isHovering = false
2731
+ },
2732
+ mouseleave: function ($event) {
2733
+ _vm.isHovering = false
2734
+ },
2735
+ },
2736
+ },
2737
+ [
2738
+ _vm.parentMenu.$options.componentName === "EsMenu" &&
2739
+ _vm.collapse &&
2740
+ (_vm.$slots.title || _vm.text)
2741
+ ? _c("es-tooltip", { attrs: { effect: "dark", placement: "right" } }, [
2742
+ _c(
2743
+ "div",
2744
+ { attrs: { slot: "content" }, slot: "content" },
2745
+ [
2746
+ _vm._t("title", function () {
2747
+ return [_vm._v(_vm._s(_vm.text) + " ")]
2748
+ }),
2749
+ ],
2750
+ 2
2751
+ ),
2752
+ _c(
2753
+ "div",
2754
+ {
2755
+ staticStyle: {
2756
+ position: "absolute",
2757
+ left: "0",
2758
+ top: "0",
2759
+ height: "100%",
2760
+ width: "100%",
2761
+ display: "inline-block",
2762
+ "box-sizing": "border-box",
2763
+ padding: "0 12px",
2764
+ },
2765
+ },
2766
+ [
2767
+ _vm.iconClass
2768
+ ? _c("es-icon", {
2769
+ style: _vm.iconColor,
2770
+ attrs: { contents: _vm.iconClass },
2771
+ })
2772
+ : _vm._e(),
2773
+ _vm._t("default"),
2774
+ _vm.tips
2775
+ ? _c("div", { staticClass: "es-menu__tips is-dot" })
2776
+ : _vm._e(),
2777
+ ],
2778
+ 2
2779
+ ),
2780
+ ])
2781
+ : [
2782
+ _vm.iconClass
2783
+ ? _c("es-icon", {
2784
+ style: _vm.iconColor,
2785
+ attrs: { contents: _vm.iconClass },
2786
+ })
2787
+ : _vm._e(),
2788
+ _vm._t("default", function () {
2789
+ return [
2790
+ _c("div", { staticClass: "es-menu-item__text" }, [
2791
+ _vm._v(_vm._s(_vm.text)),
2792
+ ]),
2793
+ ]
2794
+ }),
2795
+ _vm._t("title"),
2796
+ _vm.tips
2797
+ ? _c(
2798
+ "div",
2799
+ {
2800
+ staticClass: "es-menu__tips",
2801
+ class: { "is-dot": _vm.tips === true },
2802
+ },
2803
+ [
2804
+ _vm._v(
2805
+ "\n " +
2806
+ _vm._s(
2807
+ _vm.tips === true
2808
+ ? ""
2809
+ : _vm.tips > 99
2810
+ ? "99+"
2811
+ : _vm.tips
2812
+ ) +
2813
+ "\n "
2814
+ ),
2815
+ ]
2816
+ )
2817
+ : _vm._e(),
2818
+ ],
2819
+ ],
2820
+ 2
2821
+ )
2822
+ }
2823
+ var staticRenderFns = []
2824
+ render._withStripped = true
2714
2825
 
2715
2826
 
2716
- var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
2717
- var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
2718
- var MOZ_HACK_REGEXP = /^moz([A-Z])/;
2719
- var ieVersion = isServer ? 0 : Number(document.documentMode);
2720
-
2721
- /* istanbul ignore next */
2722
- var trim = function trim(string) {
2723
- return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
2724
- };
2725
- /* istanbul ignore next */
2726
- var camelCase = function camelCase(name) {
2727
- return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
2728
- return offset ? letter.toUpperCase() : letter;
2729
- }).replace(MOZ_HACK_REGEXP, 'Moz$1');
2730
- };
2731
-
2732
- /* istanbul ignore next */
2733
- var on = function () {
2734
- if (!isServer && document.addEventListener) {
2735
- return function (element, event, handler) {
2736
- if (element && event && handler) {
2737
- element.addEventListener(event, handler, false);
2738
- }
2739
- };
2740
- } else {
2741
- return function (element, event, handler) {
2742
- if (element && event && handler) {
2743
- element.attachEvent('on' + event, handler);
2744
- }
2745
- };
2746
- }
2747
- }();
2827
+ // CONCATENATED MODULE: ./packages/menu/src/menu-item.vue?vue&type=template&id=133351e8&
2748
2828
 
2749
- /* istanbul ignore next */
2750
- var off = function () {
2751
- if (!isServer && document.removeEventListener) {
2752
- return function (element, event, handler) {
2753
- if (element && event) {
2754
- element.removeEventListener(event, handler, false);
2755
- }
2756
- };
2757
- } else {
2758
- return function (element, event, handler) {
2759
- if (element && event) {
2760
- element.detachEvent('on' + event, handler);
2761
- }
2762
- };
2763
- }
2764
- }();
2829
+ // EXTERNAL MODULE: ./packages/menu/src/menu-mixin.js
2830
+ var menu_mixin = __webpack_require__(76);
2765
2831
 
2766
- /* istanbul ignore next */
2767
- var once = function once(el, event, fn) {
2768
- var listener = function listener() {
2769
- if (fn) {
2770
- fn.apply(this, arguments);
2771
- }
2772
- off(el, event, listener);
2773
- };
2774
- on(el, event, listener);
2775
- };
2832
+ // EXTERNAL MODULE: external "eoss/lib/tooltip"
2833
+ var tooltip_ = __webpack_require__(37);
2834
+ var tooltip_default = /*#__PURE__*/__webpack_require__.n(tooltip_);
2776
2835
 
2777
- /* istanbul ignore next */
2778
- function hasClass(el, cls) {
2779
- if (!el || !cls) return false;
2780
- if (cls.indexOf(' ') !== -1) {
2781
- throw new Error('className should not contain space.');
2782
- }
2783
- if (el.classList) {
2784
- return el.classList.contains(cls);
2785
- } else {
2786
- return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
2787
- }
2788
- }
2789
-
2790
- /* istanbul ignore next */
2791
- function addClass(el, cls) {
2792
- if (!el) return;
2793
- var curClass = el.className;
2794
- var classes = (cls || '').split(' ');
2795
-
2796
- for (var i = 0, j = classes.length; i < j; i++) {
2797
- var clsName = classes[i];
2798
- if (!clsName) continue;
2799
-
2800
- if (el.classList) {
2801
- el.classList.add(clsName);
2802
- } else if (!hasClass(el, clsName)) {
2803
- curClass += ' ' + clsName;
2804
- }
2805
- }
2806
- if (!el.classList) {
2807
- el.className = curClass;
2808
- }
2809
- }
2810
-
2811
- /* istanbul ignore next */
2812
- function removeClass(el, cls) {
2813
- if (!el || !cls) return;
2814
- var classes = cls.split(' ');
2815
- var curClass = ' ' + el.className + ' ';
2816
-
2817
- for (var i = 0, j = classes.length; i < j; i++) {
2818
- var clsName = classes[i];
2819
- if (!clsName) continue;
2820
-
2821
- if (el.classList) {
2822
- el.classList.remove(clsName);
2823
- } else if (hasClass(el, clsName)) {
2824
- curClass = curClass.replace(' ' + clsName + ' ', ' ');
2825
- }
2826
- }
2827
- if (!el.classList) {
2828
- el.className = trim(curClass);
2829
- }
2830
- }
2831
-
2832
- /* istanbul ignore next */
2833
- var getStyle = ieVersion < 9 ? function (element, styleName) {
2834
- if (isServer) return;
2835
- if (!element || !styleName) return null;
2836
- styleName = camelCase(styleName);
2837
- if (styleName === 'float') {
2838
- styleName = 'styleFloat';
2839
- }
2840
- try {
2841
- switch (styleName) {
2842
- case 'opacity':
2843
- try {
2844
- return element.filters.item('alpha').opacity / 100;
2845
- } catch (e) {
2846
- return 1.0;
2847
- }
2848
- default:
2849
- return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
2850
- }
2851
- } catch (e) {
2852
- return element.style[styleName];
2853
- }
2854
- } : function (element, styleName) {
2855
- if (isServer) return;
2856
- if (!element || !styleName) return null;
2857
- styleName = camelCase(styleName);
2858
- if (styleName === 'float') {
2859
- styleName = 'cssFloat';
2860
- }
2861
- try {
2862
- var computed = document.defaultView.getComputedStyle(element, '');
2863
- return element.style[styleName] || computed ? computed[styleName] : null;
2864
- } catch (e) {
2865
- return element.style[styleName];
2866
- }
2867
- };
2868
-
2869
- /* istanbul ignore next */
2870
- function setStyle(element, styleName, value) {
2871
- if (!element || !styleName) return;
2872
-
2873
- if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
2874
- for (var prop in styleName) {
2875
- if (styleName.hasOwnProperty(prop)) {
2876
- setStyle(element, prop, styleName[prop]);
2877
- }
2878
- }
2879
- } else {
2880
- styleName = camelCase(styleName);
2881
- if (styleName === 'opacity' && ieVersion < 9) {
2882
- element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
2883
- } else {
2884
- element.style[styleName] = value;
2885
- }
2886
- }
2887
- }
2888
-
2889
- var isScroll = function isScroll(el, vertical) {
2890
- if (isServer) return;
2891
-
2892
- var determinedDirection = vertical !== null || vertical !== undefined;
2893
- var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
2894
-
2895
- return overflow.match(/(scroll|auto)/);
2896
- };
2897
-
2898
- var getScrollContainer = function getScrollContainer(el, vertical) {
2899
- if (isServer) return;
2900
-
2901
- var parent = el;
2902
- while (parent) {
2903
- if ([window, document, document.documentElement].includes(parent)) {
2904
- return window;
2905
- }
2906
- if (isScroll(parent, vertical)) {
2907
- return parent;
2908
- }
2909
- parent = parent.parentNode;
2910
- }
2911
-
2912
- return parent;
2913
- };
2914
-
2915
- var isInContainer = function isInContainer(el, container) {
2916
- if (isServer || !el || !container) return false;
2917
-
2918
- var elRect = el.getBoundingClientRect();
2919
- var containerRect = void 0;
2920
-
2921
- if ([window, document, document.documentElement, null, undefined].includes(container)) {
2922
- containerRect = {
2923
- top: 0,
2924
- right: window.innerWidth,
2925
- bottom: window.innerHeight,
2926
- left: 0
2927
- };
2928
- } else {
2929
- containerRect = container.getBoundingClientRect();
2930
- }
2931
-
2932
- return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
2933
- };
2934
-
2935
- /**
2936
- * 在元素前插入元素
2937
- * @param {HTMLElement} newEl 新DOM元素
2938
- * @param {HTMLElement} targetEl 在指定目标DOM元素前插入
2939
- */
2940
- function insertAfter(newEl, targetEl) {
2941
- var parentEl = targetEl.parentNode;
2942
- if (parentEl.lastChild === targetEl) {
2943
- parentEl.appendChild(newEl);
2944
- } else {
2945
- parentEl.insertBefore(newEl, targetEl.nextSibling);
2946
- }
2947
- }
2948
-
2949
- /***/ }),
2950
-
2951
- /***/ 57:
2952
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2953
-
2954
- "use strict";
2955
-
2956
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu-item.vue?vue&type=template&id=133351e8&
2957
- var render = function () {
2958
- var _vm = this
2959
- var _h = _vm.$createElement
2960
- var _c = _vm._self._c || _h
2961
- return _c(
2962
- "li",
2963
- {
2964
- staticClass: "es-menu-item",
2965
- class: {
2966
- "is-active": _vm.active,
2967
- "is-disabled": _vm.disabled,
2968
- "is-tips": _vm.tips && !_vm.collapse,
2969
- },
2970
- style: [
2971
- _vm.paddingStyle,
2972
- _vm.itemStyle,
2973
- {
2974
- backgroundColor: _vm.isHovering
2975
- ? _vm.hoverBackground
2976
- : _vm.backgroundColor,
2977
- },
2978
- ],
2979
- attrs: { role: "menuitem" },
2980
- on: {
2981
- click: _vm.handleClick,
2982
- mouseenter: function ($event) {
2983
- _vm.isHovering = true
2984
- },
2985
- focus: function ($event) {
2986
- _vm.isHovering = true
2987
- },
2988
- blur: function ($event) {
2989
- _vm.isHovering = false
2990
- },
2991
- mouseleave: function ($event) {
2992
- _vm.isHovering = false
2993
- },
2994
- },
2995
- },
2996
- [
2997
- _vm.parentMenu.$options.componentName === "EsMenu" &&
2998
- _vm.collapse &&
2999
- (_vm.$slots.title || _vm.text)
3000
- ? _c("es-tooltip", { attrs: { effect: "dark", placement: "right" } }, [
3001
- _c(
3002
- "div",
3003
- { attrs: { slot: "content" }, slot: "content" },
3004
- [
3005
- _vm._t("title", function () {
3006
- return [_vm._v(_vm._s(_vm.text) + " ")]
3007
- }),
3008
- ],
3009
- 2
3010
- ),
3011
- _c(
3012
- "div",
3013
- {
3014
- staticStyle: {
3015
- position: "absolute",
3016
- left: "0",
3017
- top: "0",
3018
- height: "100%",
3019
- width: "100%",
3020
- display: "inline-block",
3021
- "box-sizing": "border-box",
3022
- padding: "0 12px",
3023
- },
3024
- },
3025
- [
3026
- _vm.iconClass
3027
- ? _c("es-icon", {
3028
- style: _vm.iconColor,
3029
- attrs: { contents: _vm.iconClass },
3030
- })
3031
- : _vm._e(),
3032
- _vm._t("default"),
3033
- _vm.tips
3034
- ? _c("div", { staticClass: "es-menu__tips is-dot" })
3035
- : _vm._e(),
3036
- ],
3037
- 2
3038
- ),
3039
- ])
3040
- : [
3041
- _vm.iconClass
3042
- ? _c("es-icon", {
3043
- style: _vm.iconColor,
3044
- attrs: { contents: _vm.iconClass },
3045
- })
3046
- : _vm._e(),
3047
- _vm._t("default", function () {
3048
- return [
3049
- _c("div", { staticClass: "es-menu-item__text" }, [
3050
- _vm._v(_vm._s(_vm.text)),
3051
- ]),
3052
- ]
3053
- }),
3054
- _vm._t("title"),
3055
- _vm.tips
3056
- ? _c(
3057
- "div",
3058
- {
3059
- staticClass: "es-menu__tips",
3060
- class: { "is-dot": _vm.tips === true },
3061
- },
3062
- [
3063
- _vm._v(
3064
- "\n " +
3065
- _vm._s(
3066
- _vm.tips === true
3067
- ? ""
3068
- : _vm.tips > 99
3069
- ? "99+"
3070
- : _vm.tips
3071
- ) +
3072
- "\n "
3073
- ),
3074
- ]
3075
- )
3076
- : _vm._e(),
3077
- ],
3078
- ],
3079
- 2
3080
- )
3081
- }
3082
- var staticRenderFns = []
3083
- render._withStripped = true
3084
-
3085
-
3086
- // CONCATENATED MODULE: ./packages/menu/src/menu-item.vue?vue&type=template&id=133351e8&
3087
-
3088
- // EXTERNAL MODULE: ./packages/menu/src/menu-mixin.js
3089
- var menu_mixin = __webpack_require__(76);
3090
-
3091
- // EXTERNAL MODULE: external "eoss/lib/tooltip"
3092
- var tooltip_ = __webpack_require__(37);
3093
- var tooltip_default = /*#__PURE__*/__webpack_require__.n(tooltip_);
3094
-
3095
- // EXTERNAL MODULE: ./src/mixins/emitter.js
3096
- var emitter = __webpack_require__(10);
2836
+ // EXTERNAL MODULE: ./src/mixins/emitter.js
2837
+ var emitter = __webpack_require__(10);
3097
2838
 
3098
2839
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu-item.vue?vue&type=script&lang=js&
3099
2840
  //
@@ -3173,136 +2914,395 @@ var emitter = __webpack_require__(10);
3173
2914
 
3174
2915
 
3175
2916
 
3176
- /**
3177
- * 菜单项组件
3178
- * 功能说明:提供菜单的子项功能,支持路由跳转、自定义图标和样式等
3179
- * 适用场景:在导航菜单中创建可点击的菜单项
3180
- * 支持功能:
3181
- * - 路由跳转
3182
- * - 自定义图标和样式
3183
- * - 菜单提示
3184
- * - 禁用状态
3185
- */
3186
- /* harmony default export */ var menu_itemvue_type_script_lang_js_ = ({
3187
- name: 'EsMenuItem',
2917
+ /**
2918
+ * 菜单项组件
2919
+ * 功能说明:提供菜单的子项功能,支持路由跳转、自定义图标和样式等
2920
+ * 适用场景:在导航菜单中创建可点击的菜单项
2921
+ * 支持功能:
2922
+ * - 路由跳转
2923
+ * - 自定义图标和样式
2924
+ * - 菜单提示
2925
+ * - 禁用状态
2926
+ */
2927
+ /* harmony default export */ var menu_itemvue_type_script_lang_js_ = ({
2928
+ name: 'EsMenuItem',
2929
+
2930
+ componentName: 'EsMenuItem',
2931
+
2932
+ mixins: [menu_mixin["a" /* default */], emitter["a" /* default */]],
2933
+
2934
+ components: { EsTooltip: tooltip_default.a },
2935
+
2936
+ props: {
2937
+ text: String,
2938
+ index: {
2939
+ default: null,
2940
+ validator: function validator(val) {
2941
+ return typeof val === 'string' || val === null;
2942
+ }
2943
+ },
2944
+ route: [String, Object],
2945
+ disabled: Boolean,
2946
+ paddingLeft: {
2947
+ type: Number,
2948
+ default: 12
2949
+ },
2950
+ icon: String,
2951
+ iconColor: Object,
2952
+ node: Object,
2953
+ tips: [String, Number, Boolean]
2954
+ },
2955
+ data: function data() {
2956
+ return {
2957
+ isHovering: false
2958
+ };
2959
+ },
2960
+
2961
+ computed: {
2962
+ collapse: function collapse() {
2963
+ return this.rootMenu.collapse;
2964
+ },
2965
+ active: function active() {
2966
+ return this.index === this.rootMenu.activeIndex;
2967
+ },
2968
+ hoverBackground: function hoverBackground() {
2969
+ return this.rootMenu.hoverBackground;
2970
+ },
2971
+ backgroundColor: function backgroundColor() {
2972
+ return this.rootMenu.backgroundColor || '';
2973
+ },
2974
+ activeTextColor: function activeTextColor() {
2975
+ return this.rootMenu.activeTextColor || '';
2976
+ },
2977
+ textColor: function textColor() {
2978
+ return this.rootMenu.textColor || '';
2979
+ },
2980
+ mode: function mode() {
2981
+ return this.rootMenu.mode;
2982
+ },
2983
+ itemStyle: function itemStyle() {
2984
+ var style = {
2985
+ color: this.active ? this.activeTextColor : this.textColor
2986
+ };
2987
+ if (this.mode === 'horizontal' && !this.isNested) {
2988
+ style.borderBottomColor = this.active ? this.rootMenu.activeTextColor ? this.activeTextColor : '' : 'transparent';
2989
+ }
2990
+ return style;
2991
+ },
2992
+ isNested: function isNested() {
2993
+ return this.parentMenu !== this.rootMenu;
2994
+ },
2995
+ iconClass: function iconClass() {
2996
+ return this.icon || this.rootMenu.icon;
2997
+ }
2998
+ },
2999
+ methods: {
3000
+ handleClick: function handleClick() {
3001
+ if (!this.disabled) {
3002
+ this.dispatch('EsMenu', 'item-click', this);
3003
+ this.$emit('click', this);
3004
+ }
3005
+ if (this.$attrs.data && this.$attrs.data.extendData && this.$attrs.data.extendData.businessStatus == 0 && // eslint-disable-line eqeqeq
3006
+ this.$attrs.data.extendData.businessWarnMsg) {
3007
+ this.$alert(this.$attrs.data.extendData.businessWarnMsg, '提示', {
3008
+ type: 'warning'
3009
+ });
3010
+ }
3011
+ }
3012
+ },
3013
+ mounted: function mounted() {
3014
+ this.parentMenu.addItem(this);
3015
+ this.rootMenu.addItem(this);
3016
+ },
3017
+ beforeDestroy: function beforeDestroy() {
3018
+ this.parentMenu.removeItem(this);
3019
+ this.rootMenu.removeItem(this);
3020
+ }
3021
+ });
3022
+ // CONCATENATED MODULE: ./packages/menu/src/menu-item.vue?vue&type=script&lang=js&
3023
+ /* harmony default export */ var src_menu_itemvue_type_script_lang_js_ = (menu_itemvue_type_script_lang_js_);
3024
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
3025
+ var componentNormalizer = __webpack_require__(3);
3026
+
3027
+ // CONCATENATED MODULE: ./packages/menu/src/menu-item.vue
3028
+
3029
+
3030
+
3031
+
3032
+
3033
+ /* normalize component */
3034
+
3035
+ var component = Object(componentNormalizer["a" /* default */])(
3036
+ src_menu_itemvue_type_script_lang_js_,
3037
+ render,
3038
+ staticRenderFns,
3039
+ false,
3040
+ null,
3041
+ null,
3042
+ null
3043
+
3044
+ )
3045
+
3046
+ /* harmony default export */ var menu_item = __webpack_exports__["a"] = (component.exports);
3047
+
3048
+ /***/ }),
3049
+
3050
+ /***/ 6:
3051
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3052
+
3053
+ "use strict";
3054
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
3055
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
3056
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
3057
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
3058
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
3059
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
3060
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
3061
+ /* unused harmony export setStyle */
3062
+ /* unused harmony export isScroll */
3063
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
3064
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
3065
+ /* unused harmony export insertAfter */
3066
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
3067
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
3068
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
3069
+
3070
+ /* istanbul ignore next */
3071
+
3072
+
3073
+
3074
+ var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
3075
+ var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
3076
+ var MOZ_HACK_REGEXP = /^moz([A-Z])/;
3077
+ var ieVersion = isServer ? 0 : Number(document.documentMode);
3078
+
3079
+ /* istanbul ignore next */
3080
+ var trim = function trim(string) {
3081
+ return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
3082
+ };
3083
+ /* istanbul ignore next */
3084
+ var camelCase = function camelCase(name) {
3085
+ return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
3086
+ return offset ? letter.toUpperCase() : letter;
3087
+ }).replace(MOZ_HACK_REGEXP, 'Moz$1');
3088
+ };
3089
+
3090
+ /* istanbul ignore next */
3091
+ var on = function () {
3092
+ if (!isServer && document.addEventListener) {
3093
+ return function (element, event, handler) {
3094
+ if (element && event && handler) {
3095
+ element.addEventListener(event, handler, false);
3096
+ }
3097
+ };
3098
+ } else {
3099
+ return function (element, event, handler) {
3100
+ if (element && event && handler) {
3101
+ element.attachEvent('on' + event, handler);
3102
+ }
3103
+ };
3104
+ }
3105
+ }();
3106
+
3107
+ /* istanbul ignore next */
3108
+ var off = function () {
3109
+ if (!isServer && document.removeEventListener) {
3110
+ return function (element, event, handler) {
3111
+ if (element && event) {
3112
+ element.removeEventListener(event, handler, false);
3113
+ }
3114
+ };
3115
+ } else {
3116
+ return function (element, event, handler) {
3117
+ if (element && event) {
3118
+ element.detachEvent('on' + event, handler);
3119
+ }
3120
+ };
3121
+ }
3122
+ }();
3123
+
3124
+ /* istanbul ignore next */
3125
+ var once = function once(el, event, fn) {
3126
+ var listener = function listener() {
3127
+ if (fn) {
3128
+ fn.apply(this, arguments);
3129
+ }
3130
+ off(el, event, listener);
3131
+ };
3132
+ on(el, event, listener);
3133
+ };
3134
+
3135
+ /* istanbul ignore next */
3136
+ function hasClass(el, cls) {
3137
+ if (!el || !cls) return false;
3138
+ if (cls.indexOf(' ') !== -1) {
3139
+ throw new Error('className should not contain space.');
3140
+ }
3141
+ if (el.classList) {
3142
+ return el.classList.contains(cls);
3143
+ } else {
3144
+ return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
3145
+ }
3146
+ }
3147
+
3148
+ /* istanbul ignore next */
3149
+ function addClass(el, cls) {
3150
+ if (!el) return;
3151
+ var curClass = el.className;
3152
+ var classes = (cls || '').split(' ');
3153
+
3154
+ for (var i = 0, j = classes.length; i < j; i++) {
3155
+ var clsName = classes[i];
3156
+ if (!clsName) continue;
3157
+
3158
+ if (el.classList) {
3159
+ el.classList.add(clsName);
3160
+ } else if (!hasClass(el, clsName)) {
3161
+ curClass += ' ' + clsName;
3162
+ }
3163
+ }
3164
+ if (!el.classList) {
3165
+ el.className = curClass;
3166
+ }
3167
+ }
3168
+
3169
+ /* istanbul ignore next */
3170
+ function removeClass(el, cls) {
3171
+ if (!el || !cls) return;
3172
+ var classes = cls.split(' ');
3173
+ var curClass = ' ' + el.className + ' ';
3188
3174
 
3189
- componentName: 'EsMenuItem',
3175
+ for (var i = 0, j = classes.length; i < j; i++) {
3176
+ var clsName = classes[i];
3177
+ if (!clsName) continue;
3190
3178
 
3191
- mixins: [menu_mixin["a" /* default */], emitter["a" /* default */]],
3179
+ if (el.classList) {
3180
+ el.classList.remove(clsName);
3181
+ } else if (hasClass(el, clsName)) {
3182
+ curClass = curClass.replace(' ' + clsName + ' ', ' ');
3183
+ }
3184
+ }
3185
+ if (!el.classList) {
3186
+ el.className = trim(curClass);
3187
+ }
3188
+ }
3192
3189
 
3193
- components: { EsTooltip: tooltip_default.a },
3190
+ /* istanbul ignore next */
3191
+ var getStyle = ieVersion < 9 ? function (element, styleName) {
3192
+ if (isServer) return;
3193
+ if (!element || !styleName) return null;
3194
+ styleName = camelCase(styleName);
3195
+ if (styleName === 'float') {
3196
+ styleName = 'styleFloat';
3197
+ }
3198
+ try {
3199
+ switch (styleName) {
3200
+ case 'opacity':
3201
+ try {
3202
+ return element.filters.item('alpha').opacity / 100;
3203
+ } catch (e) {
3204
+ return 1.0;
3205
+ }
3206
+ default:
3207
+ return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
3208
+ }
3209
+ } catch (e) {
3210
+ return element.style[styleName];
3211
+ }
3212
+ } : function (element, styleName) {
3213
+ if (isServer) return;
3214
+ if (!element || !styleName) return null;
3215
+ styleName = camelCase(styleName);
3216
+ if (styleName === 'float') {
3217
+ styleName = 'cssFloat';
3218
+ }
3219
+ try {
3220
+ var computed = document.defaultView.getComputedStyle(element, '');
3221
+ return element.style[styleName] || computed ? computed[styleName] : null;
3222
+ } catch (e) {
3223
+ return element.style[styleName];
3224
+ }
3225
+ };
3194
3226
 
3195
- props: {
3196
- text: String,
3197
- index: {
3198
- default: null,
3199
- validator: function validator(val) {
3200
- return typeof val === 'string' || val === null;
3201
- }
3202
- },
3203
- route: [String, Object],
3204
- disabled: Boolean,
3205
- paddingLeft: {
3206
- type: Number,
3207
- default: 12
3208
- },
3209
- icon: String,
3210
- iconColor: Object,
3211
- node: Object,
3212
- tips: [String, Number, Boolean]
3213
- },
3214
- data: function data() {
3215
- return {
3216
- isHovering: false
3217
- };
3218
- },
3227
+ /* istanbul ignore next */
3228
+ function setStyle(element, styleName, value) {
3229
+ if (!element || !styleName) return;
3219
3230
 
3220
- computed: {
3221
- collapse: function collapse() {
3222
- return this.rootMenu.collapse;
3223
- },
3224
- active: function active() {
3225
- return this.index === this.rootMenu.activeIndex;
3226
- },
3227
- hoverBackground: function hoverBackground() {
3228
- return this.rootMenu.hoverBackground;
3229
- },
3230
- backgroundColor: function backgroundColor() {
3231
- return this.rootMenu.backgroundColor || '';
3232
- },
3233
- activeTextColor: function activeTextColor() {
3234
- return this.rootMenu.activeTextColor || '';
3235
- },
3236
- textColor: function textColor() {
3237
- return this.rootMenu.textColor || '';
3238
- },
3239
- mode: function mode() {
3240
- return this.rootMenu.mode;
3241
- },
3242
- itemStyle: function itemStyle() {
3243
- var style = {
3244
- color: this.active ? this.activeTextColor : this.textColor
3245
- };
3246
- if (this.mode === 'horizontal' && !this.isNested) {
3247
- style.borderBottomColor = this.active ? this.rootMenu.activeTextColor ? this.activeTextColor : '' : 'transparent';
3231
+ if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
3232
+ for (var prop in styleName) {
3233
+ if (styleName.hasOwnProperty(prop)) {
3234
+ setStyle(element, prop, styleName[prop]);
3248
3235
  }
3249
- return style;
3250
- },
3251
- isNested: function isNested() {
3252
- return this.parentMenu !== this.rootMenu;
3253
- },
3254
- iconClass: function iconClass() {
3255
- return this.icon || this.rootMenu.icon;
3256
3236
  }
3257
- },
3258
- methods: {
3259
- handleClick: function handleClick() {
3260
- if (!this.disabled) {
3261
- this.dispatch('EsMenu', 'item-click', this);
3262
- this.$emit('click', this);
3263
- }
3264
- if (this.$attrs.data && this.$attrs.data.extendData && this.$attrs.data.extendData.businessStatus == 0 && // eslint-disable-line eqeqeq
3265
- this.$attrs.data.extendData.businessWarnMsg) {
3266
- this.$alert(this.$attrs.data.extendData.businessWarnMsg, '提示', {
3267
- type: 'warning'
3268
- });
3269
- }
3237
+ } else {
3238
+ styleName = camelCase(styleName);
3239
+ if (styleName === 'opacity' && ieVersion < 9) {
3240
+ element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
3241
+ } else {
3242
+ element.style[styleName] = value;
3270
3243
  }
3271
- },
3272
- mounted: function mounted() {
3273
- this.parentMenu.addItem(this);
3274
- this.rootMenu.addItem(this);
3275
- },
3276
- beforeDestroy: function beforeDestroy() {
3277
- this.parentMenu.removeItem(this);
3278
- this.rootMenu.removeItem(this);
3279
3244
  }
3280
- });
3281
- // CONCATENATED MODULE: ./packages/menu/src/menu-item.vue?vue&type=script&lang=js&
3282
- /* harmony default export */ var src_menu_itemvue_type_script_lang_js_ = (menu_itemvue_type_script_lang_js_);
3283
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
3284
- var componentNormalizer = __webpack_require__(3);
3245
+ }
3285
3246
 
3286
- // CONCATENATED MODULE: ./packages/menu/src/menu-item.vue
3247
+ var isScroll = function isScroll(el, vertical) {
3248
+ if (isServer) return;
3287
3249
 
3250
+ var determinedDirection = vertical !== null || vertical !== undefined;
3251
+ var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
3288
3252
 
3253
+ return overflow.match(/(scroll|auto)/);
3254
+ };
3289
3255
 
3256
+ var getScrollContainer = function getScrollContainer(el, vertical) {
3257
+ if (isServer) return;
3290
3258
 
3259
+ var parent = el;
3260
+ while (parent) {
3261
+ if ([window, document, document.documentElement].includes(parent)) {
3262
+ return window;
3263
+ }
3264
+ if (isScroll(parent, vertical)) {
3265
+ return parent;
3266
+ }
3267
+ parent = parent.parentNode;
3268
+ }
3291
3269
 
3292
- /* normalize component */
3270
+ return parent;
3271
+ };
3293
3272
 
3294
- var component = Object(componentNormalizer["a" /* default */])(
3295
- src_menu_itemvue_type_script_lang_js_,
3296
- render,
3297
- staticRenderFns,
3298
- false,
3299
- null,
3300
- null,
3301
- null
3302
-
3303
- )
3273
+ var isInContainer = function isInContainer(el, container) {
3274
+ if (isServer || !el || !container) return false;
3304
3275
 
3305
- /* harmony default export */ var menu_item = __webpack_exports__["a"] = (component.exports);
3276
+ var elRect = el.getBoundingClientRect();
3277
+ var containerRect = void 0;
3278
+
3279
+ if ([window, document, document.documentElement, null, undefined].includes(container)) {
3280
+ containerRect = {
3281
+ top: 0,
3282
+ right: window.innerWidth,
3283
+ bottom: window.innerHeight,
3284
+ left: 0
3285
+ };
3286
+ } else {
3287
+ containerRect = container.getBoundingClientRect();
3288
+ }
3289
+
3290
+ return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
3291
+ };
3292
+
3293
+ /**
3294
+ * 在元素前插入元素
3295
+ * @param {HTMLElement} newEl 新DOM元素
3296
+ * @param {HTMLElement} targetEl 在指定目标DOM元素前插入
3297
+ */
3298
+ function insertAfter(newEl, targetEl) {
3299
+ var parentEl = targetEl.parentNode;
3300
+ if (parentEl.lastChild === targetEl) {
3301
+ parentEl.appendChild(newEl);
3302
+ } else {
3303
+ parentEl.insertBefore(newEl, targetEl.nextSibling);
3304
+ }
3305
+ }
3306
3306
 
3307
3307
  /***/ }),
3308
3308
 
@@ -3697,7 +3697,7 @@ var component = Object(componentNormalizer["a" /* default */])(
3697
3697
 
3698
3698
  /***/ }),
3699
3699
 
3700
- /***/ 91:
3700
+ /***/ 92:
3701
3701
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3702
3702
 
3703
3703
  "use strict";