eoss-ui 0.5.44 → 0.5.46

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 (86) hide show
  1. package/lib/button-group.js +16 -0
  2. package/lib/button.js +157 -144
  3. package/lib/calendar.js +769 -0
  4. package/lib/cascader.js +2 -2
  5. package/lib/checkbox-group.js +20 -2
  6. package/lib/clients.js +2 -2
  7. package/lib/data-table-form.js +52 -13
  8. package/lib/data-table.js +33 -7
  9. package/lib/date-picker.js +18 -2
  10. package/lib/dialog.js +30 -13
  11. package/lib/enterprise.js +2 -2
  12. package/lib/eoss-ui.common.js +1324 -730
  13. package/lib/error-page.js +2 -2
  14. package/lib/flow-group.js +32 -19
  15. package/lib/flow-list.js +18 -2
  16. package/lib/flow.js +16 -0
  17. package/lib/form.js +231 -231
  18. package/lib/handle-user.js +25 -10
  19. package/lib/handler.js +24 -5
  20. package/lib/icons.js +2 -2
  21. package/lib/index.js +1 -1
  22. package/lib/input-number.js +18 -2
  23. package/lib/input.js +18 -2
  24. package/lib/label.js +2 -2
  25. package/lib/login.js +16 -0
  26. package/lib/main.js +27 -4
  27. package/lib/menu.js +2 -2
  28. package/lib/nav.js +21 -5
  29. package/lib/notify.js +2 -2
  30. package/lib/page.js +18 -2
  31. package/lib/pagination.js +2 -2
  32. package/lib/player.js +18 -2
  33. package/lib/qr-code.js +18 -2
  34. package/lib/radio-group.js +18 -2
  35. package/lib/retrial-auth.js +22 -8
  36. package/lib/select-ganged.js +18 -2
  37. package/lib/select.js +18 -2
  38. package/lib/selector-panel.js +16 -0
  39. package/lib/selector.js +18 -2
  40. package/lib/sizer.js +25 -9
  41. package/lib/steps.js +18 -2
  42. package/lib/switch.js +18 -2
  43. package/lib/table-form.js +18 -2
  44. package/lib/tabs-panel.js +2 -2
  45. package/lib/tabs.js +18 -2
  46. package/lib/theme-chalk/calendar.css +0 -0
  47. package/lib/theme-chalk/cascader.css +1 -0
  48. package/lib/theme-chalk/data-table-form.css +1 -1
  49. package/lib/theme-chalk/index.css +1 -1
  50. package/lib/theme-chalk/toolbar.css +1 -1
  51. package/lib/tips.js +18 -2
  52. package/lib/toolbar.js +24 -34
  53. package/lib/tree-group.js +18 -2
  54. package/lib/tree.js +18 -2
  55. package/lib/upload.js +22 -15
  56. package/lib/utils/util.js +16 -0
  57. package/lib/wujie.js +18 -2
  58. package/lib/wxlogin.js +18 -2
  59. package/package.json +2 -2
  60. package/packages/button/src/main.vue +6 -9
  61. package/packages/calendar/index.js +5 -0
  62. package/packages/calendar/src/main.vue +386 -0
  63. package/packages/data-table/src/main.vue +12 -2
  64. package/packages/data-table-form/src/main.vue +30 -23
  65. package/packages/data-table-form/src/table.vue +16 -3
  66. package/packages/dialog/src/main.vue +9 -9
  67. package/packages/flow-group/src/main.vue +12 -15
  68. package/packages/handle-user/src/main.vue +5 -6
  69. package/packages/handler/src/main.vue +4 -1
  70. package/packages/main/src/main.vue +9 -2
  71. package/packages/nav/src/main.vue +1 -1
  72. package/packages/retrial-auth/src/main.vue +2 -4
  73. package/packages/theme-chalk/lib/calendar.css +0 -0
  74. package/packages/theme-chalk/lib/cascader.css +1 -0
  75. package/packages/theme-chalk/lib/data-table-form.css +1 -1
  76. package/packages/theme-chalk/lib/index.css +1 -1
  77. package/packages/theme-chalk/lib/toolbar.css +1 -1
  78. package/packages/theme-chalk/src/calendar.scss +0 -0
  79. package/packages/theme-chalk/src/cascader.scss +93 -0
  80. package/packages/theme-chalk/src/data-table-form.scss +11 -0
  81. package/packages/theme-chalk/src/index.scss +2 -1
  82. package/packages/theme-chalk/src/toolbar.scss +16 -11
  83. package/packages/toolbar/src/main.vue +44 -49
  84. package/packages/upload/src/main.vue +1 -10
  85. package/src/index.js +7 -4
  86. package/src/utils/util.js +16 -0
