eoss-ui 0.6.0 → 0.6.11

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 (119) hide show
  1. package/lib/button-group.js +210 -198
  2. package/lib/button.js +2 -2
  3. package/lib/calendar.js +2 -2
  4. package/lib/card.js +2 -2
  5. package/lib/cascader.js +2 -2
  6. package/lib/checkbox-group.js +12 -30
  7. package/lib/clients.js +2 -2
  8. package/lib/data-table-form.js +2 -4
  9. package/lib/data-table.js +21 -36
  10. package/lib/date-picker.js +2 -2
  11. package/lib/dialog.js +16 -33
  12. package/lib/enterprise.js +2 -2
  13. package/lib/eoss-ui.common.js +1499 -938
  14. package/lib/error-page.js +2 -2
  15. package/lib/flow-group.js +2 -2
  16. package/lib/flow-list.js +4 -4
  17. package/lib/flow.js +476 -240
  18. package/lib/form.js +2 -4
  19. package/lib/handle-user.js +2 -2
  20. package/lib/handler.js +12 -12
  21. package/lib/icon.js +9 -9
  22. package/lib/icons.js +5 -5
  23. package/lib/index.js +1 -1
  24. package/lib/input-number.js +2 -2
  25. package/lib/input.js +2 -2
  26. package/lib/label.js +2 -2
  27. package/lib/layout.js +4 -4
  28. package/lib/login.js +728 -489
  29. package/lib/main.js +193 -114
  30. package/lib/menu.js +2 -2
  31. package/lib/nav.js +2 -2
  32. package/lib/notify.js +2 -2
  33. package/lib/page.js +2 -2
  34. package/lib/pagination.js +2 -2
  35. package/lib/player.js +11 -11
  36. package/lib/qr-code.js +4 -4
  37. package/lib/radio-group.js +10 -30
  38. package/lib/retrial-auth.js +9 -9
  39. package/lib/select-ganged.js +9 -9
  40. package/lib/select.js +8 -28
  41. package/lib/selector-panel.js +6 -8
  42. package/lib/selector.js +11 -11
  43. package/lib/sizer.js +2 -2
  44. package/lib/steps.js +2 -2
  45. package/lib/switch.js +9 -9
  46. package/lib/table-form.js +2 -2
  47. package/lib/tabs-panel.js +2 -2
  48. package/lib/tabs.js +2 -2
  49. package/lib/theme-chalk/base.css +1 -1
  50. package/lib/theme-chalk/flow.css +1 -1
  51. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  52. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  53. package/lib/theme-chalk/icon.css +1 -1
  54. package/lib/theme-chalk/icons.css +1 -1
  55. package/lib/theme-chalk/index.css +1 -1
  56. package/lib/theme-chalk/login.css +1 -1
  57. package/lib/theme-chalk/main.css +1 -1
  58. package/lib/theme-chalk/menu.css +1 -1
  59. package/lib/theme-chalk/simplicity.css +1 -1
  60. package/lib/theme-chalk/sizer.css +1 -1
  61. package/lib/theme-chalk/upload.css +1 -1
  62. package/lib/tips.js +2 -2
  63. package/lib/toolbar.js +2 -2
  64. package/lib/tree-group.js +6 -5
  65. package/lib/tree.js +2 -2
  66. package/lib/upload.js +6 -8
  67. package/lib/wujie.js +145 -145
  68. package/lib/wxlogin.js +145 -145
  69. package/package.json +2 -2
  70. package/packages/.DS_Store +0 -0
  71. package/packages/checkbox-group/.DS_Store +0 -0
  72. package/packages/checkbox-group/src/main.vue +10 -7
  73. package/packages/data-table/src/main.vue +23 -15
  74. package/packages/dialog/.DS_Store +0 -0
  75. package/packages/dialog/src/main.vue +13 -8
  76. package/packages/flow/src/component/SendMsg.vue +7 -1
  77. package/packages/flow/src/component/taskUnionExamine.vue +19 -1
  78. package/packages/flow/src/main.vue +70 -48
  79. package/packages/flow/src/processForm.vue +21 -5
  80. package/packages/flow/src/processReject.vue +31 -14
  81. package/packages/flow/src/startTaskRead.vue +22 -8
  82. package/packages/handler/src/main.vue +1 -1
  83. package/packages/icons/src/icon.json +1 -1
  84. package/packages/login/.DS_Store +0 -0
  85. package/packages/login/src/main.vue +211 -115
  86. package/packages/main/.DS_Store +0 -0
  87. package/packages/main/src/.DS_Store +0 -0
  88. package/packages/main/src/default/index.vue +2 -10
  89. package/packages/main/src/default/message.vue +13 -1
  90. package/packages/main/src/default/notice.vue +16 -4
  91. package/packages/main/src/main.vue +41 -13
  92. package/packages/main/src/simplicity/index.vue +11 -17
  93. package/packages/main/src/simplicity/message.vue +14 -1
  94. package/packages/main/src/simplicity/notice.vue +13 -1
  95. package/packages/radio-group/src/main.vue +10 -7
  96. package/packages/select/src/main.vue +10 -7
  97. package/packages/theme-chalk/lib/base.css +1 -1
  98. package/packages/theme-chalk/lib/flow.css +1 -1
  99. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  100. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  101. package/packages/theme-chalk/lib/icon.css +1 -1
  102. package/packages/theme-chalk/lib/icons.css +1 -1
  103. package/packages/theme-chalk/lib/index.css +1 -1
  104. package/packages/theme-chalk/lib/login.css +1 -1
  105. package/packages/theme-chalk/lib/main.css +1 -1
  106. package/packages/theme-chalk/lib/menu.css +1 -1
  107. package/packages/theme-chalk/lib/simplicity.css +1 -1
  108. package/packages/theme-chalk/lib/sizer.css +1 -1
  109. package/packages/theme-chalk/lib/upload.css +1 -1
  110. package/packages/theme-chalk/src/.DS_Store +0 -0
  111. package/packages/theme-chalk/src/common/var.scss +3 -1
  112. package/packages/theme-chalk/src/flow.scss +12 -0
  113. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  114. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  115. package/packages/theme-chalk/src/icon.scss +16 -0
  116. package/packages/theme-chalk/src/icons.scss +1 -1
  117. package/packages/theme-chalk/src/login.scss +609 -760
  118. package/packages/tree-group/src/main.vue +5 -1
  119. package/src/index.js +1 -1
