eoss-ui 0.5.81-beta2 → 0.5.81-beta21

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 (131) hide show
  1. package/lib/button-group.js +76 -53
  2. package/lib/button.js +51 -46
  3. package/lib/checkbox-group.js +49 -45
  4. package/lib/clients.js +4 -3
  5. package/lib/config/api.js +3 -1
  6. package/lib/data-table-form.js +49 -45
  7. package/lib/data-table.js +471 -256
  8. package/lib/date-picker.js +49 -45
  9. package/lib/dialog.js +71 -70
  10. package/lib/eoss-ui.common.js +4165 -2449
  11. package/lib/flow-group.js +98 -63
  12. package/lib/flow-list.js +50 -46
  13. package/lib/flow.js +152 -83
  14. package/lib/form.js +96 -49
  15. package/lib/handle-user.js +66 -49
  16. package/lib/handler.js +61 -48
  17. package/lib/icon.js +49 -45
  18. package/lib/index.js +1 -1
  19. package/lib/input-number.js +49 -45
  20. package/lib/input.js +49 -45
  21. package/lib/login.js +64 -53
  22. package/lib/main.js +2677 -1479
  23. package/lib/menu.js +1 -1
  24. package/lib/nav.js +49 -45
  25. package/lib/notify.js +54 -50
  26. package/lib/page.js +49 -45
  27. package/lib/pagination.js +3719 -3
  28. package/lib/player.js +54 -50
  29. package/lib/qr-code.js +49 -45
  30. package/lib/radio-group.js +49 -45
  31. package/lib/retrial-auth.js +50 -46
  32. package/lib/select-ganged.js +49 -45
  33. package/lib/select.js +50 -46
  34. package/lib/selector-panel.js +117 -65
  35. package/lib/selector.js +493 -422
  36. package/lib/sizer.js +49 -45
  37. package/lib/steps.js +49 -45
  38. package/lib/switch.js +49 -45
  39. package/lib/table-form.js +49 -45
  40. package/lib/tabs.js +86 -79
  41. package/lib/theme-chalk/base.css +1 -1
  42. package/lib/theme-chalk/button-group.css +1 -1
  43. package/lib/theme-chalk/data-table.css +1 -1
  44. package/lib/theme-chalk/handler.css +1 -1
  45. package/lib/theme-chalk/index.css +1 -1
  46. package/lib/theme-chalk/main.css +1 -1
  47. package/lib/theme-chalk/menu.css +1 -1
  48. package/lib/theme-chalk/nav.css +1 -1
  49. package/lib/theme-chalk/pagination.css +1 -1
  50. package/lib/theme-chalk/selector-panel.css +1 -1
  51. package/lib/theme-chalk/simplicity.css +1 -1
  52. package/lib/theme-chalk/sizer.css +1 -1
  53. package/lib/theme-chalk/tabs.css +1 -1
  54. package/lib/theme-chalk/toolbar.css +1 -1
  55. package/lib/theme-chalk/tree.css +1 -1
  56. package/lib/theme-chalk/upload.css +1 -1
  57. package/lib/tips.js +49 -45
  58. package/lib/tree-group.js +49 -45
  59. package/lib/tree.js +49 -45
  60. package/lib/upload.js +59 -55
  61. package/lib/wujie.js +49 -45
  62. package/lib/wxlogin.js +49 -45
  63. package/package.json +3 -3
  64. package/packages/button/src/main.vue +2 -1
  65. package/packages/button-group/src/main.vue +8 -6
  66. package/packages/clients/src/main.vue +2 -1
  67. package/packages/data-table/src/column.vue +132 -53
  68. package/packages/data-table/src/formItem.vue +430 -0
  69. package/packages/data-table/src/main.vue +85 -45
  70. package/packages/data-table/src/sizer.vue +2 -0
  71. package/packages/dialog/src/main.vue +17 -23
  72. package/packages/flow/src/main.vue +32 -17
  73. package/packages/flow-group/src/main.vue +18 -11
  74. package/packages/form/src/main.vue +45 -10
  75. package/packages/handle-user/src/main.vue +10 -3
  76. package/packages/handler/src/main.vue +5 -3
  77. package/packages/login/src/main.vue +13 -6
  78. package/packages/main/src/default/index.vue +102 -179
  79. package/packages/main/src/main.vue +243 -16
  80. package/packages/main/src/public/online.vue +90 -0
  81. package/packages/main/src/simplicity/apps.vue +176 -145
  82. package/packages/main/src/simplicity/avatar.vue +16 -6
  83. package/packages/main/src/simplicity/handler.vue +6 -2
  84. package/packages/main/src/simplicity/index.vue +555 -344
  85. package/packages/main/src/simplicity/menu-list.vue +75 -24
  86. package/packages/main/src/simplicity/message.vue +35 -25
  87. package/packages/main/src/simplicity/notice.vue +72 -39
  88. package/packages/main/src/simplicity/router-page.vue +44 -0
  89. package/packages/main/src/simplicity/settings.vue +1 -1
  90. package/packages/main/src/simplicity/sub-menu.vue +169 -54
  91. package/packages/main/src/simplicity/user.vue +10 -5
  92. package/packages/main/src/simplicity/userinfo.vue +1 -0
  93. package/packages/menu/src/main.vue +4 -3
  94. package/packages/pagination/src/main.vue +20 -1
  95. package/packages/select/src/main.vue +4 -1
  96. package/packages/selector/src/main.vue +152 -136
  97. package/packages/selector-panel/src/main.vue +23 -9
  98. package/packages/selector-panel/src/selection.vue +8 -2
  99. package/packages/tabs/src/main.vue +14 -14
  100. package/packages/theme-chalk/lib/base.css +1 -1
  101. package/packages/theme-chalk/lib/button-group.css +1 -1
  102. package/packages/theme-chalk/lib/data-table.css +1 -1
  103. package/packages/theme-chalk/lib/handler.css +1 -1
  104. package/packages/theme-chalk/lib/index.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/nav.css +1 -1
  108. package/packages/theme-chalk/lib/pagination.css +1 -1
  109. package/packages/theme-chalk/lib/selector-panel.css +1 -1
  110. package/packages/theme-chalk/lib/simplicity.css +1 -1
  111. package/packages/theme-chalk/lib/sizer.css +1 -1
  112. package/packages/theme-chalk/lib/tabs.css +1 -1
  113. package/packages/theme-chalk/lib/toolbar.css +1 -1
  114. package/packages/theme-chalk/lib/tree.css +1 -1
  115. package/packages/theme-chalk/lib/upload.css +1 -1
  116. package/packages/theme-chalk/src/base.scss +5 -0
  117. package/packages/theme-chalk/src/button-group.scss +18 -4
  118. package/packages/theme-chalk/src/common/var.scss +9 -2
  119. package/packages/theme-chalk/src/data-table.scss +60 -23
  120. package/packages/theme-chalk/src/handler.scss +5 -1
  121. package/packages/theme-chalk/src/login.scss +2 -2
  122. package/packages/theme-chalk/src/nav.scss +3 -2
  123. package/packages/theme-chalk/src/pagination.scss +7 -0
  124. package/packages/theme-chalk/src/selector-panel.scss +2 -1
  125. package/packages/theme-chalk/src/simplicity.scss +355 -58
  126. package/packages/theme-chalk/src/tabs.scss +24 -28
  127. package/packages/theme-chalk/src/toolbar.scss +16 -4
  128. package/packages/theme-chalk/src/tree.scss +4 -2
  129. package/packages/upload/src/main.vue +3 -1
  130. package/src/config/api.js +3 -1
  131. package/src/index.js +1 -1