@@ -1 +1 @@
1
- @charset "UTF-8";.es-toolbar{padding:6px 12px;border-bottom:1px solid #d9d9d9;position:relative;background-color:#fff}.es-toolbar .es-toolbar-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.es-toolbar .es-toolbar-content .es-button-content{-webkit-box-flex:1;-ms-flex:1;flex:1}.es-toolbar .es-toolbar-content .es-button-content .el-button{padding:4px 8px}.es-toolbar .es-toolbar-content .es-button-content .el-button+.el-button,.es-toolbar .es-toolbar-content .es-button-content .el-button+.es-button-badge,.es-toolbar .es-toolbar-content .es-button-content .es-button-badge+.el-button{margin-left:6px}.es-toolbar .es-toolbar-content .es-form{background:0 0}.es-toolbar .es-toolbar-content .es-form .es-form-content{padding:0}.es-toolbar .es-toolbar-content .es-form .el-form-item{margin-bottom:0}.es-toolbar .es-toolbar-content .es-advanced-btn{margin-left:6px;height:32px}.es-toolbar .es-toolbar-content .es-toolbar-text{line-height:32px}.es-toolbar .es-toolbar-content .es-toolbar-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.es-toolbar .es-toolbar-content .es-toolbar-info .es-info{font-size:13px;margin-left:20px}.es-toolbar .es-toolbar-content .el-menu--horizontal{border-bottom:0;position:relative;bottom:-6px}.es-toolbar .es-toolbar-content .el-menu-item{height:32px;line-height:24px}.es-toolbar .es-toolbar-content .el-input__inner,.es-toolbar .es-toolbar-content .es-checkbox-group{height:32px;line-height:32px}.es-toolbar .es-toolbar-content .es-radio-group,.es-toolbar .es-toolbar-content .es-switch-content{line-height:32px}.es-toolbar .es-toolbar-content .el-switch{top:-2px}.es-toolbar .es-toolbar-content .el-button span{line-height:14px}.es-toolbar .es-toolbar-content .el-checkbox:not(:last-child),.es-toolbar .es-toolbar-content .el-radio:not(:last-child){margin-right:8px}.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-checkbox+.el-form-item,.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-radio+.el-form-item,.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-switch+.el-form-item{margin-left:16px}.es-toolbar .es-toolbar-content .el-form-item .el-input__icon{line-height:32px;vertical-align:top}.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner{width:100%;max-width:156px}.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner.el-date-editor--daterange{max-width:300px}.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner.el-date-editor--daterange .el-input__icon,.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner.el-date-editor--daterange .el-range-separator{line-height:24px}.es-toolbar .es-advanced-filter{margin-top:20px;z-index:9}.es-toolbar .es-advanced-filter.es-absolute{position:absolute;left:0;top:45px;right:0;margin-top:0;-webkit-box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12);box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12);border-bottom-left-radius:6px;border-bottom-right-radius:6px}.es-toolbar .es-advanced-filter.es-absolute .es-form{background-color:#fff;border:1px solid #d9d9d9;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:0;padding:20px 20px 20px 10px}.es-toolbar .el-form-item__content{line-height:32px!important}.es-toolbar .el-form-item__label{line-height:32px!important;height:32px}.es-toolbar .el-button.es-upload{padding:0!important;border:0!important}
1
+ @charset "UTF-8";.es-toolbar{padding:6px 12px;border-bottom:1px solid #d9d9d9;position:relative;background-color:#fff}.es-toolbar .es-toolbar-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.es-toolbar .es-toolbar-content .es-button-content{-webkit-box-flex:1;-ms-flex:1;flex:1}.es-toolbar .es-toolbar-content .es-button-content .el-button{padding:4px 8px}.es-toolbar .es-toolbar-content .es-button-content .el-button+.el-button,.es-toolbar .es-toolbar-content .es-button-content .el-button+.es-button-badge,.es-toolbar .es-toolbar-content .es-button-content .es-button-badge+.el-button{margin-left:6px}.es-toolbar .es-toolbar-content .es-form{background:0 0}.es-toolbar .es-toolbar-content .es-form .es-form-content{padding:0}.es-toolbar .es-toolbar-content .es-form .el-form-item{margin-bottom:0}.es-toolbar .es-toolbar-content .es-advanced-btn{margin-left:6px;height:32px}.es-toolbar .es-toolbar-content .es-advanced-btn .es-advanced-icon{margin-right:-8px}.es-toolbar .es-toolbar-content .es-toolbar-text{line-height:32px}.es-toolbar .es-toolbar-content .es-toolbar-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.es-toolbar .es-toolbar-content .es-toolbar-info .es-info{font-size:13px;margin-left:20px}.es-toolbar .es-toolbar-content .el-menu--horizontal{border-bottom:0;position:relative;bottom:-6px}.es-toolbar .es-toolbar-content .el-menu-item{height:32px;line-height:24px}.es-toolbar .es-toolbar-content .el-input__inner,.es-toolbar .es-toolbar-content .es-checkbox-group{height:32px;line-height:32px}.es-toolbar .es-toolbar-content .es-radio-group,.es-toolbar .es-toolbar-content .es-switch-content{line-height:32px}.es-toolbar .es-toolbar-content .el-switch{top:-2px}.es-toolbar .es-toolbar-content .el-button span{line-height:14px}.es-toolbar .es-toolbar-content .el-checkbox:not(:last-child),.es-toolbar .es-toolbar-content .el-radio:not(:last-child){margin-right:8px}.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-checkbox+.el-form-item,.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-radio+.el-form-item,.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-switch+.el-form-item{margin-left:16px}.es-toolbar .es-toolbar-content .el-form-item .el-input__icon{line-height:32px;vertical-align:top}.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner{width:100%;max-width:156px}.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner.el-date-editor--daterange{max-width:300px}.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner.el-date-editor--daterange .el-input__icon,.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner.el-date-editor--daterange .el-range-separator{line-height:24px}.es-toolbar .es-form-search-small .el-form-item__content{line-height:32px!important}.es-toolbar .es-form-search-small .el-form-item__label{line-height:32px!important;height:32px}.es-toolbar .el-button.es-upload{padding:0!important;border:0!important}.es-toolbar .es-advanced-filter{margin-top:20px;z-index:9}.es-toolbar .es-advanced-filter.es-absolute{position:absolute;left:0;top:45px;right:0;margin-top:0;-webkit-box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12);box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12);border-bottom-left-radius:6px;border-bottom-right-radius:6px}.es-toolbar .es-advanced-filter.es-absolute .es-form{background-color:#fff;border:1px solid #d9d9d9;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:0;padding:20px 20px 20px 10px}
File without changes
@@ -0,0 +1,93 @@
1
+ .es-calendar {
2
+ background-color: #fff;
3
+ .es-calendar-title {
4
+ height: 44px;
5
+ padding: 12px 30px;
6
+ background-color: #ffffff;
7
+ font-family: PingFang SC, PingFang SC;
8
+ font-weight: 400;
9
+ font-size: 14px;
10
+ color: #262626;
11
+ line-height: 20px;
12
+ text-align: center;
13
+ position: relative;
14
+ display: flex;
15
+ justify-content: center;
16
+ .es-calendar-prev,
17
+ .es-calendar-next {
18
+ cursor: pointer;
19
+ font-size: 14px;
20
+ color: #8c8c8c;
21
+ line-height: 20px;
22
+ }
23
+ .es-calendar-prev {
24
+ margin-right: 8px;
25
+ }
26
+ .es-calendar-next {
27
+ margin-left: 8px;
28
+ }
29
+ .es-title {
30
+ width: 86px;
31
+ }
32
+ }
33
+ .es-calendar-weeks {
34
+ display: flex;
35
+ flex-wrap: wrap;
36
+ .es-week {
37
+ width: (100% / 7);
38
+ height: 20px;
39
+ text-align: center;
40
+ line-height: 20px;
41
+ font-weight: 400;
42
+ font-size: 12px;
43
+ color: #8c8c8c;
44
+ }
45
+ }
46
+ .es-calendar-days {
47
+ display: flex;
48
+ flex-wrap: wrap;
49
+ .es-day {
50
+ width: (100% / 7);
51
+ height: 44px;
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: center;
55
+ .es-day-item {
56
+ width: 28px;
57
+ height: 28px;
58
+ font-weight: 400;
59
+ font-size: 14px;
60
+ color: #262626;
61
+ text-align: center;
62
+ line-height: 28px;
63
+ position: relative;
64
+ cursor: pointer;
65
+ &.es-disabled-day {
66
+ color: #bfbfbf;
67
+ }
68
+ &.es-today {
69
+ color: #2778e5;
70
+ border: 1px solid #2778e5;
71
+ line-height: 26px;
72
+ border-radius: 15px 15px 15px 15px;
73
+ }
74
+ &.es-select {
75
+ color: #fff;
76
+ background-color: #2778e5;
77
+ border-radius: 15px 15px 15px 15px;
78
+ }
79
+ }
80
+ }
81
+ }
82
+ .es-calendar-switch {
83
+ height: 22px;
84
+ line-height: 22px;
85
+ font-weight: bold;
86
+ text-align: center;
87
+ color: #8c8c8c;
88
+ .es-switch-icon {
89
+ font-size: 14px;
90
+ cursor: pointer;
91
+ }
92
+ }
93
+ }
@@ -38,6 +38,17 @@
38
38
  .es-data-form-head {
39
39
  background-color: $--table-header-background-color;
40
40
  }
41
+ &.es-data-form-full {
42
+ height: 100%;
43
+ .es-data-form {
44
+ height: 100%;
45
+ &.es-data-form-haspage {
46
+ .es-scrollbar {
47
+ height: calc(100% - 46px);
48
+ }
49
+ }
50
+ }
51
+ }
41
52
  }
42
53
  .es-data-form {
43
54
  position: relative;
@@ -1,9 +1,10 @@
1
1
  @import "./base.scss";
2
2
  @import "./button.scss";
3
3
  @import "./button-group.scss";
4
- @import "./checkbox-group.scss";
4
+ @import "./calendar.scss";
5
5
  @import "./card.scss";
6
6
  @import "./cascader.scss";
7
+ @import "./checkbox-group.scss";
7
8
  @import "./clients.scss";
8
9
  @import "./data-table.scss";
9
10
  @import "./data-table-form.scss";
@@ -32,6 +32,9 @@
32
32
  .es-advanced-btn {
33
33
  margin-left: 6px;
34
34
  height: 32px;
35
+ .es-advanced-icon {
36
+ margin-right: -8px;
37
+ }
35
38
  }
36
39
  .es-toolbar-text {
37
40
  line-height: 32px;
@@ -104,6 +107,19 @@
104
107
  }
105
108
  }
106
109
  }
