eoss-ui 0.5.45 → 0.5.47

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 (127) hide show
  1. package/lib/button.js +137 -144
  2. package/lib/calendar.js +769 -0
  3. package/lib/cascader.js +2 -2
  4. package/lib/checkbox-group.js +4 -2
  5. package/lib/clients.js +2 -2
  6. package/lib/data-table-form.js +36 -13
  7. package/lib/data-table.js +39 -37
  8. package/lib/date-picker.js +2 -2
  9. package/lib/dialog.js +10 -13
  10. package/lib/enterprise.js +2 -2
  11. package/lib/eoss-ui.common.js +1265 -721
  12. package/lib/error-page.js +2 -2
  13. package/lib/flow-group.js +9 -21
  14. package/lib/flow-list.js +2 -2
  15. package/lib/form.js +215 -231
  16. package/lib/handle-user.js +5 -11
  17. package/lib/handler.js +2 -2
  18. package/lib/icons.js +2 -2
  19. package/lib/index.js +1 -1
  20. package/lib/input-number.js +2 -2
  21. package/lib/input.js +2 -2
  22. package/lib/label.js +2 -2
  23. package/lib/menu.js +2 -2
  24. package/lib/nav.js +5 -5
  25. package/lib/notify.js +2 -2
  26. package/lib/page.js +2 -2
  27. package/lib/pagination.js +2 -2
  28. package/lib/player.js +2 -2
  29. package/lib/qr-code.js +2 -2
  30. package/lib/radio-group.js +2 -2
  31. package/lib/retrial-auth.js +2 -2
  32. package/lib/select-ganged.js +2 -2
  33. package/lib/select.js +2 -2
  34. package/lib/selector.js +2 -2
  35. package/lib/sizer.js +9 -9
  36. package/lib/steps.js +2 -2
  37. package/lib/switch.js +2 -2
  38. package/lib/table-form.js +2 -2
  39. package/lib/tabs-panel.js +2 -2
  40. package/lib/tabs.js +2 -2
  41. package/lib/theme-chalk/cascader.css +1 -0
  42. package/lib/theme-chalk/data-table-form.css +1 -1
  43. package/lib/theme-chalk/index.css +1 -1
  44. package/lib/theme-chalk/toolbar.css +1 -1
  45. package/lib/tips.js +2 -2
  46. package/lib/toolbar.js +22 -37
  47. package/lib/tree-group.js +2 -2
  48. package/lib/tree.js +2 -2
  49. package/lib/wujie.js +2 -2
  50. package/lib/wxlogin.js +2 -2
  51. package/package.json +1 -1
  52. package/packages/button/src/main.vue +2 -9
  53. package/packages/calendar/index.js +5 -0
  54. package/packages/calendar/src/main.vue +386 -0
  55. package/packages/data-table/src/main.vue +40 -28
  56. package/packages/data-table-form/src/main.vue +30 -23
  57. package/packages/data-table-form/src/table.vue +16 -3
  58. package/packages/dialog/src/main.vue +5 -9
  59. package/packages/flow-group/src/main.vue +5 -17
  60. package/packages/handle-user/src/main.vue +1 -7
  61. package/packages/nav/src/main.vue +1 -1
  62. package/packages/theme-chalk/gulpfile.js +25 -0
  63. package/packages/theme-chalk/src/cascader.scss +93 -0
  64. package/packages/theme-chalk/src/data-table-form.scss +11 -0
  65. package/packages/theme-chalk/src/index.scss +2 -1
  66. package/packages/theme-chalk/src/toolbar.scss +13 -11
  67. package/packages/toolbar/src/main.vue +39 -52
  68. package/src/index.js +7 -4
  69. package/CHANGELOG.md +0 -929
  70. package/packages/theme-chalk/lib/base.css +0 -1
  71. package/packages/theme-chalk/lib/button-group.css +0 -1
  72. package/packages/theme-chalk/lib/button.css +0 -1
  73. package/packages/theme-chalk/lib/card.css +0 -1
  74. package/packages/theme-chalk/lib/checkbox-group.css +0 -1
  75. package/packages/theme-chalk/lib/clients.css +0 -1
  76. package/packages/theme-chalk/lib/data-table-form.css +0 -1
  77. package/packages/theme-chalk/lib/data-table.css +0 -1
  78. package/packages/theme-chalk/lib/date-picker.css +0 -1
  79. package/packages/theme-chalk/lib/dialog.css +0 -1
  80. package/packages/theme-chalk/lib/enterprise.css +0 -1
  81. package/packages/theme-chalk/lib/error-page.css +0 -1
  82. package/packages/theme-chalk/lib/flow-group.css +0 -1
  83. package/packages/theme-chalk/lib/flow-list.css +0 -1
  84. package/packages/theme-chalk/lib/flow.css +0 -1
  85. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  86. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  87. package/packages/theme-chalk/lib/form.css +0 -1
  88. package/packages/theme-chalk/lib/handle-user.css +0 -1
  89. package/packages/theme-chalk/lib/handler.css +0 -1
  90. package/packages/theme-chalk/lib/icon.css +0 -1
  91. package/packages/theme-chalk/lib/icons.css +0 -1
  92. package/packages/theme-chalk/lib/index.css +0 -1
  93. package/packages/theme-chalk/lib/input-number.css +0 -0
  94. package/packages/theme-chalk/lib/input.css +0 -1
  95. package/packages/theme-chalk/lib/label.css +0 -1
  96. package/packages/theme-chalk/lib/layout.css +0 -1
  97. package/packages/theme-chalk/lib/login.css +0 -1
  98. package/packages/theme-chalk/lib/main.css +0 -1
  99. package/packages/theme-chalk/lib/mainComp.css +0 -0
  100. package/packages/theme-chalk/lib/menu.css +0 -1
  101. package/packages/theme-chalk/lib/nav.css +0 -1
  102. package/packages/theme-chalk/lib/notify.css +0 -0
  103. package/packages/theme-chalk/lib/page.css +0 -1
  104. package/packages/theme-chalk/lib/pagination.css +0 -1
  105. package/packages/theme-chalk/lib/player.css +0 -1
  106. package/packages/theme-chalk/lib/qr-code.css +0 -1
  107. package/packages/theme-chalk/lib/radio-group.css +0 -1
  108. package/packages/theme-chalk/lib/retrial-auth.css +0 -1
  109. package/packages/theme-chalk/lib/select-ganged.css +0 -1
  110. package/packages/theme-chalk/lib/select.css +0 -1
  111. package/packages/theme-chalk/lib/selector-panel.css +0 -1
  112. package/packages/theme-chalk/lib/selector.css +0 -1
  113. package/packages/theme-chalk/lib/sizer.css +0 -1
  114. package/packages/theme-chalk/lib/steps.css +0 -1
  115. package/packages/theme-chalk/lib/switch.css +0 -1
  116. package/packages/theme-chalk/lib/table-form.css +0 -0
  117. package/packages/theme-chalk/lib/tabs-panel.css +0 -0
  118. package/packages/theme-chalk/lib/tabs.css +0 -1
  119. package/packages/theme-chalk/lib/tips.css +0 -1
  120. package/packages/theme-chalk/lib/toolbar.css +0 -1
  121. package/packages/theme-chalk/lib/tree-group.css +0 -1
  122. package/packages/theme-chalk/lib/tree.css +0 -1
  123. package/packages/theme-chalk/lib/upload.css +0 -1
  124. package/packages/theme-chalk/lib/wujie.css +0 -0
  125. package/packages/theme-chalk/lib/wxlogin.css +0 -1
  126. /package/{packages/theme-chalk/lib/cascader.css → lib/theme-chalk/calendar.css} +0 -0
  127. /package/packages/theme-chalk/{lib/flow-chart.css → src/calendar.scss} +0 -0
