eoss-mobiles 0.3.97 → 0.3.99

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/checkbox.js +21 -0
  2. package/lib/eoss-mobile.common.js +284 -123
  3. package/lib/flow-btn.js +21 -0
  4. package/lib/flow-list.js +21 -0
  5. package/lib/flow.js +244 -83
  6. package/lib/index.js +1 -1
  7. package/lib/picker.js +27 -6
  8. package/lib/radio.js +26 -5
  9. package/lib/retrial-auth.js +21 -0
  10. package/lib/selector.js +49 -28
  11. package/lib/table-column.js +21 -0
  12. package/lib/table.js +21 -0
  13. package/lib/theme-chalk/fonts/iconfont.scss +98 -98
  14. package/lib/theme-chalk/fonts/iconfont1.scss +90 -90
  15. package/lib/uploader.js +21 -0
  16. package/lib/utils/util.js +21 -0
  17. package/package.json +1 -1
  18. package/packages/action-sheet/index.js +5 -5
  19. package/packages/action-sheet/src/main.vue +32 -32
  20. package/packages/button/index.js +5 -5
  21. package/packages/button/src/main.vue +15 -15
  22. package/packages/button-group/index.js +5 -5
  23. package/packages/button-group/src/main.vue +80 -80
  24. package/packages/calendar/index.js +5 -5
  25. package/packages/calendar/src/main.vue +34 -34
  26. package/packages/cascader/index.js +5 -5
  27. package/packages/cascader/src/main.vue +39 -39
  28. package/packages/cell/index.js +5 -5
  29. package/packages/cell/src/main.vue +77 -77
  30. package/packages/checkbox/index.js +5 -5
  31. package/packages/checkbox/src/main.vue +232 -232
  32. package/packages/circle/index.js +5 -5
  33. package/packages/circle/src/main.vue +27 -27
  34. package/packages/count-down/index.js +5 -5
  35. package/packages/count-down/src/main.vue +27 -27
  36. package/packages/date/index.js +5 -5
  37. package/packages/date/src/date-time.vue +290 -290
  38. package/packages/date/src/main.vue +401 -401
  39. package/packages/empty/index.js +5 -5
  40. package/packages/empty/src/main.vue +16 -16
  41. package/packages/esign/index.js +5 -5
  42. package/packages/esign/src/main.vue +144 -144
  43. package/packages/field/index.js +5 -5
  44. package/packages/flow/index.js +5 -5
  45. package/packages/flow/src/components/Circulate.vue +595 -595
  46. package/packages/flow/src/components/Handle.vue +2404 -2404
  47. package/packages/flow/src/components/Message.vue +208 -208
  48. package/packages/flow/src/components/ProcessSettings.vue +342 -342
  49. package/packages/flow/src/components/TaskRead.vue +100 -4
  50. package/packages/flow/src/components/supervise.vue +139 -139
  51. package/packages/flow/src/flowMix.js +288 -288
  52. package/packages/flow/src/main.vue +116 -116
  53. package/packages/flow-btn/index.js +5 -5
  54. package/packages/flow-btn/src/main.vue +494 -494
  55. package/packages/flow-list/index.js +5 -5
  56. package/packages/flow-list/src/main.vue +248 -248
  57. package/packages/form/index.js +5 -5
  58. package/packages/grid/index.js +5 -5
  59. package/packages/grid/src/main.vue +486 -486
  60. package/packages/grid-item/index.js +5 -5
  61. package/packages/grid-item/src/main.vue +16 -16
  62. package/packages/image/index.js +5 -5
  63. package/packages/image/src/main.vue +12 -12
  64. package/packages/image-preview/index.js +5 -5
  65. package/packages/list/index.js +5 -5
  66. package/packages/list/src/main.vue +32 -32
  67. package/packages/loading/index.js +5 -5
  68. package/packages/loading/src/main.vue +19 -19
  69. package/packages/nav-bar/index.js +5 -5
  70. package/packages/nav-bar/src/main.vue +24 -24
  71. package/packages/notice-bar/index.js +5 -5
  72. package/packages/notice-bar/src/main.vue +15 -15
  73. package/packages/pagination/index.js +5 -5
  74. package/packages/pagination/src/main.vue +73 -73
  75. package/packages/picker/index.js +5 -5
  76. package/packages/picker/src/main.vue +604 -604
  77. package/packages/popover/index.js +5 -5
  78. package/packages/popover/src/main.vue +32 -32
  79. package/packages/popup/index.js +5 -5
  80. package/packages/popup/src/main.vue +27 -27
  81. package/packages/pull-refresh/index.js +5 -5
  82. package/packages/pull-refresh/src/main.vue +31 -31
  83. package/packages/radio/index.js +5 -5
  84. package/packages/radio/src/main.vue +179 -179
  85. package/packages/rate/index.js +5 -5
  86. package/packages/rate/src/main.vue +26 -26
  87. package/packages/retrial-auth/index.js +5 -5
  88. package/packages/retrial-auth/src/main.vue +257 -257
  89. package/packages/search/index.js +5 -5
  90. package/packages/search/src/main.vue +39 -39
  91. package/packages/selector/index.js +5 -5
  92. package/packages/selector/src/main.vue +186 -186
  93. package/packages/selector/src/selector-tree.vue +1117 -1117
  94. package/packages/selector/src/tree.vue +405 -405
  95. package/packages/skeleton/index.js +5 -5
  96. package/packages/skeleton/src/main.vue +17 -17
  97. package/packages/stepper/index.js +5 -5
  98. package/packages/stepper/src/main.vue +25 -25
  99. package/packages/swipe/index.js +5 -5
  100. package/packages/swipe/src/main.vue +42 -42
  101. package/packages/switch/index.js +5 -5
  102. package/packages/switch/src/main.vue +38 -38
  103. package/packages/tab/index.js +5 -5
  104. package/packages/tab/src/main.vue +16 -16
  105. package/packages/table/index.js +5 -5
  106. package/packages/table/src/main.vue +1006 -1006
  107. package/packages/table-column/index.js +5 -5
  108. package/packages/table-column/src/main.vue +931 -931
  109. package/packages/table-column/src/mixins/table.js +12 -12
  110. package/packages/tabs/index.js +5 -5
  111. package/packages/tabs/src/main.vue +34 -34
  112. package/packages/tag/index.js +5 -5
  113. package/packages/tag/src/main.vue +16 -16
  114. package/packages/theme-chalk/gulpfile.js +25 -0
  115. package/packages/theme-chalk/src/base.scss +195 -195
  116. package/packages/theme-chalk/src/button-group.scss +25 -25
  117. package/packages/theme-chalk/src/button.scss +2 -2
  118. package/packages/theme-chalk/src/calendar.scss +11 -11
  119. package/packages/theme-chalk/src/cascader.scss +11 -11
  120. package/packages/theme-chalk/src/cell.scss +14 -14
  121. package/packages/theme-chalk/src/checkbox.scss +9 -9
  122. package/packages/theme-chalk/src/circle.scss +6 -6
  123. package/packages/theme-chalk/src/common/var.scss +1525 -1525
  124. package/packages/theme-chalk/src/esign.scss +51 -51
  125. package/packages/theme-chalk/src/field.scss +98 -98
  126. package/packages/theme-chalk/src/flow-btn.scss +99 -99
  127. package/packages/theme-chalk/src/flow-list.scss +122 -122
  128. package/packages/theme-chalk/src/fonts/iconfont.scss +98 -98
  129. package/packages/theme-chalk/src/fonts/iconfont1.scss +90 -90
  130. package/packages/theme-chalk/src/form.scss +33 -33
  131. package/packages/theme-chalk/src/grid-item.scss +16 -16
  132. package/packages/theme-chalk/src/grid.scss +46 -46
  133. package/packages/theme-chalk/src/icon.scss +1661 -1661
  134. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  135. package/packages/theme-chalk/src/navbar.scss +5 -5
  136. package/packages/theme-chalk/src/pagination.scss +12 -12
  137. package/packages/theme-chalk/src/picker.scss +31 -31
  138. package/packages/theme-chalk/src/radio.scss +6 -6
  139. package/packages/theme-chalk/src/retrial-auth.scss +28 -28
  140. package/packages/theme-chalk/src/selector.scss +247 -247
  141. package/packages/theme-chalk/src/stepper.scss +9 -9
  142. package/packages/theme-chalk/src/switch.scss +5 -5
  143. package/packages/theme-chalk/src/table.scss +86 -86
  144. package/packages/theme-chalk/src/tabs.scss +31 -31
  145. package/packages/theme-chalk/src/tag.scss +12 -12
  146. package/packages/theme-chalk/src/theme.scss +1 -1
  147. package/packages/theme-chalk/src/tree.scss +127 -127
  148. package/packages/uploader/index.js +5 -5
  149. package/src/config/api.js +190 -190
  150. package/src/index.js +1 -1
  151. package/src/utils/axios.js +217 -217
  152. package/src/utils/date-util.js +312 -312
  153. package/src/utils/http.js +106 -106
  154. package/src/utils/rules.js +18 -18
  155. package/src/utils/store.js +21 -21
  156. package/src/utils/util.js +21 -0
  157. package/CHANGELOG.md +0 -95
  158. package/packages/theme-chalk/lib/action-sheet.css +0 -0
  159. package/packages/theme-chalk/lib/base.css +0 -1
  160. package/packages/theme-chalk/lib/button-group.css +0 -1
  161. package/packages/theme-chalk/lib/button.css +0 -1
  162. package/packages/theme-chalk/lib/calendar.css +0 -1
  163. package/packages/theme-chalk/lib/cascader.css +0 -1
  164. package/packages/theme-chalk/lib/cell.css +0 -1
  165. package/packages/theme-chalk/lib/checkbox.css +0 -1
  166. package/packages/theme-chalk/lib/circle.css +0 -1
  167. package/packages/theme-chalk/lib/count-down.css +0 -0
  168. package/packages/theme-chalk/lib/date.css +0 -0
  169. package/packages/theme-chalk/lib/empty.css +0 -0
  170. package/packages/theme-chalk/lib/esign.css +0 -1
  171. package/packages/theme-chalk/lib/field.css +0 -1
  172. package/packages/theme-chalk/lib/flow-btn.css +0 -1
  173. package/packages/theme-chalk/lib/flow-list-task-read.css +0 -1
  174. package/packages/theme-chalk/lib/flow-list.css +0 -1
  175. package/packages/theme-chalk/lib/flow.css +0 -1
  176. package/packages/theme-chalk/lib/fonts/iconfont.scss +0 -98
  177. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  178. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  179. package/packages/theme-chalk/lib/fonts/iconfont1.scss +0 -90
  180. package/packages/theme-chalk/lib/form.css +0 -1
  181. package/packages/theme-chalk/lib/grid-item.css +0 -1
  182. package/packages/theme-chalk/lib/grid.css +0 -1
  183. package/packages/theme-chalk/lib/icon.css +0 -1
  184. package/packages/theme-chalk/lib/image-preview.css +0 -0
  185. package/packages/theme-chalk/lib/image.css +0 -0
  186. package/packages/theme-chalk/lib/index.css +0 -1
  187. package/packages/theme-chalk/lib/list.css +0 -0
  188. package/packages/theme-chalk/lib/loading.css +0 -0
  189. package/packages/theme-chalk/lib/nav-bar.css +0 -0
  190. package/packages/theme-chalk/lib/navbar.css +0 -1
  191. package/packages/theme-chalk/lib/notice-bar.css +0 -0
  192. package/packages/theme-chalk/lib/pagination.css +0 -1
  193. package/packages/theme-chalk/lib/picker.css +0 -1
  194. package/packages/theme-chalk/lib/popover.css +0 -0
  195. package/packages/theme-chalk/lib/popup.css +0 -0
  196. package/packages/theme-chalk/lib/pull-refresh.css +0 -0
  197. package/packages/theme-chalk/lib/radio.css +0 -1
  198. package/packages/theme-chalk/lib/rate.css +0 -0
  199. package/packages/theme-chalk/lib/retrial-auth.css +0 -1
  200. package/packages/theme-chalk/lib/search.css +0 -0
  201. package/packages/theme-chalk/lib/selector.css +0 -1
  202. package/packages/theme-chalk/lib/skeleton.css +0 -0
  203. package/packages/theme-chalk/lib/stepper.css +0 -1
  204. package/packages/theme-chalk/lib/swipe.css +0 -0
  205. package/packages/theme-chalk/lib/switch.css +0 -1
  206. package/packages/theme-chalk/lib/tab.css +0 -0
  207. package/packages/theme-chalk/lib/table-column.css +0 -0
  208. package/packages/theme-chalk/lib/table.css +0 -1
  209. package/packages/theme-chalk/lib/tabs.css +0 -1
  210. package/packages/theme-chalk/lib/tag.css +0 -1
  211. package/packages/theme-chalk/lib/theme.css +0 -0
  212. package/packages/theme-chalk/lib/tree.css +0 -1
  213. package/packages/theme-chalk/lib/uploader.css +0 -0