package/lib/tips.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 = 66);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 64);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -3775,7 +3775,7 @@ module.exports = require("json-bigint");
3775
3775
 
3776
3776
  /***/ }),
3777
3777
 
3778
- /***/ 66:
3778
+ /***/ 64:
3779
3779
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3780
3780
 
3781
3781
  "use strict";
package/lib/toolbar.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 = 82);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 80);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -192,7 +192,7 @@ function normalizeComponent(
192
192
 
193
193
  /***/ }),
194
194
 
195
- /***/ 82:
195
+ /***/ 80:
196
196
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
197
197
 
198
198
  "use strict";
package/lib/tree-group.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 = 68);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 66);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -3768,14 +3768,14 @@ module.exports = require("json-bigint");
3768
3768
 
3769
3769
  /***/ }),
3770
3770
 
3771
- /***/ 68:
3771
+ /***/ 66:
3772
3772
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3773
3773
 
3774
3774
  "use strict";
3775
3775
  // ESM COMPAT FLAG
3776
3776
  __webpack_require__.r(__webpack_exports__);
3777
3777
 
3778
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree-group/src/main.vue?vue&type=template&id=90d6042e&
3778
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree-group/src/main.vue?vue&type=template&id=49489bf3&
3779
3779
  var render = function () {
3780
3780
  var _vm = this
3781
3781
  var _h = _vm.$createElement
@@ -4148,7 +4148,7 @@ var staticRenderFns = []
4148
4148
  render._withStripped = true
4149
4149
 
4150
4150
 
4151
- // CONCATENATED MODULE: ./packages/tree-group/src/main.vue?vue&type=template&id=90d6042e&
4151
+ // CONCATENATED MODULE: ./packages/tree-group/src/main.vue?vue&type=template&id=49489bf3&
4152
4152
 
4153
4153
  // EXTERNAL MODULE: ./src/utils/util.js
4154
4154
  var util = __webpack_require__(0);
@@ -4601,7 +4601,8 @@ var systemMode = util["a" /* default */].win.top.systemMode || util["a" /* defau
4601
4601
  }
4602
4602
  if (tree) {
4603
4603
  var ref = this.tabs && this.tabs.length ? this.tabs[Number(this.active)].ref ? this.tabs[Number(this.active)].ref : 'groupTree' + this.active : 'groupTree';
4604
- this.$refs[ref] && this.$refs[ref].getTreeData();
4604
+ var _tree = this.$refs[ref] && this.$refs[ref][0] ? this.$refs[ref][0] : this.$refs[ref];
4605
+ _tree && _tree.getTreeData();
4605
4606
  }
4606
4607
  },
4607
4608
 
package/lib/tree.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 = 67);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 65);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -3775,7 +3775,7 @@ module.exports = require("json-bigint");
3775
3775
 
3776
3776
  /***/ }),