package/lib/button.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 = 69);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 70);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -3565,7 +3565,140 @@ module.exports = require("json-bigint");
3565
3565
 
3566
3566
  /***/ }),
3567
3567
 
3568
- /***/ 69:
3568
+ /***/ 7:
3569
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3570
+
3571
+ "use strict";
3572
+ /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
3573
+ /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sockjs_client__WEBPACK_IMPORTED_MODULE_0__);
3574
+ /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
3575
+ /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stompjs__WEBPACK_IMPORTED_MODULE_1__);
3576
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3577
+
3578
+
3579
+
3580
+
3581
+ var WebSocket = function () {
3582
+ // 构造函数
3583
+ function WebSocket() {
3584
+ _classCallCheck(this, WebSocket);
3585
+
3586
+ this.host = sessionStorage.getItem('wshost') || '';
3587
+ this.tryTimes = 1; // 重连次数
3588
+ this.callback = null; // 回调函数
3589
+ this.client = null; // stomp对象
3590
+ this.reconTimeout = null; // 重连延时器
3591
+ this.debug = true; // 调试
3592
+ this.interval = 20; // 重连间隔时间
3593
+ this.vm = null;
3594
+ this.nextDate = 0;
3595
+ this.connects = 1;
3596
+ this.recon = false;
3597
+ this.sendTimeout = null;
3598
+ }
3599
+
3600
+ /** socket连接 */
3601
+
3602
+
3603
+ WebSocket.prototype.connect = function connect() {
3604
+ var _this = this;
3605
+
3606
+ if (!this.client) {
3607
+ // 连接SockJS
3608
+ var socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url);
3609
+ // 获取STOMP子协议的客户端对象
3610
+ this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(socket);
3611
+ }
3612
+
3613
+ // 日志不打印
3614
+ if (!this.debug) {
3615
+ console.log(111);
3616
+ this.client.debug = function () {};
3617
+ }
3618
+
3619
+ // 向服务器发起websocket连接
3620
+ this.client.connect({}, function () {
3621
+ _this.recon = true;
3622
+ // tryTimes定义重置
3623
+ _this.connects = 1;
3624
+ // 订阅消息
3625
+ _this.subscribe();
3626
+ }, function (error) {
3627
+ var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
3628
+ if (_this.connects > 5 && diffSecond < _this.interval) {
3629
+ _this.client.disconnect();
3630
+ _this.error && _this.error(error);
3631
+ } else {
3632
+ _this.reconTimeout = setTimeout(function () {
3633
+ _this.connect();
3634
+ _this.connects++;
3635
+ }, 5000);
3636
+ }
3637
+ });
3638
+ };
3639
+ /** 订阅服务端 */
3640
+
3641
+
3642
+ WebSocket.prototype.subscribe = function subscribe() {
3643
+ var _this2 = this;
3644
+
3645
+ // 订阅服务端提供的某个topic
3646
+ this.client.subscribe(this.take, function (response) {
3647
+ if (response && (_this2.callback || _this2.success)) {
3648
+ var callback = _this2.callback || _this2.success;
3649
+ callback(JSON.parse(response.body));
3650
+ }
3651
+ });
3652
+ };
3653
+
3654
+ /** 赋值、初始化socket */
3655
+
3656
+
3657
+ WebSocket.prototype.init = function init(option, vm) {
3658
+ for (var i in option) {
3659
+ this[i] = option[i];
3660
+ }
3661
+ this.vm = vm;
3662
+ // 初始化连接
3663
+ this.connect();
3664
+ };
3665
+
3666
+ /** 发送消息 */
3667
+
3668
+
3669
+ WebSocket.prototype.send = function send(data) {
3670
+ var _this3 = this;
3671
+
3672
+ if (this.recon) {
3673
+ clearTimeout(this.sendTimeout);
3674
+ this.client.send(this.take, {}, typeof data === 'string' ? data : JSON.stringify(data));
3675
+ } else {
3676
+ this.sendTimeout = setTimeout(function () {
3677
+ _this3.send(data);
3678
+ }, 1000);
3679
+ }
3680
+ };
3681
+
3682
+ /** 销毁 */
3683
+
3684
+
3685
+ WebSocket.prototype.destroy = function destroy() {
3686
+ // 断开连接,清除定时器
3687
+ if (this.client) {
3688
+ this.client.disconnect();
3689
+ };
3690
+ this.reconTimeout && clearTimeout(this.reconTimeout);
3691
+ this.sendTimeout && clearTimeout(this.sendTimeout);
3692
+ };
3693
+
3694
+ return WebSocket;
3695
+ }();
3696
+
3697
+ /* harmony default export */ __webpack_exports__["a"] = (WebSocket);
3698
+
3699
+ /***/ }),
3700
+
3701
+ /***/ 70:
3569
3702
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3570
3703
 