@@ -1,90 +1,90 @@
1
- @font-face {
2
- font-family: "iconfont"; /* Project id 4360523 */
3
- src: url('//at.alicdn.com/t/c/font_4360523_ph4qmmcd8ze.woff2?t=1704791048889') format('woff2'),
4
- url('//at.alicdn.com/t/c/font_4360523_ph4qmmcd8ze.woff?t=1704791048889') format('woff'),
5
- url('//at.alicdn.com/t/c/font_4360523_ph4qmmcd8ze.ttf?t=1704791048889') format('truetype');
6
- }
7
-
8
- .iconfont {
9
- font-family: "iconfont" !important;
10
- font-size: 16px;
11
- font-style: normal;
12
- -webkit-font-smoothing: antialiased;
13
- -moz-osx-font-smoothing: grayscale;
14
- }
15
-
16
- .icon-em-more:before {
17
- content: "\e646";
18
- }
19
-
20
- .icon-youjiantou:before {
21
- content: "\e622";
22
- }
23
-
24
- .icon-shoucang:before {
25
- content: "\e600";
26
- }
27
-
28
- .icon-ziguanshujufuwu:before {
29
- content: "\e618";
30
- }
31
-
32
- .icon-fuwenbenkuang:before {
33
- content: "\e66f";
34
- }
35
-
36
- .icon-gongdanguanlian:before {
37
- content: "\e66d";
38
- }
39
-
40
- .icon-riqi_rili:before {
41
- content: "\e648";
42
- }
43
-
44
- .icon-fuwenben:before {
45
- content: "\e718";
46
- }
47
-
48
- .icon-a-gaizhang3:before {
49
- content: "\eba4";
50
- }
51
-
52
- .icon-quan:before {
53
- content: "\e63a";
54
- }
55
-
56
- .icon-gou:before {
57
- content: "\e8bd";
58
- }
59
-
60
- .icon-fujian:before {
61
- content: "\e651";
62
- }
63
-
64
- .icon-ziyuan:before {
65
- content: "\e60d";
66
- }
67
-
68
- .icon-duoxuanxuanzhong:before {
69
- content: "\e62c";
70
- }
71
-
72
- .icon-saoma:before {
73
- content: "\e621";
74
- }
75
-
76
- .icon-jiayonghu:before {
77
- content: "\e617";
78
- }
79
-
80
- .icon-bumenguanli:before {
81
- content: "\e60c";
82
- }
83
-
84
- .icon-shuzi:before {
85
- content: "\e640";
86
- }
87
-
88
- .icon-dingwei:before {
89
- content: "\ee33";
90
- }
1
+ @font-face {
2
+ font-family: "iconfont"; /* Project id 4360523 */
3
+ src: url('//at.alicdn.com/t/c/font_4360523_ph4qmmcd8ze.woff2?t=1704791048889') format('woff2'),
4
+ url('//at.alicdn.com/t/c/font_4360523_ph4qmmcd8ze.woff?t=1704791048889') format('woff'),
5
+ url('//at.alicdn.com/t/c/font_4360523_ph4qmmcd8ze.ttf?t=1704791048889') format('truetype');
6
+ }
7
+
8
+ .iconfont {
9
+ font-family: "iconfont" !important;
10
+ font-size: 16px;
11
+ font-style: normal;
12
+ -webkit-font-smoothing: antialiased;
13
+ -moz-osx-font-smoothing: grayscale;
14
+ }
15
+
16
+ .icon-em-more:before {
17
+ content: "\e646";
18
+ }
19
+
20
+ .icon-youjiantou:before {
21
+ content: "\e622";
22
+ }
23
+
24
+ .icon-shoucang:before {
25
+ content: "\e600";
26
+ }
27
+
28
+ .icon-ziguanshujufuwu:before {
29
+ content: "\e618";
30
+ }
31
+
32
+ .icon-fuwenbenkuang:before {
33
+ content: "\e66f";
34
+ }
35
+
36
+ .icon-gongdanguanlian:before {
37
+ content: "\e66d";
38
+ }
39
+
40
+ .icon-riqi_rili:before {
41
+ content: "\e648";
42
+ }
43
+
44
+ .icon-fuwenben:before {
45
+ content: "\e718";
46
+ }
47
+
48
+ .icon-a-gaizhang3:before {
49
+ content: "\eba4";
50
+ }
51
+
52
+ .icon-quan:before {
53
+ content: "\e63a";
54
+ }
55
+
56
+ .icon-gou:before {
57
+ content: "\e8bd";
58
+ }
59
+
60
+ .icon-fujian:before {
61
+ content: "\e651";
62
+ }
63
+
64
+ .icon-ziyuan:before {
65
+ content: "\e60d";
66
+ }
67
+
68
+ .icon-duoxuanxuanzhong:before {
69
+ content: "\e62c";
70
+ }
71
+
72
+ .icon-saoma:before {
73
+ content: "\e621";
74
+ }
75
+
76
+ .icon-jiayonghu:before {
77
+ content: "\e617";
78
+ }
79
+
80
+ .icon-bumenguanli:before {
81
+ content: "\e60c";
82
+ }
83
+
84
+ .icon-shuzi:before {
85
+ content: "\e640";
86
+ }
87
+
88
+ .icon-dingwei:before {
89
+ content: "\ee33";
90
+ }
package/lib/uploader.js CHANGED
@@ -606,6 +606,26 @@ var getValues = function getValues(obj, flag) {
606
606
  return val;
607
607
  };
