eoss-ui 0.5.81-beta1 → 0.5.81-beta11

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 +3 -1
  2. package/lib/button.js +3 -1
  3. package/lib/checkbox-group.js +3 -1
  4. package/lib/config/api.js +1 -0
  5. package/lib/data-table-form.js +3 -1
  6. package/lib/data-table.js +151 -128
  7. package/lib/date-picker.js +3 -1
  8. package/lib/dialog.js +9 -6
  9. package/lib/eoss-ui.common.js +2638 -1494
  10. package/lib/flow-group.js +6 -4
  11. package/lib/flow-list.js +3 -1
  12. package/lib/flow.js +3 -1
  13. package/lib/form.js +50 -5
  14. package/lib/handle-user.js +19 -4
  15. package/lib/handler.js +15 -4
  16. package/lib/icon.js +17 -8
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +3 -1
  19. package/lib/input.js +3 -1
  20. package/lib/login.js +11 -7
  21. package/lib/main.js +1968 -984
  22. package/lib/nav.js +3 -1
  23. package/lib/notify.js +3 -1
  24. package/lib/page.js +3 -1
  25. package/lib/pagination.js +3717 -3
  26. package/lib/player.js +3 -1
  27. package/lib/qr-code.js +3 -1
  28. package/lib/radio-group.js +3 -1
  29. package/lib/retrial-auth.js +3 -1
  30. package/lib/select-ganged.js +3 -1
  31. package/lib/select.js +4 -2
  32. package/lib/selector-panel.js +68 -18
  33. package/lib/selector.js +11 -5
  34. package/lib/sizer.js +3 -1
  35. package/lib/steps.js +3 -1
  36. package/lib/switch.js +3 -1
  37. package/lib/table-form.js +3 -1
  38. package/lib/tabs.js +3 -1
  39. package/lib/theme-chalk/base.css +1 -1
  40. package/lib/theme-chalk/button-group.css +1 -1
  41. package/lib/theme-chalk/data-table.css +1 -1
  42. package/lib/theme-chalk/form.css +1 -1
  43. package/lib/theme-chalk/handler.css +1 -1
  44. package/lib/theme-chalk/index.css +1 -1
  45. package/lib/theme-chalk/main.css +1 -1
  46. package/lib/theme-chalk/menu.css +1 -1
  47. package/lib/theme-chalk/nav.css +1 -1
  48. package/lib/theme-chalk/pagination.css +1 -1
  49. package/lib/theme-chalk/selector-panel.css +1 -1
  50. package/lib/theme-chalk/simplicity.css +1 -1
  51. package/lib/theme-chalk/sizer.css +1 -1
  52. package/lib/theme-chalk/tree.css +1 -1
  53. package/lib/theme-chalk/upload.css +1 -1
  54. package/lib/tips.js +3 -1
  55. package/lib/tree-group.js +3 -1
  56. package/lib/tree.js +3 -1
  57. package/lib/upload.js +9 -7
  58. package/lib/wujie.js +3 -1
  59. package/lib/wxlogin.js +3 -1
  60. package/package.json +2 -2
  61. package/packages/data-table/src/main.vue +55 -29
  62. package/packages/dialog/src/main.vue +4 -3
  63. package/packages/flow-group/src/main.vue +1 -1
  64. package/packages/form/src/main.vue +45 -10
  65. package/packages/handle-user/src/main.vue +10 -3
  66. package/packages/handler/src/main.vue +5 -3
  67. package/packages/icon/src/main.vue +12 -5
  68. package/packages/login/src/main.vue +10 -4
  69. package/packages/main/src/default/index.vue +17 -15
  70. package/packages/main/src/main.vue +16 -12
  71. package/packages/main/src/public/online.vue +90 -0
  72. package/packages/main/src/simplicity/apps.vue +176 -145
  73. package/packages/main/src/simplicity/avatar.vue +16 -6
  74. package/packages/main/src/simplicity/handler.vue +5 -1
  75. package/packages/main/src/simplicity/index.vue +393 -188
  76. package/packages/main/src/simplicity/menu-list.vue +74 -24
  77. package/packages/main/src/simplicity/message.vue +35 -25
  78. package/packages/main/src/simplicity/notice.vue +72 -39
  79. package/packages/main/src/simplicity/router-page.vue +53 -0
  80. package/packages/main/src/simplicity/settings.vue +1 -1
  81. package/packages/main/src/simplicity/sub-menu.vue +159 -57
  82. package/packages/main/src/simplicity/user.vue +10 -5
  83. package/packages/main/src/simplicity/userinfo.vue +1 -0
  84. package/packages/pagination/src/main.vue +20 -1
  85. package/packages/select/src/main.vue +4 -1
  86. package/packages/selector/src/main.vue +6 -2
  87. package/packages/selector-panel/src/main.vue +22 -8
  88. package/packages/selector-panel/src/selection.vue +6 -0
  89. package/packages/theme-chalk/lib/base.css +1 -1
  90. package/packages/theme-chalk/lib/button-group.css +1 -1
  91. package/packages/theme-chalk/lib/data-table.css +1 -1
  92. package/packages/theme-chalk/lib/form.css +1 -1
  93. package/packages/theme-chalk/lib/handler.css +1 -1
  94. package/packages/theme-chalk/lib/index.css +1 -1
  95. package/packages/theme-chalk/lib/main.css +1 -1
  96. package/packages/theme-chalk/lib/menu.css +1 -1
  97. package/packages/theme-chalk/lib/nav.css +1 -1
  98. package/packages/theme-chalk/lib/pagination.css +1 -1
  99. package/packages/theme-chalk/lib/selector-panel.css +1 -1
  100. package/packages/theme-chalk/lib/simplicity.css +1 -1
  101. package/packages/theme-chalk/lib/sizer.css +1 -1
  102. package/packages/theme-chalk/lib/tree.css +1 -1
  103. package/packages/theme-chalk/lib/upload.css +1 -1
  104. package/packages/theme-chalk/src/base.scss +5 -0
  105. package/packages/theme-chalk/src/button-group.scss +3 -3
  106. package/packages/theme-chalk/src/common/var.scss +6 -0
  107. package/packages/theme-chalk/src/data-table.scss +10 -10
  108. package/packages/theme-chalk/src/form.scss +2 -4
  109. package/packages/theme-chalk/src/handler.scss +5 -1
  110. package/packages/theme-chalk/src/login.scss +2 -2
  111. package/packages/theme-chalk/src/nav.scss +3 -2
  112. package/packages/theme-chalk/src/pagination.scss +7 -0
  113. package/packages/theme-chalk/src/selector-panel.scss +2 -1
  114. package/packages/theme-chalk/src/simplicity.scss +340 -58
  115. package/packages/theme-chalk/src/tree.scss +4 -2
  116. package/packages/upload/src/main.vue +3 -1
  117. package/src/config/api.js +1 -0
  118. package/src/index.js +157 -157
  119. package/CHANGELOG.md +0 -929
