eoss 0.1.0-alpha.21 → 0.1.0-alpha.23

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 (213) hide show
  1. package/lib/account-login.js +125 -125
  2. package/lib/alert.js +2 -2
  3. package/lib/aside.js +2 -2
  4. package/lib/autocomplete.js +239 -239
  5. package/lib/avatar.js +2 -2
  6. package/lib/backtop.js +4 -4
  7. package/lib/badge.js +2 -2
  8. package/lib/breadcrumb-item.js +2 -2
  9. package/lib/breadcrumb.js +2 -2
  10. package/lib/button-group.js +2 -2
  11. package/lib/button.js +2 -2
  12. package/lib/ca-login.js +6 -6
  13. package/lib/calendar.js +2 -2
  14. package/lib/card.js +2 -2
  15. package/lib/carousel-item.js +22 -22
  16. package/lib/carousel.js +40 -26
  17. package/lib/cascader-panel.js +12 -12
  18. package/lib/cascader.js +506 -492
  19. package/lib/checkbox-button.js +2 -2
  20. package/lib/checkbox-group.js +137 -137
  21. package/lib/checkbox.js +2 -2
  22. package/lib/col.js +2 -2
  23. package/lib/collapse-item.js +1224 -1030
  24. package/lib/collapse.js +1225 -1030
  25. package/lib/color-picker.js +12 -12
  26. package/lib/container.js +2 -2
  27. package/lib/cron.js +2 -2
  28. package/lib/data-table.js +121 -121
  29. package/lib/date-picker.js +225 -225
  30. package/lib/dialog.js +17 -17
  31. package/lib/divider.js +2 -2
  32. package/lib/drawer.js +6 -6
  33. package/lib/dropdown-item.js +2 -2
  34. package/lib/dropdown-menu.js +10 -10
  35. package/lib/dropdown.js +13 -13
  36. package/lib/email-login.js +365 -365
  37. package/lib/empty.js +2 -2
  38. package/lib/eoss.common.js +21402 -20724
  39. package/lib/flip.js +2 -2
  40. package/lib/flow-group.js +251 -251
  41. package/lib/flow.js +15933 -18946
  42. package/lib/flows.js +9195 -0
  43. package/lib/footer.js +2 -2
  44. package/lib/form-item.js +28 -17
  45. package/lib/form.js +1228 -1033
  46. package/lib/header.js +2 -2
  47. package/lib/icon.js +129 -129
  48. package/lib/icons.js +4 -4
  49. package/lib/image-viewer.js +6 -6
  50. package/lib/image.js +4 -4
  51. package/lib/index.js +1 -1
  52. package/lib/infinite-scroll.js +4 -4
  53. package/lib/input-number.js +11 -11
  54. package/lib/input.js +28 -14
  55. package/lib/link.js +2 -2
  56. package/lib/loading.js +6 -6
  57. package/lib/login.js +277 -229
  58. package/lib/lowcode.js +964 -325
  59. package/lib/main.js +634 -565
  60. package/lib/marquee.js +6 -6
  61. package/lib/menu-item-group.js +2 -2
  62. package/lib/menu-item.js +2 -2
  63. package/lib/menu.js +1934 -1934
  64. package/lib/message-box.js +12 -12
  65. package/lib/message.js +10 -10
  66. package/lib/notification.js +16 -16
  67. package/lib/option-group.js +2 -2
  68. package/lib/option.js +6 -6
  69. package/lib/page-header.js +2 -2
  70. package/lib/pagination.js +16 -16
  71. package/lib/phone-login.js +127 -127
  72. package/lib/popconfirm.js +4 -4
  73. package/lib/popover.js +219 -219
  74. package/lib/progress.js +2 -2
  75. package/lib/qr-code.js +8 -8
  76. package/lib/qrcode-login.js +119 -119
  77. package/lib/radio-button.js +2 -2
  78. package/lib/radio-group.js +119 -119
  79. package/lib/radio.js +2 -2
  80. package/lib/rate.js +6 -6
  81. package/lib/row.js +2 -2
  82. package/lib/scrollbar.js +46 -32
  83. package/lib/select.js +823 -796
  84. package/lib/selector-panel.js +141 -141
  85. package/lib/selector.js +1040 -160
  86. package/lib/slider.js +2 -2
  87. package/lib/step.js +1225 -1030
  88. package/lib/steps.js +6 -6
  89. package/lib/submenu.js +27 -27
  90. package/lib/switch.js +15 -15
  91. package/lib/tab-pane.js +2 -2
  92. package/lib/table-column.js +8 -8
  93. package/lib/table.js +2530 -2516
  94. package/lib/tabs.js +28 -14
  95. package/lib/tag.js +2 -2
  96. package/lib/theme-chalk/autocomplete.css +1 -1
  97. package/lib/theme-chalk/base.css +1 -1
  98. package/lib/theme-chalk/cascader-panel.css +1 -1
  99. package/lib/theme-chalk/cascader.css +1 -1
  100. package/lib/theme-chalk/checkbox-group.css +1 -1
  101. package/lib/theme-chalk/date-picker.css +1 -1
  102. package/lib/theme-chalk/descriptions-item.css +1 -1
  103. package/lib/theme-chalk/descriptions.css +1 -1
  104. package/lib/theme-chalk/empty.css +1 -1
  105. package/lib/theme-chalk/flow.css +1 -1
  106. package/lib/theme-chalk/flows.css +1 -0
  107. package/lib/theme-chalk/form.css +1 -1
  108. package/lib/theme-chalk/index.css +1 -1
  109. package/lib/theme-chalk/input-number.css +1 -1
  110. package/lib/theme-chalk/input.css +1 -1
  111. package/lib/theme-chalk/lowcode.css +1 -1
  112. package/lib/theme-chalk/main.css +1 -1
  113. package/lib/theme-chalk/menu.css +1 -1
  114. package/lib/theme-chalk/message-box.css +1 -1
  115. package/lib/theme-chalk/message.css +1 -1
  116. package/lib/theme-chalk/notification.css +1 -1
  117. package/lib/theme-chalk/pagination.css +1 -1
  118. package/lib/theme-chalk/scrollbar.css +1 -1
  119. package/lib/theme-chalk/select.css +1 -1
  120. package/lib/theme-chalk/selector-panel.css +1 -1
  121. package/lib/theme-chalk/selector.css +1 -1
  122. package/lib/theme-chalk/slider.css +1 -1
  123. package/lib/theme-chalk/table.css +1 -1
  124. package/lib/theme-chalk/tabs.css +1 -1
  125. package/lib/theme-chalk/time-picker.css +1 -1
  126. package/lib/theme-chalk/time-select.css +1 -1
  127. package/lib/theme-chalk/timeline-item.css +1 -1
  128. package/lib/theme-chalk/transfer.css +1 -1
  129. package/lib/theme-chalk/tree.css +1 -1
  130. package/lib/theme-chalk/upload.css +1 -1
  131. package/lib/time-picker.js +16 -16
  132. package/lib/time-select.js +15 -15
  133. package/lib/timeline-item.js +2 -2
  134. package/lib/timeline.js +2 -2
  135. package/lib/tips.js +129 -129
  136. package/lib/toolbar.js +4 -4
  137. package/lib/tooltip.js +220 -220
  138. package/lib/transfer.js +8 -8
  139. package/lib/tree-group.js +124 -124
  140. package/lib/tree.js +144 -144
  141. package/lib/upload.js +155 -155
  142. package/lib/utils/resize-event.js +20 -6
  143. package/package.json +3 -1
  144. package/packages/carousel/src/carousel.vue +2 -2
  145. package/packages/flow/index.js +4 -4
  146. package/packages/flow/src/component/FreeCirculation.vue +4 -3
  147. package/packages/flow/src/component/SendMsg.vue +2 -4
  148. package/packages/flow/src/component/opinions.vue +203 -226
  149. package/packages/flow/src/component/taskUnionExamine.vue +2 -4
  150. package/packages/flow/src/freeStartFlow.vue +2 -2
  151. package/packages/flow/src/selectUser.vue +36 -1
  152. package/packages/flow/src/supervise.vue +4 -2
  153. package/packages/flows/index.js +7 -0
  154. package/packages/flows/readme.md +600 -0
  155. package/packages/flows/src/components/basis.vue +108 -0
  156. package/packages/flows/src/components/distribute.vue +42 -0
  157. package/packages/flows/src/components/opinions-file.vue +123 -0
  158. package/packages/{flow-copy/src/component → flows/src/components}/opinions.vue +227 -204
  159. package/packages/flows/src/components/quick-actions.vue +64 -0
  160. package/packages/flows/src/components/reject.vue +83 -0
  161. package/packages/flows/src/components/start-flow.vue +210 -0
  162. package/packages/flows/src/flow.vue +510 -0
  163. package/packages/{flow/src/flow.vue → flows/src/flows.vue} +40 -1327
  164. package/packages/form/src/form-item.vue +9 -2
  165. package/packages/form/src/label-wrap.vue +4 -1
  166. package/packages/login/src/login.vue +61 -32
  167. package/packages/lowcode/src/aside.vue +15 -2
  168. package/packages/lowcode/src/editor.vue +187 -0
  169. package/packages/lowcode/src/lowcode.vue +195 -41
  170. package/packages/lowcode/src/pages.vue +174 -26
  171. package/packages/lowcode/src/toolbar.vue +3 -18
  172. package/packages/main/src/components/pages.vue +97 -65
  173. package/packages/main/src/components/router-page.vue +0 -2
  174. package/packages/main/src/gzw.vue +3 -2
  175. package/packages/main/src/minxs.js +72 -51
  176. package/packages/menu/src/menu.vue +4 -4
  177. package/packages/select/src/select.vue +5 -0
  178. package/packages/selector/src/selector.vue +147 -17
  179. package/packages/theme-chalk/src/base.scss +6 -0
  180. package/packages/theme-chalk/src/checkbox-group.scss +1 -0
  181. package/packages/theme-chalk/src/common/var.scss +1 -1
  182. package/packages/theme-chalk/src/flow.scss +7 -4
  183. package/packages/theme-chalk/src/flows.scss +141 -0
  184. package/packages/theme-chalk/src/form.scss +1 -1
  185. package/packages/theme-chalk/src/index.scss +1 -0
  186. package/packages/theme-chalk/src/input.scss +1 -0
  187. package/packages/theme-chalk/src/lowcode.scss +21 -18
  188. package/packages/theme-chalk/src/select.scss +3 -1
  189. package/packages/theme-chalk/src/selector.scss +11 -5
  190. package/src/index.js +4 -1
  191. package/src/utils/resize-event.js +21 -7
  192. package/packages/flow/src/component/quick-actions.vue +0 -1168
  193. package/packages/flow-copy/index.js +0 -7
  194. package/packages/flow-copy/src/component/Circulate.vue +0 -452
  195. package/packages/flow-copy/src/component/CustomPreset.vue +0 -333
  196. package/packages/flow-copy/src/component/FreeCirculation.vue +0 -275
  197. package/packages/flow-copy/src/component/Preset.vue +0 -273
  198. package/packages/flow-copy/src/component/SendMsg.vue +0 -290
  199. package/packages/flow-copy/src/component/TimeLimit.vue +0 -205
  200. package/packages/flow-copy/src/component/taskUnionExamine.vue +0 -818
  201. package/packages/flow-copy/src/freeStartFlow.vue +0 -2912
  202. package/packages/flow-copy/src/processForm.vue +0 -1411
  203. package/packages/flow-copy/src/processReject.vue +0 -319
  204. package/packages/flow-copy/src/reset.vue +0 -944
  205. package/packages/flow-copy/src/selectUser.vue +0 -513
  206. package/packages/flow-copy/src/startTaskRead.vue +0 -723
  207. package/packages/flow-copy/src/supervise.vue +0 -182
  208. package/packages/flow-copy/src/table.vue +0 -65
  209. /package/packages/{flow-copy → flow}/src/component/FileList.vue +0 -0
  210. /package/packages/{flow-copy → flow}/src/main.vue +0 -0
  211. /package/packages/{flow-copy/src → flows/src/components}/form.vue +0 -0
  212. /package/packages/{flow/src/component → flows/src/components}/message.vue +0 -0
  213. /package/packages/{flow/src/component → flows/src/components}/opinions-list.vue +0 -0