110
+ .es-form-search-small {
111
+ .el-form-item__content {
112
+ line-height: 32px !important;
113
+ }
114
+ .el-form-item__label {
115
+ line-height: 32px !important;
116
+ height: 32px;
117
+ }
118
+ }
119
+ .el-button.es-upload {
120
+ padding: 0 !important;
121
+ border: 0 !important;
122
+ }
107
123
  .es-advanced-filter {
108
124
  margin-top: 20px;
109
125
  z-index: 9;
@@ -126,15 +142,4 @@
126
142
  }
127
143
  }
128
144
  }
129
- .el-form-item__content {
130
- line-height: 32px !important;
131
- }
132
- .el-form-item__label {
133
- line-height: 32px !important;
134
- height: 32px;
135
- }
136
- .el-button.es-upload {
137
- padding: 0 !important;
138
- border: 0 !important;
139
- }
140
145
  }
@@ -51,41 +51,25 @@ export default {
51
51
  default: 'auto'
52
52
  }
53
53
  },
54
- computed: {
55
- searchData: {
56
- get() {
57
- let value;
58
- for (let i = 0; i < this.contents.length; i++) {
59
- if (this.contents[i].type === 'search') {
60
- value = this.contents[i].value || this.contents[i].searchValue;
61
- break;
62
- }
63
- }
64
- return value ? value : this.searchValue;
65
- },
66
- set(val) {
67
- return val;
54
+ watch: {
55
+ searchValue: {
56
+ deep: true,
57
+ handler(val) {
58
+ this.searchData = val;
68
59
  }
69
60
  },
70
- advancedData: {
71
- get() {
72
- let value;
73
- for (let i = 0; i < this.contents.length; i++) {
74
- if (this.contents[i].type === 'filter') {
75
- value = this.contents[i].value || this.contents[i].searchValue;
76
- break;
77
- }
78
- }
79
- return value ? value : this.advanceValue;
80
- },
81
- set(val) {
82
- return val;
61
+ advanceValue: {
62
+ deep: true,
63
+ handler(val) {
64
+ this.advancedData = val;
83
65
  }
84
66
  }
85
67
  },
86
68
  data() {
87
69
  return {
88
- show: false
70
+ show: false,
71
+ searchData: this.searchValue,
72
+ advancedData: this.advanceValue
89
73
  };
90
74
  },
91
75
  created() {
@@ -303,7 +287,16 @@ export default {
303
287
  }
304
288
  }
305
289
  },
306
- '高级搜索'
290
+ [
291
+ '高级搜索',
292
+ h('i', {
293
+ class: {
294
+ 'el-icon-arrow-down': !this.show,
295
+ 'el-icon-arrow-up': this.show,
296
+ 'es-advanced-icon': 1
297
+ }
298
+ })
299
+ ]
307
300
  )
308
301
  );
309
302
  filter = h(
@@ -329,26 +322,28 @@ export default {
329
322
  ]
330
323
  },
331
324
  [
332
- h(
333
- 'es-form',
334
- {
335
- class: 'es-form-search',
336
- ref: 'filter',
337
- props: {
338
- ...other,
339
- ...(config || {}),
340
- size: 'medium',
341
- closeDialog: false,
342
- model: this.advancedData,
343
- contents: contents
344
- },
345
- on: {
346
- submit: this.hanleSubmit,
347
- reset: this.hanleCancel
348
- }
349
- },
350
- []
351
- )
325
+ this.show
326
+ ? h(
327
+ 'es-form',
328
+ {
329
+ class: 'es-form-advanced-filter',
330
+ ref: 'filter',
331
+ props: {
332
+ ...other,
333
+ ...(config || {}),
334
+ size: 'medium',
335
+ closeDialog: false,
336
+ model: this.advancedData,
337
+ contents: contents
338
+ },
339
+ on: {
340
+ submit: this.hanleSubmit,
341
+ reset: this.hanleCancel
342
+ }
343
+ },
344
+ []
345
+ )
346
+ : ''
352
347
  ]
353
348
  )
354
349
  ]