3571
3704
  "use strict";
@@ -3654,15 +3787,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3654
3787
  evt.preventDefault();
3655
3788
  var width = 0;
3656
3789
  var height = 0;
3657
- var win = void 0;
3658
- try {
3659
- util["a" /* default */].win.top.document;
3660
- win = util["a" /* default */].win.top;
3661
- } catch (error) {
3662
- win = util["a" /* default */].getMyWinTop();
3663
- }
3664
- width = win.screen.availWidth - 10;
3665
- height = win.screen.availHeight - 60;
3790
+ width = util["a" /* default */].win.top.screen.availWidth - 10;
3791
+ height = util["a" /* default */].win.top.screen.availHeight - 60;
3666
3792
  var flag = true;
3667
3793
  if (this.esForm) {
3668
3794
  var params = util["a" /* default */].getParams({ url: this.link });
@@ -3905,139 +4031,6 @@ main.install = function (Vue) {
3905
4031
 
3906
4032
  /***/ }),
3907
4033
 
3908
- /***/ 7:
3909
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3910
-
3911
- "use strict";
3912
- /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
3913
- /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sockjs_client__WEBPACK_IMPORTED_MODULE_0__);
3914
- /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
3915
- /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stompjs__WEBPACK_IMPORTED_MODULE_1__);
3916
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3917
-
3918
-
3919
-
3920
-
3921
- var WebSocket = function () {
3922
- // 构造函数
3923
- function WebSocket() {
3924
- _classCallCheck(this, WebSocket);
3925
-
3926
- this.host = sessionStorage.getItem('wshost') || '';
3927
- this.tryTimes = 1; // 重连次数
3928
- this.callback = null; // 回调函数
3929
- this.client = null; // stomp对象
3930
- this.reconTimeout = null; // 重连延时器
3931
- this.debug = true; // 调试
3932
- this.interval = 20; // 重连间隔时间
3933
- this.vm = null;
3934
- this.nextDate = 0;
3935
- this.connects = 1;
3936
- this.recon = false;
3937
- this.sendTimeout = null;
3938
- }
3939
-
3940
- /** socket连接 */
3941
-
3942
-
3943
- WebSocket.prototype.connect = function connect() {
3944
- var _this = this;
3945
-
3946
- if (!this.client) {
3947
- // 连接SockJS
3948
- var socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url);
3949
- // 获取STOMP子协议的客户端对象
3950
- this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(socket);
3951
- }
3952
-
3953
- // 日志不打印
3954
- if (!this.debug) {
3955
- console.log(111);
3956
- this.client.debug = function () {};
3957
- }
3958
-
3959
- // 向服务器发起websocket连接
3960
- this.client.connect({}, function () {
3961
- _this.recon = true;
3962
- // tryTimes定义重置
3963
- _this.connects = 1;
3964
- // 订阅消息
3965
- _this.subscribe();
3966
- }, function (error) {
3967
- var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
3968
- if (_this.connects > 5 && diffSecond < _this.interval) {
3969
- _this.client.disconnect();
3970
- _this.error && _this.error(error);
3971
- } else {
3972
- _this.reconTimeout = setTimeout(function () {
3973
- _this.connect();
3974
- _this.connects++;
3975
- }, 5000);
3976
- }
3977
- });
3978
- };
3979
- /** 订阅服务端 */
3980
-
3981
-
3982
- WebSocket.prototype.subscribe = function subscribe() {
3983
- var _this2 = this;
3984
-
3985
- // 订阅服务端提供的某个topic
3986
- this.client.subscribe(this.take, function (response) {
3987
- if (response && (_this2.callback || _this2.success)) {
3988
- var callback = _this2.callback || _this2.success;
3989
- callback(JSON.parse(response.body));
3990
- }
3991
- });
3992
- };
3993
-
3994
- /** 赋值、初始化socket */
3995
-
3996
-
3997
- WebSocket.prototype.init = function init(option, vm) {
3998
- for (var i in option) {
3999
- this[i] = option[i];
4000
- }
4001
- this.vm = vm;
4002
- // 初始化连接
4003
- this.connect();
4004
- };
4005
-
4006
- /** 发送消息 */
4007
-
4008
-
4009
- WebSocket.prototype.send = function send(data) {
4010
- var _this3 = this;
4011
-
4012
- if (this.recon) {
4013
- clearTimeout(this.sendTimeout);
4014
- this.client.send(this.take, {}, typeof data === 'string' ? data : JSON.stringify(data));
4015
- } else {
4016
- this.sendTimeout = setTimeout(function () {
4017
- _this3.send(data);
4018
- }, 1000);
4019
- }
4020
- };
4021
-
4022
- /** 销毁 */
4023
-
4024
-
4025
- WebSocket.prototype.destroy = function destroy() {
4026
- // 断开连接,清除定时器
4027
- if (this.client) {
4028
- this.client.disconnect();
4029
- };
4030
- this.reconTimeout && clearTimeout(this.reconTimeout);
4031
- this.sendTimeout && clearTimeout(this.sendTimeout);
4032
- };
4033
-
4034
- return WebSocket;
4035
- }();
4036
-
4037
- /* harmony default export */ __webpack_exports__["a"] = (WebSocket);
4038
-
4039
- /***/ }),
4040
-
4041
4034
  /***/ 8:
4042
4035
  /***/ (function(module, exports) {
4043
4036