@@ -137,6 +137,7 @@
137
137
  v-if="suffix"
138
138
  class="es-input__suffix-button"
139
139
  v-bind="suffix"
140
+ @click.stop="handleSuffixClick"
140
141
  ></es-button>
141
142
  </template>
142
143
  </es-input>
@@ -1682,6 +1683,10 @@ export default {
1682
1683
  return processedValue.join(this.decollator);
1683
1684
  }
1684
1685
  return value;
1686
+ },
1687
+ handleSuffixClick() {
1688
+ this.visible = false;
1689
+ this.$emit('suffix-click');
1685
1690
  }
1686
1691
  },
1687
1692
 
@@ -58,22 +58,42 @@
58
58
  ref="tags"
59
59
  class="es-selector__tags"
60
60
  :class="{ 'es-selector-edit': !readonly }"
61
+ :style="styles"
61
62
  >
62
- <transition-group>
63
- <es-tag
64
- v-for="(item, index) in selected"
65
- :key="getValueKey(item)"
66
- :closable="!_disabled && !readonly && selected.length > min"
67
- type="info"
68
- disable-transitions
69
- @close="deleteTag($event, item, index)"
70
- >
71
- <span class="es-select__tags-text">{{ getLabel(item) }}</span>
72
- </es-tag>
73
- </transition-group>
63
+ <div
64
+ class="es-selector__tags--wrapper"
65
+ ref="tagsWrapper"
66
+ :style="tagsStyle"
67
+ @scroll="handleScroll"
68
+ @wheel="handleWheel"
69
+ >
70
+ <transition-group>
71
+ <es-tag
72
+ v-for="(item, index) in selected"
73
+ :key="getValueKey(item)"
74
+ :closable="!_disabled && !readonly && selected.length > min"
75
+ type="info"
76
+ disable-transitions
77
+ @close="deleteTag($event, item, index)"
78
+ >
79
+ <span class="es-select__tags-text">{{ getLabel(item) }}</span>
80
+ </es-tag>
81
+ </transition-group>
82
+ </div>
83
+ <bar
84
+ v-if="barSize"
85
+ vertical
86
+ :style="{
87
+ top: '2px',
88
+ bottom: '2px'
89
+ }"
90
+ :move="moveTo"
91
+ :size="barSize"
92
+ ></bar>
74
93
  </div>
