eoss-ui 0.5.46 → 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 (77) hide show
  1. package/lib/button.js +2 -9
  2. package/lib/data-table.js +27 -36
  3. package/lib/dialog.js +4 -11
  4. package/lib/eoss-ui.common.js +70 -110
  5. package/lib/flow-group.js +7 -19
  6. package/lib/handle-user.js +3 -9
  7. package/lib/index.js +1 -1
  8. package/lib/toolbar.js +9 -8
  9. package/package.json +1 -1
  10. package/packages/button/src/main.vue +2 -9
  11. package/packages/data-table/src/main.vue +28 -27
  12. package/packages/dialog/src/main.vue +2 -9
  13. package/packages/flow-group/src/main.vue +5 -17
  14. package/packages/handle-user/src/main.vue +1 -7
  15. package/packages/theme-chalk/gulpfile.js +25 -0
  16. package/packages/toolbar/src/main.vue +9 -8
  17. package/src/index.js +1 -1
  18. package/CHANGELOG.md +0 -929
  19. package/packages/theme-chalk/lib/base.css +0 -1
  20. package/packages/theme-chalk/lib/button-group.css +0 -1
  21. package/packages/theme-chalk/lib/button.css +0 -1
  22. package/packages/theme-chalk/lib/calendar.css +0 -0
  23. package/packages/theme-chalk/lib/card.css +0 -1
  24. package/packages/theme-chalk/lib/cascader.css +0 -1
  25. package/packages/theme-chalk/lib/checkbox-group.css +0 -1
  26. package/packages/theme-chalk/lib/clients.css +0 -1
  27. package/packages/theme-chalk/lib/data-table-form.css +0 -1
  28. package/packages/theme-chalk/lib/data-table.css +0 -1
  29. package/packages/theme-chalk/lib/date-picker.css +0 -1
  30. package/packages/theme-chalk/lib/dialog.css +0 -1
  31. package/packages/theme-chalk/lib/enterprise.css +0 -1
  32. package/packages/theme-chalk/lib/error-page.css +0 -1
  33. package/packages/theme-chalk/lib/flow-chart.css +0 -0
  34. package/packages/theme-chalk/lib/flow-group.css +0 -1
  35. package/packages/theme-chalk/lib/flow-list.css +0 -1
  36. package/packages/theme-chalk/lib/flow.css +0 -1
  37. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  38. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  39. package/packages/theme-chalk/lib/form.css +0 -1
  40. package/packages/theme-chalk/lib/handle-user.css +0 -1
  41. package/packages/theme-chalk/lib/handler.css +0 -1
  42. package/packages/theme-chalk/lib/icon.css +0 -1
  43. package/packages/theme-chalk/lib/icons.css +0 -1
  44. package/packages/theme-chalk/lib/index.css +0 -1
  45. package/packages/theme-chalk/lib/input-number.css +0 -0
  46. package/packages/theme-chalk/lib/input.css +0 -1
  47. package/packages/theme-chalk/lib/label.css +0 -1
  48. package/packages/theme-chalk/lib/layout.css +0 -1
  49. package/packages/theme-chalk/lib/login.css +0 -1
  50. package/packages/theme-chalk/lib/main.css +0 -1
  51. package/packages/theme-chalk/lib/mainComp.css +0 -0
  52. package/packages/theme-chalk/lib/menu.css +0 -1
  53. package/packages/theme-chalk/lib/nav.css +0 -1
  54. package/packages/theme-chalk/lib/notify.css +0 -0
  55. package/packages/theme-chalk/lib/page.css +0 -1
  56. package/packages/theme-chalk/lib/pagination.css +0 -1
  57. package/packages/theme-chalk/lib/player.css +0 -1
  58. package/packages/theme-chalk/lib/qr-code.css +0 -1
  59. package/packages/theme-chalk/lib/radio-group.css +0 -1
  60. package/packages/theme-chalk/lib/retrial-auth.css +0 -1
  61. package/packages/theme-chalk/lib/select-ganged.css +0 -1
  62. package/packages/theme-chalk/lib/select.css +0 -1
  63. package/packages/theme-chalk/lib/selector-panel.css +0 -1
  64. package/packages/theme-chalk/lib/selector.css +0 -1
  65. package/packages/theme-chalk/lib/sizer.css +0 -1
  66. package/packages/theme-chalk/lib/steps.css +0 -1
  67. package/packages/theme-chalk/lib/switch.css +0 -1
  68. package/packages/theme-chalk/lib/table-form.css +0 -0
  69. package/packages/theme-chalk/lib/tabs-panel.css +0 -0
  70. package/packages/theme-chalk/lib/tabs.css +0 -1
  71. package/packages/theme-chalk/lib/tips.css +0 -1
  72. package/packages/theme-chalk/lib/toolbar.css +0 -1
  73. package/packages/theme-chalk/lib/tree-group.css +0 -1
  74. package/packages/theme-chalk/lib/tree.css +0 -1
  75. package/packages/theme-chalk/lib/upload.css +0 -1
  76. package/packages/theme-chalk/lib/wujie.css +0 -0
  77. package/packages/theme-chalk/lib/wxlogin.css +0 -1