@@ -1,31 +1,97 @@
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>
13
- </div>
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
14
  <div
15
- class="es-simplicity-menus-box"
16
- v-if="subMenus.length"
17
- v-for="(item, index) in subMenus"
18
- :key="item.id"
15
+ class="es-simplicity-menus"
16
+ :class="{ 'es-simplicity-menus-plus': mode == 'plus' }"
19
17
  >
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>
18
+ <div class="es-simplicity-menus-box" :style="{ width: width + 'px' }">
19
+ <div class="es-simplicity-menus-title">
20
+ <span class="es-simplicity-menus-title-text" v-if="!fold">{{
21
+ title || text
22
+ }}</span>
23
+ <i
24
+ class="es-icon-shouqicaidan es-simplicity-menus-title-icon"
25
+ v-show="!fold"
26
+ @click="handleFold(true)"
27
+ ></i>
28
+ <i
29
+ class="es-icon-shouqicaidan-right es-simplicity-menus-title-icon"
30
+ v-show="fold"
31
+ @click="handleFold(false)"
32
+ ></i>
33
+ </div>
34
+ <menu-list
35
+ :active="actives[0]"
36
+ :data="menus"
37
+ :menuIcon="menuIcon"
38
+ :color="color"
39
+ :backgroundColor="backgroundColor"
40
+ :fold="fold"
41
+ :width="size"
42
+ @menter="
43
+ (res) => {
44
+ this.getData(res, 0, true);
45
+ }
46
+ "
47
+ @mleave="
48
+ (res) => {
49
+ this.getData(res, 0, false);
50
+ }
51
+ "
52
+ @hover="handleHover"
53
+ @command="handleCommand"
54
+ ></menu-list>
55
+ </div>
56
+ <div
57
+ class="es-simplicity-menus-view"
58
+ @mouseleave="handleLeave"
59
+ @mouseenter="handleEnter"
60
+ v-show="subMenus.length"
61
+ >
62
+ <div
63
+ class="es-simplicity-menus-box"
64
+ v-for="(item, index) in subMenus"
65
+ :key="item.id"
66
+ >
67
+ <div class="es-simplicity-menus-title">
68
+ <span class="es-simplicity-menus-title-text">{{
69
+ item.name || item.text || item.title
70
+ }}</span>
71
+ </div>
72
+ <menu-list
73
+ :active="actives[index + 1]"
74
+ :data="[...item.children, ...item.fourthTabs]"
75
+ :menuIcon="menuIcon"
76
+ :color="color"
77
+ :backgroundColor="backgroundColor"
78
+ :width="size"
79
+ @menter="
80
+ (res) => {
81
+ getData(res, index + 1, true);
82
+ }
83
+ "
84
+ @mleave="
85
+ (res) => {
86
+ getData(res, index + 1, false);
87
+ }
88
+ "
89
+ @command="handleCommand"
90
+ ></menu-list>
91
+ </div>
92
+ </div>
27
93
  </div>