@@ -802,16 +802,7 @@ export default {
802
802
  this.$refs.upload.submit();
803
803
  },
804
804
  openKkfileview(file) {
805
- let host = '';
806
- try {
807
- host = util.win.top.location.origin;
808
- } catch (error) {
809
- try {
810
- host = util.win.parent.location.origin;
811
- } catch (error) {
812
- host = util.win.location.origin;
813
- }
814
- }
805
+ let host = util.win.location.origin;
815
806
  if (this.host) {
816
807
  if (util.startWith(this.host, 'http')) {
817
808
  host = this.host;
package/src/index.js CHANGED
@@ -2,9 +2,10 @@
2
2
 
3
3
  import Button from '../packages/button/index.js';
4
4
  import ButtonGroup from '../packages/button-group/index.js';
5
- import CheckboxGroup from '../packages/checkbox-group/index.js';
5
+ import Calendar from '../packages/calendar/index.js';
6
6
  import Card from '../packages/card/index.js';
7
7
  import Cascader from '../packages/cascader/index.js';
8
+ import CheckboxGroup from '../packages/checkbox-group/index.js';
8
9
  import Clients from '../packages/clients/index.js';
9
10
  import DataTable from '../packages/data-table/index.js';
10
11
  import DataTableForm from '../packages/data-table-form/index.js';
@@ -55,9 +56,10 @@ import Wxlogin from '../packages/wxlogin/index.js';
55
56
  const components = [
56
57
  Button,
57
58
  ButtonGroup,
58
- CheckboxGroup,
59
+ Calendar,
59
60
  Card,
60
61
  Cascader,
62
+ CheckboxGroup,
61
63
  Clients,
62
64
  DataTable,
63
65
  DataTableForm,
@@ -117,13 +119,14 @@ if (typeof window !== 'undefined' && window.Vue) {
117
119
  }
118
120
 
119
121
  export default {
120
- version: '0.5.44',
122
+ version: '0.5.46',
121
123
  install,
122
124
  Button,
123
125
  ButtonGroup,
124
- CheckboxGroup,
126
+ Calendar,
125
127
  Card,
126
128
  Cascader,
129
+ CheckboxGroup,
127
130
  Clients,
128
131
  DataTable,
129
132
  DataTableForm,
package/src/utils/util.js CHANGED
@@ -1163,6 +1163,21 @@ const getHour = function (datetime) {
1163
1163
  return datetimeObj.getHours();
1164
1164
  };
1165
1165
 
1166
+ /**
1167
+ * getMyWinTop
1168
+ * @desc 获取同域的top窗口
1169
+ * @param {object} wind - window对象
1170
+ **/
1171
+ const getMyWinTop = function (wind) {
1172
+ wind = wind ? wind : win;
1173
+ try {
1174
+ wind.parent.document;
1175
+ return getMyWinTop(wind.parent);
1176
+ } catch (error) {
1177
+ return wind;
1178
+ }
1179
+ };
1180
+
1166
1181
  /**
1167
1182
  * getWeekNumber
1168
1183
  * @desc 当年第几周
@@ -2947,6 +2962,7 @@ export default {
2947
2962
  getCurrentDate,
2948
2963
  getCurrentDateTime,
2949
2964
  getHour,
2965
+ getMyWinTop,
2950
2966
  getWeekNumber,
2951
2967
  getLength,
2952
2968
  getMainConfig,