@@ -1,31 +1,94 @@
1
1
  <template>
2
- <div class="es-simplicity-menus">
3
- <div class="es-simplicity-menus-box">
4
- <div class="es-simplicity-menus-title">{{ text }}</div>
5
- <menu-list
6
- ref="menus"
7
- :data="menus"
8
- :menuIcon="menuIcon"
9
- :color="color"
10
- :backgroundColor="backgroundColor"
11
- @command="handleCommand"
12
- ></menu-list>
2
+ <el-drawer
3
+ class="es-simplicity-subMenus"
4
+ direction="ltr"
5
+ modal-class="es-simplicity-apps-modal"
6
+ size="auto"
7
+ :modal-append-to-body="false"
8
+ :close-on-press-escape="false"
9
+ :modal="false"
10
+ :with-header="false"
11
+ :wrapperClosable="false"
12
+ :visible.sync="show"
13
+ >
14
+ <div class="es-simplicity-menus">
15
+ <div class="es-simplicity-menus-box" :style="{ width: width + 'px' }">
16
+ <div class="es-simplicity-menus-title">
17
+ <span class="es-simplicity-menus-title-text" v-if="!fold">{{
18
+ title || text
19
+ }}</span>
20
+ <i
21
+ class="es-icon-shouqicaidan es-simplicity-menus-title-icon"
22
+ v-show="!fold"
23
+ @click="handleFold(true)"
24
+ ></i>
25
+ <i
26
+ class="es-icon-shouqicaidan-right es-simplicity-menus-title-icon"
27
+ v-show="fold"
28
+ @click="handleFold(false)"
29
+ ></i>
30
+ </div>
31
+ <menu-list
32
+ :active="active"
33
+ :data="menus"
34
+ :menuIcon="menuIcon"
35
+ :color="color"
36
+ :backgroundColor="backgroundColor"
37
+ :fold="fold"
38
+ :width="size"
39
+ @menter="
40
+ (res) => {
41
+ this.getData(res, 0, true);
42
+ }
43
+ "
44
+ @mleave="
45
+ (res) => {
46
+ this.getData(res, 0, false);
47
+ }
48
+ "
49
+ @hover="handleHover"
50
+ @command="handleCommand"
51
+ ></menu-list>
52
+ </div>
53
+ <div
54
+ class="es-simplicity-menus-view"
55
+ @mouseleave="handleLeave"
56
+ @mouseenter="handleEnter"
57
+ v-show="subMenus.length"
58
+ >
59
+ <div
60
+ class="es-simplicity-menus-box"
61
+ v-for="(item, index) in subMenus"
62
+ :key="item.id"
63
+ >
64
+ <div class="es-simplicity-menus-title">
65
+ <span class="es-simplicity-menus-title-text">{{
66
+ item.name || item.text || item.title
67
+ }}</span>
68
+ </div>
69
+ <menu-list
70
+ :active="active"
71
+ :data="[...item.children, ...item.fourthTabs]"
72
+ :menuIcon="menuIcon"
73
+ :color="color"
74
+ :backgroundColor="backgroundColor"
75
+ :width="size"
76
+ @menter="
77
+ (res) => {
78
+ getData(res, index + 1, true);
79
+ }
80
+ "
81
+ @mleave="
82
+ (res) => {
83
+ getData(res, index + 1, false);
84
+ }
85
+ "
86
+ @command="handleCommand"
87
+ ></menu-list>
88
+ </div>
89
+ </div>
13
90
  </div>