3777
3777
 
3778
- /***/ 67:
3778
+ /***/ 65:
3779
3779
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3780
3780
 
3781
3781
  "use strict";
package/lib/upload.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 = 37);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 35);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ([
@@ -3957,14 +3957,14 @@ window.__store = store;
3957
3957
  /* 21 */,
3958
3958
  /* 22 */,
3959
3959
  /* 23 */,
3960
- /* 24 */,
3961
- /* 25 */,
3962
- /* 26 */
3960
+ /* 24 */
3963
3961
  /***/ (function(module, exports) {
3964
3962
 
3965
3963
  module.exports = require("js-base64");
3966
3964
 
3967
3965
  /***/ }),
3966
+ /* 25 */,
3967
+ /* 26 */,
3968
3968
  /* 27 */,
3969
3969
  /* 28 */,
3970
3970
  /* 29 */,
@@ -3973,9 +3973,7 @@ module.exports = require("js-base64");
3973
3973
  /* 32 */,
3974
3974
  /* 33 */,
3975
3975
  /* 34 */,
3976
- /* 35 */,
3977
- /* 36 */,
3978
- /* 37 */
3976
+ /* 35 */
3979
3977
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3980
3978
 
3981
3979
  "use strict";
@@ -4398,7 +4396,7 @@ var util = __webpack_require__(0);
4398
4396
  var store = __webpack_require__(12);
4399
4397
 
4400
4398
  // EXTERNAL MODULE: external "js-base64"
4401
- var external_js_base64_ = __webpack_require__(26);
4399
+ var external_js_base64_ = __webpack_require__(24);
4402
4400
 
4403
4401
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=script&lang=js&
4404
4402
  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; };
package/lib/wujie.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 = 70);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 68);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -3768,150 +3768,7 @@ module.exports = require("json-bigint");
3768
3768
 
3769
3769
  /***/ }),
3770
3770
 