608
608
 
609
+ /**
610
+ * uuid
611
+ * @desc:唯一id
612
+ * @author huangbo
613
+ * @date 2022年5月7日
614
+ * @param {number} [len] - 长度
615
+ **/
616
+ var uuid = function uuid(len) {
617
+ len = len || 32;
618
+ var s = 4;
619
+ var str = '';
620
+ function S4() {
621
+ return ((1 + Math.random()) * 0x10000 | 0).toString(16).substring(1);
622
+ }
623
+ for (var i = 0; i < Math.ceil(len / s); i++) {
624
+ str += S4();
625
+ }
626
+ return str.substring(0, len);
627
+ };
628
+
609
629
  /**
610
630
  * loading 需全局引入element-ui
611
631
  * @desc:loading
@@ -1496,6 +1516,7 @@ var toFunction = function toFunction(str) {
1496
1516
  jsGoPayrollIndexAct: jsGoPayrollIndexAct,
1497
1517
  exportXls: exportXls,
1498
1518
  generateUUID: generateUUID,
1519
+ uuid: uuid,
1499
1520
  toFunction: toFunction
1500
1521
  });
1501
1522
 
package/lib/utils/util.js CHANGED
@@ -517,6 +517,26 @@ var getValues = function getValues(obj, flag) {
517
517
  return val;
518
518
  };
519
519
 
520
+ /**
521
+ * uuid
522
+ * @desc:唯一id
523
+ * @author huangbo
524
+ * @date 2022年5月7日
525
+ * @param {number} [len] - 长度
526
+ **/
527
+ var uuid = function uuid(len) {
528
+ len = len || 32;
529
+ var s = 4;
530
+ var str = '';
531
+ function S4() {
532
+ return ((1 + Math.random()) * 0x10000 | 0).toString(16).substring(1);
533
+ }
534
+ for (var i = 0; i < Math.ceil(len / s); i++) {
535
+ str += S4();
536
+ }
537
+ return str.substring(0, len);
538
+ };
539
+
520
540
  /**
521
541
  * loading 需全局引入element-ui
522
542
  * @desc:loading
@@ -1407,5 +1427,6 @@ exports.default = {
1407
1427
  jsGoPayrollIndexAct: jsGoPayrollIndexAct,
1408
1428
  exportXls: exportXls,
1409
1429
  generateUUID: generateUUID,
1430
+ uuid: uuid,
1410
1431
  toFunction: toFunction
1411
1432
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-mobiles",
3
- "version": "0.3.97",
3
+ "version": "0.3.99",
4
4
  "description": "eoss内部移动端业务组件",
5
5
  "main": "lib/eoss-mobile.common.js",
6
6
  "files": [
@@ -1,5 +1,5 @@
1
- import EmActionSheet from './src/main';
2
-
3
- EmActionSheet.install = Vue => Vue.component(EmActionSheet.name, EmActionSheet);
4
-
5
- export default EmActionSheet;
1
+ import EmActionSheet from './src/main';
2
+
3
+ EmActionSheet.install = Vue => Vue.component(EmActionSheet.name, EmActionSheet);
4
+
5
+ export default EmActionSheet;
@@ -1,32 +1,32 @@
1
- <template>
2
- <div class="em-action-sheet">
3
- <van-action-sheet v-model="newValue" v-bind="$attrs" v-on="$listeners">
4
- <template v-for="(index, name) in $slots" :slot="name">
5
- <slot :name="name" />
6
- </template>
7
- </van-action-sheet>
8
- </div>
9
- </template>
10
-
11
- <script>
12
- export default {
13
- name: 'EmActionSheet',
14
- inheritAttrs: false,
15
- props:{
16
- value:{
17
- type:Boolean,
18
- default:false
19
- }
20
- },
21
- computed:{
22
- newValue:{
23
- get(){
24
- return this.value
25
- },
26
- set(val){}
27
- }
28
- }
29
- };
30
- </script>
31
-
32
- <style></style>
1
+ <template>
2
+ <div class="em-action-sheet">
3
+ <van-action-sheet v-model="newValue" v-bind="$attrs" v-on="$listeners">
4
+ <template v-for="(index, name) in $slots" :slot="name">
5
+ <slot :name="name" />
6
+ </template>
7
+ </van-action-sheet>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ name: 'EmActionSheet',
14
+ inheritAttrs: false,
15
+ props:{
16
+ value:{
17
+ type:Boolean,
18
+ default:false
19
+ }
20
+ },
21
+ computed:{
22
+ newValue:{
23
+ get(){
24
+ return this.value
25
+ },
26
+ set(val){}
27
+ }
28
+ }
29
+ };
30
+ </script>
31
+
32
+ <style></style>
@@ -1,5 +1,5 @@
1
- import EmButton from './src/main';
2
-
3
- EmButton.install = Vue => Vue.component(EmButton.name, EmButton);
4
-
5
- export default EmButton;
1
+ import EmButton from './src/main';
2
+
3
+ EmButton.install = Vue => Vue.component(EmButton.name, EmButton);
4
+
5
+ export default EmButton;
@@ -1,15 +1,15 @@
1
- <template>
2
- <van-button class="em-button" v-bind="$attrs" v-on="$listeners">
3
- <!-- <i :class="icon" v-if="icon"></i> -->
4
- <template v-for="(index, name) in $slots" :slot="name">
5
- <slot :name="name" />
6
- </template>
7
- </van-button>
8
- </template>
9
-
10
- <script>
11
- export default {
12
- name: 'EmButton',
13
- inheritAttrs:false,
14
- };
15
- </script>
1
+ <template>
2
+ <van-button class="em-button" v-bind="$attrs" v-on="$listeners">
3
+ <!-- <i :class="icon" v-if="icon"></i> -->
4
+ <template v-for="(index, name) in $slots" :slot="name">
5
+ <slot :name="name" />
6
+ </template>
7
+ </van-button>
8
+ </template>
9
+
10
+ <script>
11
+ export default {
12
+ name: 'EmButton',
13
+ inheritAttrs:false,
14
+ };
15
+ </script>
@@ -1,5 +1,5 @@
1
- import EmButtonGroup from './src/main';
2
-
3
- EmButtonGroup.install = Vue => Vue.component(EmButtonGroup.name, EmButtonGroup);
4
-
5
- export default EmButtonGroup;
1
+ import EmButtonGroup from './src/main';
2
+
3
+ EmButtonGroup.install = Vue => Vue.component(EmButtonGroup.name, EmButtonGroup);
4
+
5
+ export default EmButtonGroup;
@@ -1,80 +1,80 @@
1
- <template>
2
- <div class="em-button-group">
3
- <em-button
4
- v-show="index < maxCount - 1"
5
- v-for="(item, index) of btns"
6
- v-bind="item"
7
- :size="item.size || size"
8
- :key="index"
9
- @click="handleClick(item, true)"
10
- />
11
- <em-button
12
- class="em-button-group-more"
13
- v-if="btns.length > maxCount - 1"
14
- @click="handleClick(btns.length == maxCount && btns[maxCount - 1])"
15
- v-bind="btns.length == maxCount && btns[maxCount - 1]"
16
- :size="btns[maxCount - 1].size || size"
17
- :icon="btns.length > maxCount ? 'ellipsis' :''"
18
- >{{ btns.length == maxCount ? btns[maxCount - 1].text : '' }}</em-button
19
- >
20
- <em-popover
21
- v-if="btns.length > maxCount"
22
- v-model="showBtn"
23
- trigger="click"
24
- theme="dark"
25
- :actions="btns.slice(maxCount - 1)"
26
- @select="handleClick($event, true)"
27
- >
28
- </em-popover>
29
- </div>
30
- </template>
31
-
32
- <script>
33
- export default {
34
- name: 'EmButtonGroup',
35
- inheritAttrs:false,
36
- props: {
37
- data: Object,
38
- contents: { type: Array, default: [] },
39
- size: String,
40
- rules: Function,
41
- maxCount:{
42
- type:[Number,String],
43
- default:3
44
- }
45
- },
46
- data() {
47
- return {
48
- showBtn: false
49
- };
50
- },
51
- computed: {
52
- btns() {
53
- return this.getBtns();
54
- }
55
- },
56
- methods: {
57
- getBtns() {
58
- let arry = this.contents.filter(item => {
59
- if (Object.prototype.hasOwnProperty.call(item, 'rules')) {
60
- return item.rules(this.data);
61
- }
62
- if (this.rules !== undefined) {
63
- return this.rules(this.data);
64
- }
65
- return true;
66
- });
67
- return arry;
68
- },
69
-
70
- handleClick(res, noMore) {
71
- if (this.btns.length > this.maxCount && !noMore) {
72
- this.showBtn = !this.showBtn;
73
- return;
74
- }
75
- this.$emit('click', this.data ? { row: this.data, handle: res } : res);
76
- this.showBtn = false;
77
- }
78
- }
79
- };
80
- </script>
1
+ <template>
2
+ <div class="em-button-group">
3
+ <em-button
4
+ v-show="index < maxCount - 1"
5
+ v-for="(item, index) of btns"
6
+ v-bind="item"
7
+ :size="item.size || size"
8
+ :key="index"
9
+ @click="handleClick(item, true)"
10
+ />
11
+ <em-button
12
+ class="em-button-group-more"
13
+ v-if="btns.length > maxCount - 1"
14
+ @click="handleClick(btns.length == maxCount && btns[maxCount - 1])"
15
+ v-bind="btns.length == maxCount && btns[maxCount - 1]"
16
+ :size="btns[maxCount - 1].size || size"
17
+ :icon="btns.length > maxCount ? 'ellipsis' :''"
18
+ >{{ btns.length == maxCount ? btns[maxCount - 1].text : '' }}</em-button
19
+ >
20
+ <em-popover
21
+ v-if="btns.length > maxCount"
22
+ v-model="showBtn"
23
+ trigger="click"
24
+ theme="dark"
25
+ :actions="btns.slice(maxCount - 1)"
26
+ @select="handleClick($event, true)"
27
+ >
28
+ </em-popover>
29
+ </div>
30
+ </template>
31
+
32
+ <script>
33
+ export default {
34
+ name: 'EmButtonGroup',
35
+ inheritAttrs:false,
36
+ props: {
37
+ data: Object,
38
+ contents: { type: Array, default: [] },
39
+ size: String,
40
+ rules: Function,
41
+ maxCount:{
42
+ type:[Number,String],
43
+ default:3
44
+ }
45
+ },
46
+ data() {
47
+ return {
48
+ showBtn: false
49
+ };
50
+ },
51
+ computed: {
52
+ btns() {
53
+ return this.getBtns();
54
+ }
55
+ },
56
+ methods: {
57
+ getBtns() {
58
+ let arry = this.contents.filter(item => {
59
+ if (Object.prototype.hasOwnProperty.call(item, 'rules')) {
60
+ return item.rules(this.data);
61
+ }
62
+ if (this.rules !== undefined) {
63
+ return this.rules(this.data);
64
+ }
65
+ return true;
66
+ });
67
+ return arry;
68
+ },
69
+
70
+ handleClick(res, noMore) {
71
+ if (this.btns.length > this.maxCount && !noMore) {
72
+ this.showBtn = !this.showBtn;
73
+ return;
74
+ }
75
+ this.$emit('click', this.data ? { row: this.data, handle: res } : res);
76
+ this.showBtn = false;
77
+ }
78
+ }
79
+ };
80
+ </script>
@@ -1,5 +1,5 @@
1
- import EmCalendar from './src/main';
2
-
3
- EmCalendar.install = Vue => Vue.component(EmCalendar.name, EmCalendar);
4
-
5
- export default EmCalendar;
1
+ import EmCalendar from './src/main';
2
+
3
+ EmCalendar.install = Vue => Vue.component(EmCalendar.name, EmCalendar);
4
+
5
+ export default EmCalendar;
@@ -1,34 +1,34 @@
1
- <template>
2
- <van-calendar class="em-calendar" v-model="newValue" v-bind="$attrs" v-on="$listeners" />
3
- </template>
4
-
5
- <script>
6
- export default {
7
- inheritAttrs:false,
8
- name: 'EmCalendar',
9
- data(){
10
- return{
11
- show:false,
12
-
13
- }
14
- },
15
- props:{
16
- value:Boolean
17
- },
18
- computed:{
19
- newValue:{
20
- get(){
21
- return this.value
22
- },
23
- set(val){
24
- }
25
- }
26
- },
27
-
28
- methods:{
29
-
30
- }
31
- };
32
- </script>
33
-
34
- <style></style>
1
+ <template>
2
+ <van-calendar class="em-calendar" v-model="newValue" v-bind="$attrs" v-on="$listeners" />
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ inheritAttrs:false,
8
+ name: 'EmCalendar',
9
+ data(){
10
+ return{
11
+ show:false,
12
+
13
+ }
14
+ },
15
+ props:{
16
+ value:Boolean
17
+ },
18
+ computed:{
19
+ newValue:{
20
+ get(){
21
+ return this.value
22
+ },
23
+ set(val){
24
+ }
25
+ }
26
+ },
27
+
28
+ methods:{
29
+
30
+ }
31
+ };
32
+ </script>
33
+
34
+ <style></style>
@@ -1,5 +1,5 @@
1
- import EmCascader from './src/main';
2
-
3
- EmCascader.install = Vue => Vue.component(EmCascader.name, EmCascader);
4
-
5
- export default EmCascader;
1
+ import EmCascader from './src/main';
2
+
3
+ EmCascader.install = Vue => Vue.component(EmCascader.name, EmCascader);
4
+
5
+ export default EmCascader;