28
- </div>
94
+ </el-drawer>
29
95
  </template>
30
96
 
31
97
  <script>
@@ -34,6 +100,10 @@ export default {
34
100
  name: 'SubMenu',
35
101
  components: { MenuList },
36
102
  props: {
103
+ mode: String,
104
+ title: String,
105
+ active: String,
106
+ closed: Boolean,
37
107
  color: {
38
108
  type: [String, Array],
39
109
  default: '#fff'
@@ -51,6 +121,11 @@ export default {
51
121
  ];
52
122
  }
53
123
  },
124
+ size: {
125
+ type: Number,
126
+ default: 220
127
+ },
128
+ visible: Boolean,
54
129
  text: String,
55
130
  menuIcon: String,
56
131
  children: {
@@ -68,56 +143,96 @@ export default {
68
143
  },
69
144
  data() {
70
145
  return {
71
- active: '',
72
- subMenus: []
146
+ fold: this.closed,
147
+ width: this.size,
148
+ subMenus: [],
149
+ isEnter: false,
150
+ timer: null,
151
+ actives: []
73
152
  };
74
153
  },
75
154
  computed: {
76
155
  menus() {
77
156
  return [...this.children, ...this.fourthTabs];
157
+ },
158
+ show: {
159
+ get() {
160
+ return this.visible;
161
+ },
162
+ set(val) {
163
+ this.$emit('update:visible', val);
164
+ return val;
165
+ }
166
+ }
167
+ },
168
+ watch: {
169
+ closed(val) {
170
+ this.fold = val;
171
+ if (val) {
172
+ this.width = 48;
173
+ } else {
174
+ this.width = this.size;
175
+ }
78
176
  }
79
177
  },
80
- watch: {},
81
178
  created() {},
82
179
  mounted() {},
83
180
  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 = [];
181
+ handleFold(res) {
182
+ this.fold = res;
183
+ if (res) {
184
+ this.width = 48;
185
+ } else {
186
+ this.width = this.size;
96
187
  }
97
- let data = [...(res.children || []), ...(res.fourthTabs || [])];
98
- if (data.length) {
99
- if (num === undefined) {
100
- this.subMenus = [{ ...res, data: data }];
188
+ this.$emit('update:closed', res);
189
+ },
190
+ handleCommand(res) {
191
+ this.$emit('command', res);
192
+ },
193
+ getData(res, n, is) {
194
+ this.isEnter = is;
195
+ if (is) {
196
+ this.actives.splice(n);
197
+ if (this.actives[n]) {
198
+ this.actives[n] = res.id;
101
199
  } else {
102
- this.subMenus.push({ ...res, data: data });
200
+ this.actives.push(res.id);
201
+ }
202
+ this.subMenus.splice(n);
203
+ let { children, fourthTabs } = res;
204
+ if (
205
+ (children && children.length) ||
206
+ (fourthTabs && fourthTabs.length)
207
+ ) {
208
+ this.subMenus = this.subMenus.concat(res);
103
209
  }
104
- this.$emit(
105
- 'command',
106
- num === undefined ? 2 : 2 + parseInt(num, 10) + 1
107
- );
108
210
  } 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));
211
+ if (n == 0) {
212
+ clearTimeout(this.timer);
213
+ this.timer = setTimeout(() => {
214
+ if (res && !this.isEnter) {
215
+ this.subMenus = [];
216
+ this.actives = [];
217
+ }
218
+ }, 300);
115
219
  }
116
220
  }
117
221
  },
222
+ handleHover(res) {
223
+ this.isEnter = res;
224
+ //if(this)
225
+ },
118
226
  clearSubmenu() {
119
227
  this.$refs.menus.clearActive();
120
228
  this.subMenus = [];
229
+ },
230
+ handleLeave() {
231
+ this.subMenus = [];
232
+ this.actives = [];
233
+ },
234
+ handleEnter() {
235
+ this.isEnter = true;
121
236
  }
122
237
  }
123
238
  };
@@ -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,
@@ -109,9 +109,10 @@ export default {
109
109
  } else {
110
110
  this.$nextTick(() => {
111
111
  let w = 0;
112
- Array.from(this.$refs.menu.$el.children).forEach((item) => {
113
- w += item.getBoundingClientRect().width;
114
- });
112
+ this.$refs.menu &&
113
+ Array.from(this.$refs.menu.$el.children).forEach((item) => {
114
+ w += item.getBoundingClientRect().width;
115
+ });
115
116
  const styles = window.getComputedStyle(this.$refs.menu.$el);
116
117
  w += parseFloat(styles.paddingLeft) + parseFloat(styles.paddingRight);
117
118
  if (w > this.$refs.esMenu.$el.getBoundingClientRect().width) {
@@ -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 paginationLayout =
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: paginationLayout
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) {