3771
- /***/ 7:
3772
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3773
-
3774
- "use strict";
3775
- /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
3776
- /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sockjs_client__WEBPACK_IMPORTED_MODULE_0__);
3777
- /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
3778
- /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stompjs__WEBPACK_IMPORTED_MODULE_1__);
3779
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3780
-
3781
-
3782
-
3783
-
3784
- var WebSocket = function () {
3785
- // 构造函数
3786
- function WebSocket() {
3787
- _classCallCheck(this, WebSocket);
3788
-
3789
- this.host = sessionStorage.getItem('wshost') || '';
3790
- this.tryTimes = 1; // 重连次数
3791
- this.callback = null; // 回调函数
3792
- this.client = null; // stomp对象
3793
- this.reconTimeout = null; // 重连延时器
3794
- this.debug = true; // 调试
3795
- this.interval = 20; // 重连间隔时间
3796
- this.vm = null;
3797
- this.nextDate = 0;
3798
- this.connects = 1;
3799
- this.recon = false;
3800
- this.sendTimeout = null;
3801
- this.socket = null;
3802
- this.subscription = null;
3803
- }
3804
-
3805
- /** socket连接 */
3806
-
3807
-
3808
- WebSocket.prototype.connect = function connect() {
3809
- var _this = this;
3810
-
3811
- if (!this.client) {
3812
- // 连接SockJS
3813
- this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
3814
- this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
3815
- }
3816
-
3817
- // 日志不打印
3818
- if (!this.debug) {
3819
- this.client.debug = function () {};
3820
- }
3821
-
3822
- // 向服务器发起websocket连接
3823
- this.client.connect({}, function () {
3824
- _this.recon = true;
3825
- // tryTimes定义重置
3826
- _this.connects = 1;
3827
- // 订阅消息
3828
- _this.subscribe();
3829
- }, function (error) {
3830
- _this.unsubscribe();
3831
- _this.client = null;
3832
- var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
3833
- if (_this.connects > 5 && diffSecond < _this.interval) {
3834
- _this.error && _this.error(error);
3835
- } else {
3836
- _this.reconTimeout = setTimeout(function () {
3837
- _this.connect();
3838
- _this.connects++;
3839
- }, 5000);
3840
- }
3841
- });
3842
- }; // 清除订阅
3843
-
3844
-
3845
- WebSocket.prototype.unsubscribe = function unsubscribe() {
3846
- if (this.subscription) {
3847
- this.subscription.unsubscribe();
3848
- this.subscription = null;
3849
- }
3850
- };
3851
- /** 订阅服务端 */
3852
-
3853
-
3854
- WebSocket.prototype.subscribe = function subscribe() {
3855
- var _this2 = this;
3856
-
3857
- // 订阅服务端提供的某个topic
3858
- this.subscription = this.client.subscribe(this.take, function (response) {
3859
- if (response && (_this2.callback || _this2.success)) {
3860
- var callback = _this2.callback || _this2.success;
3861
- callback(JSON.parse(response.body));
3862
- }
3863
- });
3864
- };
3865
-
3866
- /** 赋值、初始化socket */
3867
-
3868
-
3869
- WebSocket.prototype.init = function init(option, vm) {
3870
- for (var i in option) {
3871
- this[i] = option[i];
3872
- }
3873
- this.vm = vm;
3874
- // 初始化连接
3875
- this.connect();
3876
- };
3877
-
3878
- /** 发送消息 */
3879
-
3880
-
3881
- WebSocket.prototype.send = function send(data) {
3882
- var _this3 = this;
3883
-
3884
- if (this.recon) {
3885
- clearTimeout(this.sendTimeout);
3886
- this.client.send(this.take, {}, typeof data === 'string' ? data : JSON.stringify(data));
3887
- } else {
3888
- this.sendTimeout = setTimeout(function () {
3889
- _this3.send(data);
3890
- }, 1000);
3891
- }
3892
- };
3893
-
3894
- /** 销毁 */
3895
-
3896
-
3897
- WebSocket.prototype.destroy = function destroy() {
3898
- // 断开连接,清除定时器
3899
- this.unsubscribe();
3900
- if (this.client) {
3901
- this.client.disconnect();
3902
- };
3903
- this.reconTimeout && clearTimeout(this.reconTimeout);
3904
- this.sendTimeout && clearTimeout(this.sendTimeout);
3905
- };
3906
-
3907
- return WebSocket;
3908
- }();
3909
-
3910
- /* harmony default export */ __webpack_exports__["a"] = (WebSocket);
3911
-
3912
- /***/ }),
3913
-
3914
- /***/ 70:
3771
+ /***/ 68:
3915
3772
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3916
3773
 
3917
3774
  "use strict";
@@ -4152,6 +4009,149 @@ main.install = function (Vue) {
4152
4009
 
4153
4010
  /***/ }),
4154
4011
 