75
94
  <es-dialog
76
95
  v-if="!readonly"
96
+ class="es-selector-dialog"
77
97
  :title="title"
78
98
  :visible.sync="visible"
79
99
  :width="width"
@@ -81,7 +101,6 @@
81
101
  :css="false"
82
102
  :append-to-body="true"
83
103
  :close-on-click-modal="false"
84
- class="es-selector-dialog"
85
104
  >
86
105
  <es-selector-panel
87
106
  v-if="isReset"
@@ -110,8 +129,7 @@ import {
110
129
  indexOfObj,
111
130
  arrUnique,
112
131
  isExist,
113
- getTypePrefix,
114
- error
132
+ getTypePrefix
115
133
  } from 'eoss/src/utils/util.js';
116
134
  import { isObject } from 'eoss/src/utils/types.js';
117
135
  import { getSelectorOrgDetail, getSysParam } from 'eoss/src/config/api.js';
@@ -169,6 +187,16 @@ import { getStorage } from 'eoss/src/utils/storage';
169
187
  * @events {Function} tabs-change - 标签切换时触发
170
188
  * @events {Function} clear - 清空时触发
171
189
  */
190
+ import Bar from 'eoss/src/components/bar';
191
+ import {
192
+ addResizeListener,
193
+ removeResizeListener
194
+ } from 'eoss/src/utils/resize-event';
195
+ import {
196
+ getScrollbarWidth,
197
+ getScrollSize,
198
+ scrollMove
199
+ } from 'eoss/src/utils/scrollbar';
172
200
  export default {
173
201
  name: 'EsSelector',
174
202
  inheritAttrs: false,
@@ -181,7 +209,16 @@ export default {
181
209
  }
182
210
  },