package/lib/toolbar.js CHANGED
@@ -260,21 +260,21 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
260
260
  searchValue: {
261
261
  deep: true,
262
262
  handler: function handler(val) {
263
- this.searchData = val;
263
+ this.searchData = JSON.parse(JSON.stringify(val));
264
264
  }
265
265
  },
266
266
  advanceValue: {
267
267
  deep: true,
268
268
  handler: function handler(val) {
269
- this.advancedData = val;
269
+ this.advancedData = JSON.parse(JSON.stringify(val));
270
270
  }
271
271
  }
272
272
  },
273
273
  data: function data() {
274
274
  return {
275
275
  show: false,
276
- searchData: this.searchValue,
277
- advancedData: this.advanceValue
276
+ searchData: JSON.parse(JSON.stringify(this.searchValue)),
277
+ advancedData: JSON.parse(JSON.stringify(this.advanceValue))
278
278
  };
279
279
  },
280
280
  created: function created() {
@@ -324,13 +324,14 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
324
324
  },
325
325
  hanleReset: function hanleReset() {
326
326
  this.$refs.filter && this.$refs.filter.resetFields();
327
- this.searchData = {};
328
- this.advancedData = {};
329
- this.$emit('reset');
327
+ this.searchData = JSON.parse(JSON.stringify(this.searchValue));
328
+ this.advancedData = JSON.parse(JSON.stringify(this.advanceValue));
329
+ this.$emit('reset', this.searchData);
330
330
  },
331
331
  hanleCancel: function hanleCancel() {
332
332
  this.show = false;
333
- this.$emit('cancel');
333
+ this.advancedData = JSON.parse(JSON.stringify(this.advanceValue));
334
+ this.$emit('cancel', this.advancedData);
334
335
  }
335
336
  },
336
337
  render: function render(h) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.5.46",