14
- <div
15
- class="es-simplicity-menus-box"
16
- v-if="subMenus.length"
17
- v-for="(item, index) in subMenus"
18
- :key="item.id"
19
- >
20
- <div class="es-simplicity-menus-title">{{ item.text || item.name }}</div>
21
- <menu-list
22
- :index="index"
23
- :data="item.data"
24
- :menuIcon="menuIcon"
25
- @command="handleCommand"
26
- ></menu-list>
27
- </div>
28
- </div>
91
+ </el-drawer>
29
92
  </template>
30
93
 
31
94
  <script>
@@ -34,6 +97,9 @@ export default {
34
97
  name: 'SubMenu',
35
98
  components: { MenuList },
36
99
  props: {
100
+ title: String,
101
+ active: String,
102
+ closed: Boolean,
37
103
  color: {
38
104
  type: [String, Array],
39
105
  default: '#fff'
@@ -51,6 +117,11 @@ export default {
51
117
  ];
52
118
  }
53
119
  },
120
+ size: {
121
+ type: Number,
122
+ default: 220
123
+ },
124
+ visible: Boolean,
54
125
  text: String,
55
126
  menuIcon: String,
56
127
  children: {
@@ -68,56 +139,87 @@ export default {
68
139
  },
69
140
  data() {
70
141
  return {
71
- active: '',
72
- subMenus: []
142
+ fold: this.closed,
143
+ width: this.size,
144
+ subMenus: [],
145
+ isEnter: false,
146
+ timer: null
73
147
  };
74
148
  },
75
149
  computed: {
76
150
  menus() {
77
151
  return [...this.children, ...this.fourthTabs];
152
+ },
153
+ show: {
154
+ get() {
155
+ return this.visible;
156
+ },
157
+ set(val) {
158
+ this.$emit('update:visible', val);
159
+ return val;
160
+ }
161
+ }
162
+ },
163
+ watch: {
164
+ closed(val) {
165
+ this.fold = val;
166
+ if (val) {
167
+ this.width = 48;
168
+ } else {
169
+ this.width = this.size;
170
+ }
78
171
  }
79
172
  },
80
- watch: {},
81
173
  created() {},
82
174
  mounted() {},
83
175
  methods: {
84
- handleCommand(res, num) {
85
- if (res.url) {
86
- if (res.urlopenmode == 1) {
87
- util.win.open(res.url);
88
- } else if (res.urlopenmode == 2) {
89
- util.win.location.href = res.url;
90
- } else {
91
- this.$emit('command', res);
92
- }
93
- } else if (this.active !== res.id) {
94
- this.active = res.id;
95
- this.subMenus = [];
176
+ handleFold(res) {
177
+ this.fold = res;
178
+ if (res) {
179
+ this.width = 48;
180
+ } else {
181
+ this.width = this.size;
96
182
  }
97
- let data = [...(res.children || []), ...(res.fourthTabs || [])];
98
- if (data.length) {
99
- if (num === undefined) {
100
- this.subMenus = [{ ...res, data: data }];
101
- } else {
102
- this.subMenus.push({ ...res, data: data });
183
+ this.$emit('update:closed', res);
184
+ },
185
+ handleCommand(res) {
186
+ this.$emit('command', res);
187
+ },
188
+ getData(res, n, is) {
189
+ this.isEnter = is;
190
+ if (is) {
191
+ this.subMenus.splice(n);
192
+ let { children, fourthTabs } = res;
193
+ if (
194
+ (children && children.length) ||
195
+ (fourthTabs && fourthTabs.length)
196
+ ) {
197
+ this.subMenus = this.subMenus.concat(res);
103
198
  }
104
- this.$emit(
105
- 'command',
106
- num === undefined ? 2 : 2 + parseInt(num, 10) + 1
107
- );
108
199
  } else {
109
- if (num === undefined) {
110
- this.$emit('command', 1);
111
- this.subMenus = [];
112
- } else {
113
- this.subMenus.splice(parseInt(num, 10) + 1, 1);
114
- this.$emit('command', 2 + parseInt(num, 10));
200
+ if (n == 0) {
201
+ clearTimeout(this.timer);
202
+ this.timer = setTimeout(() => {
203
+ if (res && !this.isEnter) {
204
+ this.subMenus = [];
205
+ }
206
+ }, 200);
115
207
  }
116
208
  }
117
209
  },
210
+ handleHover(res) {
211
+ this.isEnter = res;
212
+ //if(this)
213
+ },
118
214
  clearSubmenu() {
119
215
  this.$refs.menus.clearActive();
120
216
  this.subMenus = [];
217
+ },
218
+ handleLeave() {
219
+ this.subMenus = [];
220
+ },
221
+ handleEnter() {
222
+ this.isEnter = true;
121
223
  }
122
224
  }
123
225
  };
@@ -42,7 +42,11 @@
42
42
  </div>
43
43
  <div class="es-simplicity-notice-type" v-if="userScanBindImgUrl">
44
44
  <div class="es-simplicity-notice-title">微信公众号:</div>
45
- <img class="es-simplicity-qrcode" @click="getQrcode" :src="qrcode" />
45
+ <el-image
46
+ class="es-simplicity-qrcode"
47
+ @click="getQrcode"
48
+ :src="qrcode"
49
+ ></el-image>
46
50
  </div>
47
51
  <div class="es-simplicity-notice-type">
48
52
  <div class="es-simplicity-notice-title">接收消息类型:</div>
@@ -58,15 +62,15 @@
58
62
  修改密码 <i class="es-icon-arrow-right"></i>
59
63
  </div>
60
64
  <es-dialog title="修改密码" :visible.sync="visible">
61
- <userinfo v-if="visible" :contents="contents" :value="userInfo">
62
- </userinfo>
65
+ <user-info v-if="visible" :contents="contents" :value="userInfo">
66
+ </user-info>
63
67
  </es-dialog>
64
68
  </div>
65
69
  </template>
66
70
 
67
71
  <script>
68
72
  import avatar from './avatar.vue';
69
- import userinfo from './userinfo.vue';
73
+ import userInfo from './userinfo.vue';
70
74
  import util from 'eoss-ui/src/utils/util';
71
75
  import { debounce } from 'throttle-debounce';
72
76
  import {
@@ -76,7 +80,7 @@ import {
76
80
  } from 'eoss-ui/src/config/api.js';
77
81
  export default {
78
82
  name: 'User',
79
- components: { avatar, userinfo },
83
+ components: { avatar, userInfo },
80
84
  props: {
81
85
  notify: String,
82
86
  notifyList: Array,
@@ -133,6 +137,7 @@ export default {
133
137
  this.checkPassword = results.checkPassword;
134
138
  this.checkPasswordMsg = results.checkPasswordMsg;
135
139
  this.headImgCode = results.headImgCode || undefined;
140
+ this.$emit('success', results);
136
141
  } else {
137
142
  let msg = res.msg || '系统错误,请联系管理员!';
138
143
  this.$message.error(msg);
@@ -16,6 +16,7 @@ import { updateUserInfo } from 'eoss-ui/src/config/api.js';
16
16
  import util from 'eoss-ui/src/utils/util';
17
17
 
18
18
  export default {
19
+ name: 'UserInfo',
19
20
  props: {
20
21
  showNotify: {
21
22
  type: Boolean,
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <el-pagination
3
3
  class="es-pagination"
4
+ :class="{ 'es-pagination-complete': isComplete && position != 'center' }"
4
5
  v-bind="$attrs"
5
6
  :current-page="pageNum"
6
7
  :page-size="pageSize"
@@ -18,10 +19,28 @@
18
19
  </el-pagination>
19
20
  </template>
20
21
  <script>
22
+ import util from 'eoss-ui/src/utils/util';
23
+ const pageLayout =
24
+ util.win.top.tableLayout ||
25
+ util.win.tableLayout ||
26
+ 'prev, pager, next, sizes, total';
21
27
  export default {
22
28
  name: 'EsPagination',
23
29
  inheritAttrs: false,
30
+ computed: {
31
+ isComplete() {
32
+ return (
33
+ this.layout.indexOf('total') > -1 &&
34
+ this.layout.indexOf('sizes') > -1 &&
35
+ this.layout.indexOf('prev') > -1 &&
36
+ this.layout.indexOf('pager') > -1 &&
37
+ this.layout.indexOf('next') > -1 &&
38
+ this.layout.indexOf('jumper') > -1
39
+ );
40
+ }
41
+ },
24
42
  props: {
43
+ position: String,
25
44
  // 当前页码
26
45
  pageNum: {
27
46
  type: Number,
@@ -46,7 +65,7 @@ export default {
46
65
  // 自定义排版
47
66
  layout: {
48
67
  type: String,
49
- default: 'prev, pager, next, sizes, total'
68
+ default: pageLayout
50
69
  },
51
70
  // 只有一页时是否隐藏
52
71
  hideOnSinglePage: {
@@ -498,7 +498,10 @@ export default {
498
498
  }
499
499
  }
500
500
  } else {
501
- if (typeof data === 'string' || !data.length) {
501
+ if (
502
+ typeof data === 'string' ||
503
+ (!data.length && !this.sysCode && !this.url)
504
+ ) {
502
505
  return value;
503
506
  }
504
507
  if (Array.isArray(data) && data.length) {
@@ -86,7 +86,7 @@
86
86
  'es-pointer': !filterable,
87
87
  'es-zindex-2': focus
88
88
  }"
89
- :tabindex="multiple ? '-1' : null"
89
+ :tabindex="tabindex"
90
90
  v-popover:popover
91
91
  @dblclick.native="openDialog"
92
92
  @focus="handleFocus"
@@ -129,7 +129,7 @@
129
129
  'es-plain': this.plain,
130
130
  'es-pointer': !filterable
131
131
  }"
132
- :tabindex="multiple ? '-1' : null"
132
+ :tabindex="tabindex"
133
133
  @dblclick.native="openDialog"
134
134
  @clear="handleClear"
135
135
  >
@@ -296,6 +296,10 @@ export default {
296
296
  return ['enterprise', 'person'];
297
297
  }
298
298
  },
299
+ tabindex: {
300
+ type: [String, Number],
301
+ default: -1
302
+ },
299
303
  filterable: {
300
304
  type: Boolean,
301
305
  default: false
@@ -30,6 +30,9 @@
30
30
  class="es-selector-selection-toolbar"
31
31
  v-if="multiple || isShowTree"
32
32
  >
33
+ <el-form-item>
34
+ <es-switch v-model="showDisabled" :data="options"></es-switch>
35
+ </el-form-item>
33
36
  <el-form-item>
34
37
  <el-checkbox
35
38
  v-show="multiple && !max"
@@ -78,6 +81,7 @@
78
81
  :label-key="labelKey"
79
82
  :multiple="mix ? mix : multiple"
80
83
  :max="max"
84
+ :showDisabled="showDisabled"
81
85
  ></selection>
82
86
  <selection
83
87
  v-model="checkeds"
@@ -158,12 +162,7 @@ export default {
158
162
  default: false
159
163
  },
160
164
  //页签
161
- tabs: {
162
- type: Object,
163
- default() {
164
- return;
165
- }
166
- },
165
+ tabs: Object,
167
166
  filtrate: {
168
167
  type: [Boolean, Object],
169
168
  default() {
@@ -228,7 +227,18 @@ export default {
228
227
  activeName: '',
229
228
  selections: [],
230
229
  checkboxs: [],
231
- checkeds: null
230
+ checkeds: null,
231
+ showDisabled: true,
232
+ options: [
233
+ {
234
+ value: true,
235
+ name: '展示'
236
+ },
237
+ {
238
+ value: false,
239
+ name: '过滤'
240
+ }
241
+ ]
232
242
  };
233
243
  },
234
244
  computed: {
@@ -815,7 +825,11 @@ export default {
815
825
  if (res) {
816
826
  if (this.isShowTree) {
817
827
  this.nodeData.checkAll = true;
818
- let checkeds = this.checkeds.concat(this.checkboxs);
828
+ let checkeds = this.checkeds.concat(
829
+ this.checkboxs.filter((item) => {
830
+ return item.disabled !== true;
831
+ })
832
+ );
819
833
  if (checkeds.length > 0) {
820
834
  this.checkeds = util.arrUnique(
821
835
  checkeds,
@@ -11,6 +11,7 @@
11
11
  <el-radio
12
12
  v-for="(item, index) in data"
13
13
  :key="index"
14
+ v-show="item.disabled ? showDisabled : true"
14
15
  v-bind="getprops($attrs, item)"
15
16
  :label="isObject || typeof item == 'string' ? item : item[valKey]"
16
17
  :disabled="typeof item == 'string' ? false : item.disabled"
@@ -33,6 +34,7 @@
33
34
  <el-checkbox
34
35
  v-for="(item, index) in data"
35
36
  :key="index"
37
+ v-show="item.disabled ? showDisabled : true"
36
38
  v-bind="getprops($attrs, item)"
37
39
  :label="isObject || typeof item == 'string' ? item : item[valKey]"
38
40
  :disabled="typeof item == 'string' ? false : item.disabled"
@@ -54,6 +56,10 @@ export default {
54
56
  name: 'Selection',
55
57
  props: {
56
58
  value: [String, Array, Object],
59
+ showDisabled: {
60
+ type: Boolean,
61
+ default: true
62
+ },
57
63
  genre: String,
58
64
  valueKey: {
59
65
  type: String,