183
211
  directives: { Clickoutside },
212
+ components: {
213
+ Bar
214
+ },
184
215
  props: {
216
+ /**
217
+ * 结果展示面板最大高度
218
+ * @type {String}
219
+ * @default ''
220
+ */
221
+ maxHeight: [String, Number],
185
222
  /**
186
223
  * 是否显示三级公司(仅针对 types 包含'enterprise')
187
224
  * @type {Boolean}
@@ -518,17 +555,39 @@ export default {
518
555
  visible: false,
519
556
  menuVisibleOnFocus: false,
520
557
  inputHovering: false,
521
- styles: {},
558
+ //styles: {},
522
559
  words: '',
523
560
  minWidth: '',
524
561
  options: '',
525
562
  show: false,
526
563
  focus: false,
527
564
  reference: undefined,
528
- timer: null
565
+ timer: null,
566
+ tagsHeight: 0,
567
+ moveTo: 0,
568
+ barSize: 0,
569
+ scrollbarWidth: 0
529
570
  };
530
571
  },
531
572
  computed: {
573
+ styles() {
574
+ return this.tagsHeight
575
+ ? { 'max-height': this.tagsHeight + 'px', overflow: 'hidden' }
576
+ : {};
577
+ },
578
+ tagsStyle() {
579
+ return this.tagsHeight
580
+ ? {
581
+ 'max-height': this.tagsHeight + 'px',
582
+ overflowY: 'scroll',
583
+ width: `calc(100% + ${this.scrollbarWidth}px)`
584
+ }
585
+ : {};
586
+ },
587
+ // 滚动容器
588
+ bodyWrapper() {
589
+ return this.$refs.tagsWrapper;
590
+ },
532
591
  showButton() {
533
592
  return this.button !== false;
534
593
  },
@@ -632,6 +691,12 @@ export default {
632
691
  if (val) {
633
692
  this.getSysParam();
634
693
  }
694
+ },
695
+ maxHeight: {
696
+ immediate: true,
697
+ handler() {
698
+ this.getHeight();
699
+ }
635
700
  }
636
701
  },
637
702
  created() {
@@ -639,6 +704,7 @@ export default {
639
704
  this.mix && this.getSysParam();
640
705
  },
641
706
  mounted() {
707
+ this.scrollbarWidth = getScrollbarWidth();
642
708
  //this.resetInputHeight();
643
709
  if (this.filterable) {
644
710
  this.$nextTick(() => {
@@ -651,6 +717,15 @@ export default {
651
717
  this.openDialog();
652
718
  });
653
719
  }
720
+ // 监听父元素高度变化,自动重新计算展示高度
721
+ if (this.maxHeight === 'auto' && this.$el.parentNode) {
722
+ this.resizeParent = this.$el.parentNode;
723
+ this.handleParentResize = () => {
724
+ // 高度计算完成并应用到 DOM 后,再计算滚动条大小
725
+ this.getHeight(this.getSize);
726
+ };
727
+ addResizeListener(this.resizeParent, this.handleParentResize);
728
+ }
654
729
  },
655
730
  methods: {
656
731
  /**
@@ -815,6 +890,9 @@ export default {
815
890
  this.$emit('input', val);
816
891
  this.$emit('confirm', val, this.businessData);
817
892
  this.visible = false;
893
+ this.$nextTick(() => {
894
+ this.getSize();
895
+ });
818
896
  },
819
897
  handleClear() {
820
898
  this.$emit('input', []);
@@ -874,10 +952,62 @@ export default {
874
952
  ? res[this.labelKey]
875
953
  : res.label || res[this.valueKey])
876
954
  );
955
+ },
956
+ // 获取展示高度
957
+ getHeight(callback) {
958
+ if (!this.maxHeight) {
959
+ return;
960
+ }
961
+ if (this.maxHeight === 'auto') {
962
+ this.$nextTick(() => {
963
+ const inputHeight = this.$refs.reference.$el.offsetHeight || 0;
964
+ const height = this.$el.parentNode.offsetHeight;
965
+ const style = window.getComputedStyle(this.$el.parentNode);
966
+ const borderTop = parseFloat(style.borderTopWidth) || 0;
967
+ const borderBottom = parseFloat(style.borderBottomWidth) || 0;
968
+ const paddingTop = parseFloat(style.paddingTop) || 0;
969
+ const paddingBottom = parseFloat(style.paddingBottom) || 0;
970
+ this.tagsHeight =
971
+ height -
972
+ inputHeight -
973
+ borderTop -
974
+ borderBottom -
975
+ paddingTop -
976
+ paddingBottom;
977
+ // 必须等 tagsHeight 应用到 DOM 后再执行回调,不能挪到外层
978
+ typeof callback === 'function' && this.$nextTick(callback);
979
+ });
980
+ } else {
981
+ this.tagsHeight = parseInt(this.maxHeight, 10);
982
+ }
983
+ },
984
+ // 获取滚动条大小
985
+ getSize() {
986
+ if (this.$refs.tagsWrapper) {
987
+ const size = getScrollSize(this.$refs.tagsWrapper);
988
+ this.barSize = size.height;
989
+ return;
990
+ }
991
+ this.barSize = 0;
992
+ },
993
+ // 处理滚轮事件,阻止冒泡
994
+ handleWheel(e) {
995
+ this.barSize && e.stopPropagation();
996
+ },
997
+ // 处理滚动事件
998
+ handleScroll() {
999
+ const { x, y } = scrollMove(this.$refs.tagsWrapper);
1000
+ this.moveTo = this.mode === 'horizontal' ? x : y;
877
1001
  }
878
1002
  },
879
1003
  beforeDestroy() {
880
1004
  this.$el.removeEventListener('keyup', this.doSearch);
1005
+ // 移除父元素高度变化监听
1006
+ if (this.resizeParent && this.handleParentResize) {
1007
+ removeResizeListener(this.resizeParent, this.handleParentResize);
1008
+ this.resizeParent = null;
1009
+ this.handleParentResize = null;
1010
+ }
881
1011
  if (this.$refs.openDialog) {
882
1012
  this.$refs.openDialog.$el.parentNode.removeEventListener('click', () => {
883
1013
  this.openDialog();
@@ -11,6 +11,12 @@ body {
11
11
  }
12
12
  html,
13
13
  body,
14
+ h1,
15
+ h2,
16
+ h3,
17
+ h4,
18
+ h5,
19
+ h6,
14
20
  div,
15
21
  p,
16
22
  span,
@@ -2,6 +2,7 @@
2
2
  @import 'common/var.scss';
3
3
  @include b(checkbox-group) {
4
4
  text-align: left;
5
+ line-height: 1;
5
6
  @include when(separate) {
6
7
  @include b(checkbox-button) {
7
8
  & + .es-checkbox-button {
@@ -245,7 +245,7 @@ $--font-color-base: #333333 !default;
245
245
  // 主要文字颜色
246
246
  $--font-color-primary: #333333 !default;
247
247
  // 次要文字颜色
248
- $--font-color-secondary: #666666 !default;
248
+ $--font-color-secondary: #999999 !default;
249
249
  // 禁用文字颜色
250
250
  $--font-color-disable: rgba(209, 211, 219, 1) !default;
251
251
  // 边框颜色
@@ -6,8 +6,11 @@
6
6
  display: flex;
7
7
  flex-direction: column;
8
8
  padding-bottom: 12px;
9
- justify-content: space-between;
9
+ //justify-content: space-between;
10
10
  padding: 20px;
11
+ .es-form-item {
12
+ margin-bottom: 16px !important;
13
+ }
11
14
  @include e(title) {
12
15
  font-size: 16px;
13
16
  line-height: 24px;
@@ -311,9 +314,9 @@
311
314
  .es-flow .form-left .es-form-item {
312
315
  margin-bottom: 22px !important;
313
316
  }
314
- .es-flow .es-info .es-form-item {
315
- margin-bottom: 0px;
316
- }
317
+ // .es-flow .es-info .es-form-item {
318
+ // margin-bottom: 0px;
319
+ // }
317
320
  /* 设置滚动条的样式 */
318
321
  .es-flow .es-info::-webkit-scrollbar {
319
322
  width: 5px;
@@ -0,0 +1,141 @@
1
+ @import 'mixins/mixins.scss';
2
+ @import 'common/var.scss';
3
+
4
+ // 组件样式
5
+ @include b(flows) {
6
+ display: flex;
7
+ flex-direction: column;
8
+ padding-bottom: 12px;
9
+ padding: 20px;
10
+ @include when(hide) {
11
+ padding: 0;
12
+ }
13
+ .es-form-item {
14
+ margin-bottom: 16px !important;
15
+ }
16
+ @include e(title) {
17
+ font-size: 16px;
18
+ line-height: 24px;
19
+ color: $--font-color-secondary;
20
+ padding-top: 4px;
21
+ padding-bottom: 20px;
22
+ border-bottom: 1px solid $--border-color-base;
23
+ position: relative;
24
+ @include m(node-name) {
25
+ color: $--font-color-primary;
26
+ }
27
+ @include m(shrink) {
28
+ position: absolute;
29
+ right: 0;
30
+ font-size: 18px;
31
+ color: $--font-color-secondary;
32
+ padding: 0;
33
+ cursor: pointer;
34
+ }
35
+ }
36
+ @include e(sub-title) {
37
+ font-size: 16px;
38
+ line-height: 24px;
39
+ color: $--font-color-primary;
40
+ }
41
+ @include e(opinion) {
42
+ display: flex;
43
+ padding-top: 24px;
44
+ padding-bottom: 16px;
45
+ justify-content: space-between;
46
+ align-items: center;
47
+ }
48
+ @include e(opinions) {
49
+ @include m(file) {
50
+ padding: 0;
51
+ border: 0;
52
+ }
53
+ @include m(group) {
54
+ position: relative;
55
+ .es-textarea {
56
+ .es-textarea__inner {
57
+ padding: 12px 16px 60px 16px;
58
+ &:focus {
59
+ box-shadow: none;
60
+ }
61
+ }
62
+ @include when(tips) {
63
+ .es-textarea__inner {
64
+ padding-bottom: 92px;
65
+ }
66
+ }
67
+ }
68
+ .es-form-item__label {
69
+ color: $--font-color-secondary;
70
+ }
71
+ }
72
+ @include m(group-assist) {
73
+ position: absolute;
74
+ left: 0;
75
+ right: 0;
76
+ bottom: 0;
77
+ padding: 0 16px 6px 16px;
78
+ .es-form-item {
79
+ margin-bottom: 0 !important;
80
+ }
81
+ }
82
+ @include m(tooltip) {
83
+ color: #b9bdc9;
84
+ padding-top: 8px;
85
+ padding-bottom: 9px;
86
+ font-size: 14px;
87
+ line-height: 22px;
88
+ }
89
+ @include m(tooltip-label) {
90
+ float: left;
91
+ }
92
+ @include m(tooltip-content) {
93
+ margin-left: 84px;
94
+ overflow: hidden;
95
+ white-space: nowrap;
96
+ text-overflow: ellipsis;
97
+ }
98
+ @include m(tag-box) {
99
+ border-top: $--border-base;
100
+ padding-top: 6px;
101
+ .es-form-item__content {
102
+ padding-right: 40px;
103
+ }
104
+ }
105
+ @include m(edit) {
106
+ position: absolute;
107
+ right: 0;
108
+ }
109
+ @include m(tag) {
110
+ margin-right: 8px;
111
+ cursor: pointer;
112
+ }
113
+ @include m(dropdown) {
114
+ position: absolute;
115
+ right: 20px;
116
+ }
117
+ @include m(add-form) {
118
+ .es-form-content {
119
+ padding-top: 21px;
120
+ }
121
+ }
122
+ @include m(file) {
123
+ height: 100%;
124
+ }
125
+ }
126
+ @include e(message) {
127
+ padding-top: 24px;
128
+ }
129
+ @include e(start-flow) {
130
+ padding-top: 24px;
131
+ @include m(select) {
132
+ .es-form-item__label {
133
+ font-size: 16px;
134
+ padding-bottom: 16px;
135
+ &::before {
136
+ content: none !important;
137
+ }
138
+ }
139
+ }
140
+ }
141
+ }
@@ -88,7 +88,7 @@
88
88
  display: inline-block;
89
89
  @include utils-clearfix;
90
90
  @include when(last) {
91
- margin-bottom: 0;
91
+ margin-bottom: 0 !important;
92
92
  }
93
93
 
94
94
  & .es-form-item {
@@ -38,6 +38,7 @@
38
38
  @import "./empty.scss";
39
39
  @import "./flip.scss";
40
40
  @import "./flow.scss";
41
+ @import "./flows.scss";
41
42
  @import "./flow-group.scss";
42
43
  @import "./form.scss";
43
44
  @import "./form-item.scss";
@@ -415,6 +415,7 @@
415
415
  padding: 0 20px;
416
416
  width: 1px;
417
417
  white-space: nowrap;
418
+ line-height: 1;
418
419
 
419
420
  &:focus {
420
421
  outline: none;
@@ -334,29 +334,20 @@
334
334
  }
335
335
  @include e(pages) {
336
336
  height: calc(100% - 32px);
337
- .es-scrollbar.is-page {
338
- height: calc(100% - 48px);
339
- }
340
- .es-scrollbar__view {
341
- padding-right: 8px;
342
- padding-left: 8px;
337
+ @include m(container) {
338
+ height: 100%;
339
+ &.is-page {
340
+ height: calc(100% - 48px);
341
+ }
343
342
  }
344
343
  @include m(item) {
345
- height: 32px;
346
- padding: 4px 8px;
344
+ flex: 1;
345
+ height: 100%;
347
346
  display: flex;
348
347
  align-items: center;
349
- justify-content: space-between;
350
- cursor: pointer;
351
- border-radius: 6px;
352
- &:hover {
353
- background-color: $--color-primary-light-1;
354
- }
355
- &.is-active {
356
- background-color: $--color-primary-light-1;
357
- }
358
348
  }
359
- @include m(item-name) {
349
+ @include m(item-label) {
350
+ flex: 1;
360
351
  font-size: 14px;
361
352
  color: $--font-color-secondary;
362
353
  }
@@ -458,4 +449,16 @@
458
449
  gap: 10px;
459
450
  }
460
451
  }
452
+ @include e(authorize) {
453
+ height: 100%;
454
+ padding-bottom: 40px;
455
+ position: relative;
456
+ @include m(btn) {
457
+ position: absolute;
458
+ left: 0;
459
+ bottom: 0;
460
+ right: 0;
461
+ text-align: right;
462
+ }
463
+ }
461
464
  }
@@ -58,7 +58,9 @@
58
58
  }
59
59
  }
60
60
  }