3
+ "version": "0.5.47",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -70,15 +70,8 @@ export default {
70
70
  evt.preventDefault();
71
71
  let width = 0;
72
72
  let height = 0;
73
- let win;
74
- try {
75
- util.win.top.document;
76
- win = util.win.top;
77
- } catch (error) {
78
- win = util.getMyWinTop();
79
- }
80
- width = win.screen.availWidth - 10;
81
- height = win.screen.availHeight - 60;
73
+ width = util.win.top.screen.availWidth - 10;
74
+ height = util.win.top.screen.availHeight - 60;
82
75
  let flag = true;
83
76
  if (this.esForm) {
84
77
  let params = util.getParams({ url: this.link });
@@ -409,6 +409,13 @@ export default {
409
409
  };
410
410
  },
411
411
  computed: {
412
+ params() {
413
+ return {
414
+ ...(this.param || {}),
415
+ ...(this.searchValue || {}),
416
+ ...(this.advanceValue || {})
417
+ };
418
+ },
412
419
  tag() {
413
420
  return this.form && this.elForm == '' ? 'el-form' : 'div';
414
421
  },
@@ -882,7 +889,7 @@ export default {
882
889
  this.tableLoadingText = '加载中...';
883
890
  let reqData = util.extend(
884
891
  {},
885
- this.param,
892
+ this.params,
886
893
  this.page
887
894
  ? {
888
895
  pageNum: this.config.pageNum,
@@ -1292,50 +1299,44 @@ export default {
1292
1299
  this.$emit('next', res);
1293
1300
  },
1294
1301
  hanleSearch(data) {
1295
- this.wheres = data;
1296
- if (this.url) {
1297
- if (this.response !== undefined) {
1298
- this.getTableData({
1299
- where: this.response({
1302
+ this.wheres =
1303
+ this.response !== undefined
1304
+ ? this.response({
1300
1305
  type: 'search',
1301
1306
  data: JSON.parse(JSON.stringify(data))
1302
1307
  })
1303
- });
1304
- } else {
1305
- this.getTableData({ where: this.wheres });
1306
- }
1308
+ : data;
1309
+ if (this.url) {
1310
+ this.getTableData();
1307
1311
  }
1308
- this.$emit('search', data);
1312
+ this.$emit('search', this.wheres);
1309
1313
  },
1310
1314
  hanleReset() {
1311
1315
  if (this.url) {
1312
1316
  this.wheres = {};
1313
1317
  this.getTableData();
1314
1318
  }
1315
- this.$emit('reset');
1319
+ this.$emit('reset', this.params);
1316
1320
  },
1317
1321
  hanleSubmit({ data, show }) {
1318
- this.wheres = data;
1319
- if (this.url) {
1320
- if (this.response !== undefined) {
1321
- this.getTableData({
1322
- where: this.response({
1322
+ this.wheres =
1323
+ this.response !== undefined
1324
+ ? this.response({
1323
1325
  type: 'filter',
1324
1326
  data: JSON.parse(JSON.stringify(data))
1325
1327
  })
1326
- });
1327
- } else {
1328
- this.getTableData({ where: this.wheres });
1329
- }
1328
+ : data;
1329
+ if (this.url) {
1330
+ this.getTableData();
1330
1331
  }
1331
- this.$emit('submit', { data, show });
1332
+ this.$emit('submit', { data: this.wheres, show });
1332
1333
  },
1333
1334
  hanleCancel() {
1334
- if (this.url && JSON.stringify(this.wheres) !== '{}') {
1335
- this.wheres = {};
1336
- this.getTableData();
1337
- }
1338
- this.$emit('cancel');
1335
+ // if (this.url && JSON.stringify(this.wheres) !== '{}') {
1336
+ // this.wheres = {};
1337
+ // this.getTableData();
1338
+ // }
1339
+ this.$emit('cancel', this.params);
1339
1340
  },
1340
1341
  handleTabs({ item, index }) {
1341
1342
  if (this.url) {
@@ -381,15 +381,8 @@ export default {
381
381
  created() {
382
382
  let availWidth = 0;
383
383
  let availHeight = 0;
384
- let win;
385
- try {
386
- util.win.top.document;
387
- win = util.win.top;
388
- } catch (error) {
389
- win = util.getMyWinTop();
390
- }
391
- availWidth = win.document.body.offsetWidth - 260;
392
- availHeight = win.document.body.offsetHeight - 60;
384
+ availWidth = util.win.top.document.body.offsetWidth - 260;
385
+ availHeight = util.win.top.document.body.offsetHeight - 60;
393
386
  this.sizes.max = { width: `${availWidth}px`, height: `${availHeight}px` };
394
387
  if (
395
388
  this.size === 'full' ||
@@ -575,13 +575,7 @@ export default {
575
575
  let name = item.name;
576
576
  let width = 0;
577
577
  let height = 0;
578
- let win;
579
- try {
580
- util.win.top.document;
581
- win = util.win.top;
582
- } catch (error) {
583
- win = util.getMyWinTop();
584
- }
578
+ let win = util.win.top;
585
579
  width = win.screen.availWidth - 10;
586
580
  height = win.screen.availHeight - 60;
587
581
  if (item.url) {
@@ -654,16 +648,10 @@ export default {
654
648
  handleSuccess() {
655
649
  if (this.closeDialog && this.esDialog) {
656
650
  this.esDialog.handleClose();
657
- } else if (util.win.opener) {
658
- let win;
659
- try {
660
- util.win.top.document;
661
- win = util.win.top;
662
- } catch (error) {
663
- win = util.getMyWinTop();
664
- }
665
- win.close();
666
- win.postMessage({ type: 0 }, '*');
651
+ } else if (util.win.top.COOS_SDK) {
652
+ util.win.top.COOS_SDK.closePopup && util.win.top.COOS_SDK.closePopup();
653
+ } else if (util.win.top.opener) {
654
+ util.win.top.close();
667
655
  }
668
656
  if (this.events && this.events.success) {
669
657
  this.events.success();
@@ -98,13 +98,7 @@ export default {
98
98
  duration: 500,
99
99
  onClose: () => {
100
100
  util.removeStorage(['mainConfig', 'jump']);
101
- let win;
102
- try {
103
- util.win.top.document;
104
- win = util.win.top;
105
- } catch (error) {
106
- win = util.getMyWinTop();
107
- }
101
+ let win = util.win.top;
108
102
  win.location.reload();
109
103
  }
110
104
  });
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ const { series, src, dest } = require('gulp');
4
+ const sass = require('gulp-sass');
5
+ const autoprefixer = require('gulp-autoprefixer');
6
+ const cssmin = require('gulp-cssmin');
7
+
8
+ function compile() {
9
+ return src('./src/*.scss')
10
+ .pipe(sass.sync())
11
+ .pipe(autoprefixer({
12
+ overrideBrowserslist: ['ie > 9', 'last 2 versions'],
13
+ cascade: false
14
+ }))
15
+ .pipe(cssmin())
16
+ .pipe(dest('./lib'));
17
+ }
18
+
19
+ function copyfont() {
20
+ return src('./src/fonts/**')
21
+ .pipe(cssmin())
22
+ .pipe(dest('./lib/fonts'));
23
+ }
24
+
25
+ exports.build = series(compile, copyfont);
@@ -55,21 +55,21 @@ export default {
55
55
  searchValue: {
56
56
  deep: true,
57
57
  handler(val) {
58
- this.searchData = val;
58
+ this.searchData = JSON.parse(JSON.stringify(val));
59
59
  }
60
60
  },
61
61
  advanceValue: {
62
62
  deep: true,
63
63
  handler(val) {
64
- this.advancedData = val;
64
+ this.advancedData = JSON.parse(JSON.stringify(val));
65
65
  }
66
66
  }
67
67
  },
68
68
  data() {
69
69
  return {
70
70
  show: false,
71
- searchData: this.searchValue,
72
- advancedData: this.advanceValue
71
+ searchData: JSON.parse(JSON.stringify(this.searchValue)),
72
+ advancedData: JSON.parse(JSON.stringify(this.advanceValue))
73
73
  };
74
74
  },
75
75
  created() {
@@ -116,13 +116,14 @@ export default {
116
116
  },
117
117
  hanleReset() {
118
118
  this.$refs.filter && this.$refs.filter.resetFields();
119
- this.searchData = {};
120
- this.advancedData = {};
121
- this.$emit('reset');
119
+ this.searchData = JSON.parse(JSON.stringify(this.searchValue));
120
+ this.advancedData = JSON.parse(JSON.stringify(this.advanceValue));
121
+ this.$emit('reset', this.searchData);
122
122
  },
123
123
  hanleCancel() {
124
124
  this.show = false;
125
- this.$emit('cancel');
125
+ this.advancedData = JSON.parse(JSON.stringify(this.advanceValue));
126
+ this.$emit('cancel', this.advancedData);
126
127
  }
127
128
  },
128
129
  render(h) {
package/src/index.js CHANGED
@@ -119,7 +119,7 @@ if (typeof window !== 'undefined' && window.Vue) {
119
119
  }
120
120
 
121
121
  export default {
122
- version: '0.5.46',
122
+ version: '0.5.47',
123
123
  install,
124
124
  Button,
125
125
  ButtonGroup,