4012
+ /***/ 7:
4013
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4014
+
4015
+ "use strict";
4016
+ /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
4017
+ /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sockjs_client__WEBPACK_IMPORTED_MODULE_0__);
4018
+ /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
4019
+ /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stompjs__WEBPACK_IMPORTED_MODULE_1__);
4020
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4021
+
4022
+
4023
+
4024
+
4025
+ var WebSocket = function () {
4026
+ // 构造函数
4027
+ function WebSocket() {
4028
+ _classCallCheck(this, WebSocket);
4029
+
4030
+ this.host = sessionStorage.getItem('wshost') || '';
4031
+ this.tryTimes = 1; // 重连次数
4032
+ this.callback = null; // 回调函数
4033
+ this.client = null; // stomp对象
4034
+ this.reconTimeout = null; // 重连延时器
4035
+ this.debug = true; // 调试
4036
+ this.interval = 20; // 重连间隔时间
4037
+ this.vm = null;
4038
+ this.nextDate = 0;
4039
+ this.connects = 1;
4040
+ this.recon = false;
4041
+ this.sendTimeout = null;
4042
+ this.socket = null;
4043
+ this.subscription = null;
4044
+ }
4045
+
4046
+ /** socket连接 */
4047
+
4048
+
4049
+ WebSocket.prototype.connect = function connect() {
4050
+ var _this = this;
4051
+
4052
+ if (!this.client) {
4053
+ // 连接SockJS
4054
+ this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
4055
+ this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
4056
+ }
4057
+
4058
+ // 日志不打印
4059
+ if (!this.debug) {
4060
+ this.client.debug = function () {};
4061
+ }
4062
+
4063
+ // 向服务器发起websocket连接
4064
+ this.client.connect({}, function () {
4065
+ _this.recon = true;
4066
+ // tryTimes定义重置
4067
+ _this.connects = 1;
4068
+ // 订阅消息
4069
+ _this.subscribe();
4070
+ }, function (error) {
4071
+ _this.unsubscribe();
4072
+ _this.client = null;
4073
+ var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
4074
+ if (_this.connects > 5 && diffSecond < _this.interval) {
4075
+ _this.error && _this.error(error);
4076
+ } else {
4077
+ _this.reconTimeout = setTimeout(function () {
4078
+ _this.connect();
4079
+ _this.connects++;
4080
+ }, 5000);
4081
+ }
4082
+ });
4083
+ }; // 清除订阅
4084
+
4085
+
4086
+ WebSocket.prototype.unsubscribe = function unsubscribe() {
4087
+ if (this.subscription) {
4088
+ this.subscription.unsubscribe();
4089
+ this.subscription = null;
4090
+ }
4091
+ };
4092
+ /** 订阅服务端 */
4093
+
4094
+
4095
+ WebSocket.prototype.subscribe = function subscribe() {
4096
+ var _this2 = this;
4097
+
4098
+ // 订阅服务端提供的某个topic
4099
+ this.subscription = this.client.subscribe(this.take, function (response) {
4100
+ if (response && (_this2.callback || _this2.success)) {
4101
+ var callback = _this2.callback || _this2.success;
4102
+ callback(JSON.parse(response.body));
4103
+ }
4104
+ });
4105
+ };
4106
+
4107
+ /** 赋值、初始化socket */
4108
+
4109
+
4110
+ WebSocket.prototype.init = function init(option, vm) {
4111
+ for (var i in option) {
4112
+ this[i] = option[i];
4113
+ }
4114
+ this.vm = vm;
4115
+ // 初始化连接
4116
+ this.connect();
4117
+ };
4118
+
4119
+ /** 发送消息 */
4120
+
4121
+
4122
+ WebSocket.prototype.send = function send(data) {
4123
+ var _this3 = this;
4124
+
4125
+ if (this.recon) {
4126
+ clearTimeout(this.sendTimeout);
4127
+ this.client.send(this.take, {}, typeof data === 'string' ? data : JSON.stringify(data));
4128
+ } else {
4129
+ this.sendTimeout = setTimeout(function () {
4130
+ _this3.send(data);
4131
+ }, 1000);
4132
+ }
4133
+ };
4134
+
4135
+ /** 销毁 */
4136
+
4137
+
4138
+ WebSocket.prototype.destroy = function destroy() {
4139
+ // 断开连接,清除定时器
4140
+ this.unsubscribe();
4141
+ if (this.client) {
4142
+ this.client.disconnect();
4143
+ };
4144
+ this.reconTimeout && clearTimeout(this.reconTimeout);
4145
+ this.sendTimeout && clearTimeout(this.sendTimeout);
4146
+ };
4147
+
4148
+ return WebSocket;
4149
+ }();
4150
+
4151
+ /* harmony default export */ __webpack_exports__["a"] = (WebSocket);
4152
+
4153
+ /***/ }),
4154
+
4155
4155
  /***/ 8:
4156
4156
  /***/ (function(module, exports) {
4157
4157