61
-
61
+ & .es-input__suffix-button {
62
+ margin-left: 8px;
63
+ }
62
64
  &.is-disabled {
63
65
  & .es-input__inner {
64
66
  cursor: not-allowed;
@@ -11,7 +11,7 @@
11
11
  border: 0;
12
12
  }
13
13
  @include e(input) {
14
- position: absolute;
14
+ position: absolute !important;
15
15
  top: 0;
16
16
  left: 0;
17
17
  z-index: -1;
@@ -50,7 +50,6 @@
50
50
  }
51
51
  @include e(tags) {
52
52
  max-width: 100%;
53
- padding: 12px 12px 8px 12px;
54
53
  position: relative;
55
54
  &::before {
56
55
  content: '';
@@ -62,9 +61,16 @@
62
61
  right: 12px;
63
62
  top: 0;
64
63
  }
65
-
66
- & > span {
67
- padding-top: 4px;
64
+ &:hover {
65
+ .es-scrollbar__bar {
66
+ opacity: 1;
67
+ }
68
+ }
69
+ @include m(wrapper) {
70
+ padding: 12px 12px 8px 12px;
71
+ & > span {
72
+ padding-top: 4px;
73
+ }
68
74
  }
69
75
 
70
76
  .es-tag {
package/src/index.js CHANGED
@@ -39,6 +39,7 @@ import EmailLogin from '../packages/email-login/index.js';
39
39
  import Empty from '../packages/empty/index.js';
40
40
  import Flip from '../packages/flip/index.js';
41
41
  import Flow from '../packages/flow/index.js';
42
+ import Flows from '../packages/flows/index.js';
42
43
  import FlowGroup from '../packages/flow-group/index.js';
43
44
  import Form from '../packages/form/index.js';
44
45
  import FormItem from '../packages/form-item/index.js';
@@ -144,6 +145,7 @@ const components = [
144
145
  Empty,
145
146
  Flip,
146
147
  Flow,
148
+ Flows,
147
149
  FlowGroup,
148
150
  Form,
149
151
  FormItem,
@@ -242,7 +244,7 @@ if (typeof window !== 'undefined' && window.Vue) {
242
244
  }
243
245
 
244
246
  export default {
245
- version: '0.1.0-alpha.21',
247
+ version: '0.1.0-alpha.23',
246
248
  install,
247
249
  CollapseTransition,
248
250
  Loading,
@@ -285,6 +287,7 @@ export default {
285
287
  Empty,
286
288
  Flip,
287
289
  Flow,
290
+ Flows,
288
291
  FlowGroup,
289
292
  Form,
290
293
  FormItem,
@@ -9,6 +9,7 @@ const isServer = typeof window === 'undefined';
9
9
  const listenersMap = new WeakMap();
10
10
  const lastProcessedMap = new WeakMap();
11
11
  const animationFrameMap = new WeakMap();
12
+ const pendingRetryMap = new WeakMap();
12
13
  const PROCESSING_DELAY = 100; // 增加处理延迟到100ms
13
14
 
14
15
  // 更安全的resize处理器,使用requestAnimationFrame和严格的频率控制
@@ -17,8 +18,15 @@ function safeResizeHandler(element) {
17
18
  const lastTime = lastProcessedMap.get(element) || 0;
18
19
  const listeners = listenersMap.get(element) || [];
19
20
 
20
- // 如果距离上次处理不足 PROCESSING_DELAY 毫秒,则跳过
21
+ // 如果距离上次处理不足 PROCESSING_DELAY 毫秒,延迟重试,避免丢失最后一次变化
21
22
  if (now - lastTime < PROCESSING_DELAY) {
23
+ if (!pendingRetryMap.get(element)) {
24
+ pendingRetryMap.set(element, true);
25
+ setTimeout(() => {
26
+ pendingRetryMap.delete(element);
27
+ safeResizeHandler(element);
28
+ }, PROCESSING_DELAY);
29
+ }
22
30
  return;
23
31
  }
24
32
 
@@ -81,15 +89,21 @@ class CustomResizeObserver {
81
89
  const checkSize = () => {
82
90
  const rect = element.getBoundingClientRect();
83
91
  const currentSize = { width: rect.width, height: rect.height };
84
- const lastSize = element.__lastSize || currentSize;
85
92
 
86
- // 检查尺寸是否真的改变了
87
- if (Math.abs(currentSize.width - lastSize.width) > 1 ||
88
- Math.abs(currentSize.height - lastSize.height) > 1) {
93
+ // 首次检查时初始化基准尺寸,否则永远检测不到变化
94
+ if (!element.__lastSize) {
89
95
  element.__lastSize = currentSize;
96
+ } else {
97
+ const lastSize = element.__lastSize;
90
98
 
91
- // 调用原始回调,但在更安全的上下文中
92
- safeResizeHandler(element);
99
+ // 检查尺寸是否真的改变了
100
+ if (Math.abs(currentSize.width - lastSize.width) > 1 ||
101
+ Math.abs(currentSize.height - lastSize.height) > 1) {
102
+ element.__lastSize = currentSize;
103
+
104
+ // 调用原始回调,但在更安全的上下文中
105
+ safeResizeHandler(element);
106
+ }
93
107
  }
94
108
 
95
109
  // 继续下一次检查,但增加延迟