eoss-ui 0.5.13 → 0.5.15

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 (69) hide show
  1. package/lib/button-group.js +5 -1
  2. package/lib/button.js +7 -3
  3. package/lib/cascader.js +2 -2
  4. package/lib/checkbox-group.js +44 -22
  5. package/lib/data-table-form.js +8 -3
  6. package/lib/data-table.js +1205 -1517
  7. package/lib/date-picker.js +7 -3
  8. package/lib/dialog.js +14 -10
  9. package/lib/eoss-ui.common.js +1211 -1752
  10. package/lib/flow-group.js +5 -1
  11. package/lib/flow-list.js +7 -3
  12. package/lib/flow.js +12 -7
  13. package/lib/form.js +9 -10
  14. package/lib/handle-user.js +5 -1
  15. package/lib/handler.js +5 -1
  16. package/lib/icons.js +2 -2
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +7 -3
  19. package/lib/input.js +7 -3
  20. package/lib/label.js +2 -2
  21. package/lib/layout.js +166 -152
  22. package/lib/login.js +5 -1
  23. package/lib/main.js +11 -6
  24. package/lib/menu.js +2 -2
  25. package/lib/nav.js +14 -10
  26. package/lib/notify.js +2 -2
  27. package/lib/page.js +7 -3
  28. package/lib/pagination.js +2 -2
  29. package/lib/player.js +13 -9
  30. package/lib/qr-code.js +9 -5
  31. package/lib/radio-group.js +48 -22
  32. package/lib/retrial-auth.js +7 -3
  33. package/lib/select-ganged.js +30 -6
  34. package/lib/select.js +46 -19
  35. package/lib/selector-panel.js +11 -6
  36. package/lib/selector.js +9 -5
  37. package/lib/sizer.js +7 -3
  38. package/lib/steps.js +14 -10
  39. package/lib/switch.js +7 -3
  40. package/lib/table-form.js +7 -3
  41. package/lib/tabs-panel.js +2 -2
  42. package/lib/tabs.js +7 -3
  43. package/lib/theme-chalk/data-table.css +1 -1
  44. package/lib/theme-chalk/index.css +1 -1
  45. package/lib/tips.js +7 -3
  46. package/lib/toolbar.js +2 -2
  47. package/lib/tree-group.js +7 -3
  48. package/lib/tree.js +7 -3
  49. package/lib/upload.js +8 -4
  50. package/lib/utils/util.js +5 -1
  51. package/lib/wujie.js +7 -3
  52. package/lib/wxlogin.js +7 -3
  53. package/package.json +2 -2
  54. package/packages/checkbox-group/src/main.vue +20 -30
  55. package/packages/data-table/src/children.vue +4 -8
  56. package/packages/data-table/src/column.vue +524 -575
  57. package/packages/data-table/src/main.vue +95 -119
  58. package/packages/form/src/main.vue +2 -7
  59. package/packages/radio-group/src/main.vue +20 -30
  60. package/packages/select/src/main.vue +20 -29
  61. package/packages/select-ganged/src/main.vue +1 -3
  62. package/packages/theme-chalk/lib/data-table.css +1 -1
  63. package/packages/theme-chalk/lib/index.css +1 -1
  64. package/packages/theme-chalk/src/data-table.scss +2 -1
  65. package/src/index.js +1 -1
  66. package/src/utils/util.js +5 -1
  67. package/packages/data-table/src/column copy.vue +0 -977
  68. package/packages/data-table/src/main copy.vue +0 -1325
  69. package/packages/data-table/src/mixins/table.js +0 -12
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 = 62);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 63);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -1966,7 +1966,11 @@ var isLogined = function isLogined(_ref8) {
1966
1966
  // const logined = getStorage('logined');
1967
1967
  // eslint-disable-next-line eqeqeq
1968
1968
  if (token || cookie == true || cookie == 1) {
1969
- next && next();
1969
+ if (to.path === '/main' || to.path === '/login') {
1970
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1971
+ } else {
1972
+ next && next();
1973
+ }
1970
1974
  } else {
1971
1975
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1972
1976
  ajax({
@@ -3453,7 +3457,7 @@ module.exports = require("json-bigint");
3453
3457
 
3454
3458
  /***/ }),
3455
3459
 
3456
- /***/ 62:
3460
+ /***/ 63:
3457
3461
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3458
3462
 
3459
3463
  "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 = 78);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 79);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -192,7 +192,7 @@ function normalizeComponent(
192
192
 
193
193
  /***/ }),
194
194
 
195
- /***/ 78:
195
+ /***/ 79:
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 = 64);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 65);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -1966,7 +1966,11 @@ var isLogined = function isLogined(_ref8) {
1966
1966
  // const logined = getStorage('logined');
1967
1967
  // eslint-disable-next-line eqeqeq
1968
1968
  if (token || cookie == true || cookie == 1) {
1969
- next && next();
1969
+ if (to.path === '/main' || to.path === '/login') {
1970
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1971
+ } else {
1972
+ next && next();
1973
+ }
1970
1974
  } else {
1971
1975
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1972
1976
  ajax({
@@ -3453,7 +3457,7 @@ module.exports = require("json-bigint");
3453
3457
 
3454
3458
  /***/ }),
3455
3459
 
3456
- /***/ 64:
3460
+ /***/ 65:
3457
3461
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3458
3462
 
3459
3463
  "use strict";
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 = 63);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 64);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -1966,7 +1966,11 @@ var isLogined = function isLogined(_ref8) {
1966
1966
  // const logined = getStorage('logined');
1967
1967
  // eslint-disable-next-line eqeqeq
1968
1968
  if (token || cookie == true || cookie == 1) {
1969
- next && next();
1969
+ if (to.path === '/main' || to.path === '/login') {
1970
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1971
+ } else {
1972
+ next && next();
1973
+ }
1970
1974
  } else {
1971
1975
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1972
1976
  ajax({
@@ -3453,7 +3457,7 @@ module.exports = require("json-bigint");
3453
3457
 
3454
3458
  /***/ }),
3455
3459
 
3456
- /***/ 63:
3460
+ /***/ 64:
3457
3461
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3458
3462
 
3459
3463
  "use strict";
package/lib/upload.js CHANGED
@@ -1965,7 +1965,11 @@ var isLogined = function isLogined(_ref8) {
1965
1965
  // const logined = getStorage('logined');
1966
1966
  // eslint-disable-next-line eqeqeq
1967
1967
  if (token || cookie == true || cookie == 1) {
1968
- next && next();
1968
+ if (to.path === '/main' || to.path === '/login') {
1969
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1970
+ } else {
1971
+ next && next();
1972
+ }
1969
1973
  } else {
1970
1974
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1971
1975
  ajax({
@@ -3628,13 +3632,13 @@ window.__store = store;
3628
3632
  /* 22 */,
3629
3633
  /* 23 */,
3630
3634
  /* 24 */,
3631
- /* 25 */
3635
+ /* 25 */,
3636
+ /* 26 */
3632
3637
  /***/ (function(module, exports) {
3633
3638
 
3634
3639
  module.exports = require("js-base64");
3635
3640
 
3636
3641
  /***/ }),
3637
- /* 26 */,
3638
3642
  /* 27 */,
3639
3643
  /* 28 */,
3640
3644
  /* 29 */,
@@ -4062,7 +4066,7 @@ var util = __webpack_require__(0);
4062
4066
  var store = __webpack_require__(11);
4063
4067
 
4064
4068
  // EXTERNAL MODULE: external "js-base64"
4065
- var external_js_base64_ = __webpack_require__(25);
4069
+ var external_js_base64_ = __webpack_require__(26);
4066
4070
 
4067
4071
  // 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&
4068
4072
  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/utils/util.js CHANGED
@@ -1883,7 +1883,11 @@ var isLogined = function isLogined(_ref8) {
1883
1883
  // const logined = getStorage('logined');
1884
1884
  // eslint-disable-next-line eqeqeq
1885
1885
  if (token || cookie == true || cookie == 1) {
1886
- next && next();
1886
+ if (to.path === '/main' || to.path === '/login') {
1887
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1888
+ } else {
1889
+ next && next();
1890
+ }
1887
1891
  } else {
1888
1892
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1889
1893
  ajax({
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 = 66);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 67);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -1966,7 +1966,11 @@ var isLogined = function isLogined(_ref8) {
1966
1966
  // const logined = getStorage('logined');
1967
1967
  // eslint-disable-next-line eqeqeq
1968
1968
  if (token || cookie == true || cookie == 1) {
1969
- next && next();
1969
+ if (to.path === '/main' || to.path === '/login') {
1970
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1971
+ } else {
1972
+ next && next();
1973
+ }
1970
1974
  } else {
1971
1975
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1972
1976
  ajax({
@@ -3453,7 +3457,7 @@ module.exports = require("json-bigint");
3453
3457
 
3454
3458
  /***/ }),
3455
3459
 
3456
- /***/ 66:
3460
+ /***/ 67:
3457
3461
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3458
3462
 
3459
3463
  "use strict";
package/lib/wxlogin.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 = 68);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -1966,7 +1966,11 @@ var isLogined = function isLogined(_ref8) {
1966
1966
  // const logined = getStorage('logined');
1967
1967
  // eslint-disable-next-line eqeqeq
1968
1968
  if (token || cookie == true || cookie == 1) {
1969
- next && next();
1969
+ if (to.path === '/main' || to.path === '/login') {
1970
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1971
+ } else {
1972
+ next && next();
1973
+ }
1970
1974
  } else {
1971
1975
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1972
1976
  ajax({
@@ -3453,7 +3457,7 @@ module.exports = require("json-bigint");
3453
3457
 
3454
3458
  /***/ }),
3455
3459
 
3456
- /***/ 67:
3460
+ /***/ 68:
3457
3461
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3458
3462
 
3459
3463
  "use strict";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.5.13",
3
+ "version": "0.5.15",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -112,7 +112,7 @@
112
112
  "gulp-autoprefixer": "^6.0.0",
113
113
  "gulp-cssmin": "^0.2.0",
114
114
  "gulp-sass": "^4.0.2",
115
- "highlight.js": "^9.3.0",
115
+ "highlight.js": "^11.9.0",
116
116
  "html-webpack-plugin": "^3.2.0",
117
117
  "json-loader": "^0.5.7",
118
118
  "json-templater": "^1.0.4",
@@ -57,15 +57,13 @@
57
57
  import { findSysCode } from 'eoss-ui/src/config/api.js';
58
58
  import store from 'eoss-ui/src/utils/store';
59
59
  import util from 'eoss-ui/src/utils/util';
60
+ import bus from 'eoss-ui/src/utils/bus';
60
61
  export default {
61
62
  name: 'EsCheckboxGroup',
62
63
  inheritAttrs: false,
63
64
  inject: {
64
65
  esForm: {
65
66
  default: ''
66
- },
67
- sysCodes: {
68
- default: ''
69
67
  }
70
68
  },
71
69
  props: {
@@ -226,30 +224,11 @@ export default {
226
224
  handler() {
227
225
  this.url && this.getData(this.url);
228
226
  }
229
- },
230
- sysCodes: {
231
- deep: true,
232
- handler(val) {
233
- if (
234
- this.canceled &&
235
- val &&
236
- ((this.sysCode && val[this.sysCode]) ||
237
- (this.dataKey && val[this.dataKey]))
238
- ) {
239
- if (this.parseData) {
240
- this.options = this.parseData(
241
- JSON.parse(JSON.stringify(val[this.sysCode || this.dataKey]))
242
- );
243
- } else {
244
- this.options = JSON.parse(
245
- JSON.stringify(val[this.sysCode || this.dataKey])
246
- );
247
- }
248
- }
249
- }
250
227
  }
251
228
  },
252
- created() {},
229
+ created() {
230
+ this.bindEventBus();
231
+ },
253
232
  mounted() {},
254
233
  methods: {
255
234
  getData(url, sysCode) {
@@ -283,11 +262,10 @@ export default {
283
262
  if (res.rCode === 0) {
284
263
  this.options = JSON.parse(JSON.stringify(res.results));
285
264
  if (sysCode || this.dataKey) {
286
- this.esForm &&
287
- this.esForm.setSysCodes(
288
- sysCode || this.dataKey,
289
- JSON.parse(JSON.stringify(this.options))
290
- );
265
+ bus.$emit(
266
+ sysCode || this.dataKey,
267
+ JSON.parse(JSON.stringify(this.options))
268
+ );
291
269
  store.set(sysCode, JSON.parse(JSON.stringify(res.results)));
292
270
  }
293
271
  } else {
@@ -315,7 +293,19 @@ export default {
315
293
  );
316
294
  }
317
295
  return util.isObject(res) ? { ...attrs, ...res } : attrs;
296
+ },
297
+ setOptions(val) {
298
+ this.options = val;
299
+ },
300
+ bindEventBus() {
301
+ bus.$on(this.sysCode || this.dataKey, this.setOptions);
302
+ },
303
+ unbindEventBus() {
304
+ bus.$off(this.sysCode || this.dataKey, this.setOptions);
318
305
  }
306
+ },
307
+ beforeDestroy() {
308
+ this.unbindEventBus();
319
309
  }
320
310
  };
321
311
  </script>
@@ -1,18 +1,14 @@
1
1
  <template>
2
2
  <column v-bind="$attrs" v-on="$listeners">
3
- <template v-if="childrens && childrens.length">
3
+ <template v-if="childrens.length">
4
4
  <template v-for="(item, index) in childrens">
5
5
  <children
6
6
  v-if="item.hide !== true"
7
7
  :key="index"
8
8
  v-bind="{
9
9
  ...$attrs,
10
- filterIcon: false,
11
- item: item,
12
- width: item.width,
13
- index: index,
14
- children: item.children,
15
- childHead: item.childHead
10
+ ...item,
11
+ indexs: index
16
12
  }"
17
13
  v-on="$listeners"
18
14
  ></children
@@ -33,7 +29,7 @@ export default {
33
29
  },
34
30
  computed: {
35
31
  childrens() {
36
- return this.children || this.childHead;
32
+ return this.children || this.childHead || [];
37
33
  }
38
34
  }
39
35
  };