@kyfe/hroa-ui 1.0.6 → 1.0.7

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 (244) hide show
  1. package/dist/hroa-ui.common.js +133 -2576
  2. package/dist/hroa-ui.css +1 -1
  3. package/dist/hroa-ui.umd.js +133 -2576
  4. package/dist/hroa-ui.umd.min.js +2 -2
  5. package/lib/hr-add-list/index.js +1 -1
  6. package/lib/hr-bottom-button/index.js +1 -1
  7. package/lib/hr-breadcrumb/index.js +1 -1
  8. package/lib/hr-button/index.js +1 -1
  9. package/lib/hr-checkbox/index.js +1 -1
  10. package/lib/hr-checkbox-group/index.js +1 -1
  11. package/lib/hr-clipboard/index.js +1 -1
  12. package/lib/hr-collapse-card/index.js +1 -1
  13. package/lib/hr-condition-filtrate/index.js +1 -1
  14. package/lib/hr-condition-filtrate-popup/index.js +1 -1
  15. package/lib/hr-date-filter/index.css +1 -1
  16. package/lib/hr-date-filter/index.js +1 -1
  17. package/lib/hr-dropdown-date/index.css +1 -1
  18. package/lib/hr-dropdown-date/index.js +1 -1
  19. package/lib/hr-elasticity-box/index.js +1 -1
  20. package/lib/hr-elasticity-box-item/index.js +1 -1
  21. package/lib/hr-emotional-picture/index.js +1 -1
  22. package/lib/hr-employee-choose/index.js +1 -1
  23. package/lib/hr-file-list/index.js +1 -1
  24. package/lib/hr-full-screen/index.js +1 -1
  25. package/lib/hr-img-list/index.css +1 -1
  26. package/lib/hr-img-list/index.js +1 -1
  27. package/lib/hr-info-card/index.js +1 -1
  28. package/lib/hr-information/index.js +1 -1
  29. package/lib/hr-license-plate-number/index.js +1 -1
  30. package/lib/hr-module-card/index.js +1 -1
  31. package/lib/hr-multiterm-choose/index.css +1 -1
  32. package/lib/hr-multiterm-choose/index.js +1 -1
  33. package/lib/hr-no-data/index.js +1 -1
  34. package/lib/hr-notice-bar/index.js +1 -1
  35. package/lib/hr-notification-dialog/index.js +1 -1
  36. package/lib/hr-open-ks/index.js +1 -1
  37. package/lib/hr-pager/index.js +1 -1
  38. package/lib/hr-popup/index.js +1 -1
  39. package/lib/hr-preview-file/index.js +1 -1
  40. package/lib/hr-radiobox/index.js +1 -1
  41. package/lib/hr-radiobox-group/index.js +1 -1
  42. package/lib/hr-rate/index.js +1 -1
  43. package/lib/hr-reason-textarea/index.js +1 -1
  44. package/lib/hr-search-input/index.js +1 -1
  45. package/lib/hr-search-tips/index.js +1 -1
  46. package/lib/hr-select/index.js +1 -1
  47. package/lib/hr-select-list/index.js +1 -1
  48. package/lib/hr-single-choose/index.css +1 -1
  49. package/lib/hr-single-choose/index.js +1 -1
  50. package/lib/hr-slide-pager/index.js +1 -1
  51. package/lib/hr-sort/index.js +1 -1
  52. package/lib/hr-stack-image/index.js +1 -1
  53. package/lib/hr-tab-nav/index.js +1 -1
  54. package/lib/hr-time-picker/index.js +1 -1
  55. package/lib/hr-view-item/index.js +1 -1
  56. package/lib/hr-virtual-list/index.js +1 -1
  57. package/lib/index/index.css +1 -1
  58. package/lib/index/index.js +2 -2
  59. package/lib/utils/index.js +1 -1
  60. package/package.json +12 -9
  61. package/lib/getJsModule/index.css +0 -1
  62. package/lib/getJsModule/index.js +0 -9
  63. package/packages/getJsModule.js +0 -11
  64. package/packages/hr-add-list/image/add.svg +0 -1
  65. package/packages/hr-add-list/image/close.svg +0 -1
  66. package/packages/hr-add-list/index.js +0 -7
  67. package/packages/hr-add-list/src/index.vue +0 -125
  68. package/packages/hr-add-list//346/226/260/345/242/236/345/244/232/347/254/224/346/225/260/346/215/256.md +0 -0
  69. package/packages/hr-bottom-button/index.js +0 -7
  70. package/packages/hr-bottom-button/src/index.vue +0 -128
  71. package/packages/hr-breadcrumb/index.js +0 -3
  72. package/packages/hr-breadcrumb/src/index.vue +0 -87
  73. package/packages/hr-breadcrumb//351/235/242/345/214/205/345/261/221.md +0 -0
  74. package/packages/hr-button/index.js +0 -13
  75. package/packages/hr-button/src/hr-button.vue +0 -39
  76. package/packages/hr-checkbox/index.js +0 -8
  77. package/packages/hr-checkbox/src/active-icon.png +0 -0
  78. package/packages/hr-checkbox/src/checkbox-group.vue +0 -74
  79. package/packages/hr-checkbox/src/checkbox.vue +0 -226
  80. package/packages/hr-checkbox/src/data.js +0 -46
  81. package/packages/hr-checkbox//345/244/215/351/200/211/346/241/206-/345/215/225/351/200/211/346/241/206.md +0 -0
  82. package/packages/hr-checkbox-group/index.js +0 -8
  83. package/packages/hr-clipboard/index.js +0 -8
  84. package/packages/hr-clipboard/src/index.vue +0 -46
  85. package/packages/hr-clipboard/src/util.js +0 -9
  86. package/packages/hr-collapse-card/index.js +0 -3
  87. package/packages/hr-collapse-card/src/images/icon_up.png +0 -0
  88. package/packages/hr-collapse-card/src/index.vue +0 -151
  89. package/packages/hr-collapse-card//346/212/230/345/217/240/345/215/241/347/211/207.md +0 -0
  90. package/packages/hr-condition-filtrate/enum/index.js +0 -11
  91. package/packages/hr-condition-filtrate/image/arrow-right.png +0 -0
  92. package/packages/hr-condition-filtrate/index.js +0 -7
  93. package/packages/hr-condition-filtrate/src/employee-choose/index.vue +0 -101
  94. package/packages/hr-condition-filtrate/src/index.vue +0 -246
  95. package/packages/hr-condition-filtrate/src/multiterm-choose/index.vue +0 -167
  96. package/packages/hr-condition-filtrate/src/org-tree-choose/index.vue +0 -102
  97. package/packages/hr-condition-filtrate/src/single-choose/index.vue +0 -144
  98. package/packages/hr-condition-filtrate/src/text-input/index.vue +0 -60
  99. package/packages/hr-condition-filtrate/src/time-selector/date-range-select.vue +0 -154
  100. package/packages/hr-condition-filtrate/src/time-selector/images/date-icon.png +0 -0
  101. package/packages/hr-condition-filtrate/src/time-selector/index.vue +0 -380
  102. package/packages/hr-condition-filtrate/src/time-selector/utils/constant.js +0 -30
  103. package/packages/hr-condition-filtrate/src/time-selector/utils/tools.js +0 -213
  104. package/packages/hr-condition-filtrate-popup/index.js +0 -7
  105. package/packages/hr-condition-filtrate-popup/src/index.vue +0 -236
  106. package/packages/hr-date-filter/index.js +0 -7
  107. package/packages/hr-date-filter/src/date-select.vue +0 -153
  108. package/packages/hr-date-filter/src/index.vue +0 -243
  109. package/packages/hr-date-filter/src/style.less +0 -130
  110. package/packages/hr-date-filter/src/utils.js +0 -109
  111. package/packages/hr-dropdown-date/index.js +0 -7
  112. package/packages/hr-dropdown-date/src/calendar/calendar.js +0 -128
  113. package/packages/hr-dropdown-date/src/calendar/calendar.vue +0 -485
  114. package/packages/hr-dropdown-date/src/calendar/images/arrow@3x.png +0 -0
  115. package/packages/hr-dropdown-date/src/calendar/index.js +0 -5
  116. package/packages/hr-dropdown-date/src/date-picker/date-range-select.vue +0 -92
  117. package/packages/hr-dropdown-date/src/date-picker/month-range-select.vue +0 -128
  118. package/packages/hr-dropdown-date/src/date-picker/month-select.vue +0 -98
  119. package/packages/hr-dropdown-date/src/date-picker/style.less +0 -120
  120. package/packages/hr-dropdown-date/src/date-picker/utils.js +0 -109
  121. package/packages/hr-dropdown-date/src/index.vue +0 -482
  122. package/packages/hr-dropdown-date/src/week.js +0 -194
  123. package/packages/hr-elasticity-box/index.js +0 -7
  124. package/packages/hr-elasticity-box/src/elasticity-box-item.vue +0 -61
  125. package/packages/hr-elasticity-box/src/index.vue +0 -52
  126. package/packages/hr-elasticity-box-item/index.js +0 -7
  127. package/packages/hr-emotional-picture/index.js +0 -7
  128. package/packages/hr-emotional-picture/src/index.vue +0 -66
  129. package/packages/hr-emotional-picture//346/203/205/346/204/237/345/233/276/347/273/204/344/273/266.md +0 -0
  130. package/packages/hr-employee-choose/index.js +0 -7
  131. package/packages/hr-employee-choose/src/image/arrow-right.png +0 -0
  132. package/packages/hr-employee-choose/src/index.vue +0 -119
  133. package/packages/hr-file-list/index.js +0 -3
  134. package/packages/hr-file-list/src/file-type/other.vue +0 -45
  135. package/packages/hr-file-list/src/file-type/picture.vue +0 -38
  136. package/packages/hr-file-list/src/file-type/video.vue +0 -60
  137. package/packages/hr-file-list/src/index.vue +0 -246
  138. package/packages/hr-file-list/src/utils/enum.js +0 -95
  139. package/packages/hr-file-list/src/utils/fun.js +0 -16
  140. package/packages/hr-file-list//346/226/207/344/273/266/345/210/227/350/241/250.md +0 -0
  141. package/packages/hr-full-screen/index.js +0 -7
  142. package/packages/hr-full-screen/src/index.vue +0 -117
  143. package/packages/hr-img-list/index.js +0 -3
  144. package/packages/hr-img-list/src/index.vue +0 -144
  145. package/packages/hr-img-list//345/244/232/345/233/276/345/210/227/350/241/250.md +0 -0
  146. package/packages/hr-info-card/index.js +0 -7
  147. package/packages/hr-info-card/src/index.vue +0 -67
  148. package/packages/hr-information/index.js +0 -7
  149. package/packages/hr-information/src/index.vue +0 -72
  150. package/packages/hr-license-plate-number/index.js +0 -8
  151. package/packages/hr-license-plate-number/src/enum.js +0 -44
  152. package/packages/hr-license-plate-number/src/index.vue +0 -164
  153. package/packages/hr-license-plate-number/src/vnp-keyboard.vue +0 -182
  154. package/packages/hr-license-plate-number//350/275/246/347/211/214/345/217/267/345/274/271/347/252/227.md +0 -0
  155. package/packages/hr-module-card/index.js +0 -13
  156. package/packages/hr-module-card/src/index.vue +0 -132
  157. package/packages/hr-module-card//346/250/241/345/235/227/345/215/241/347/211/207/347/273/204/344/273/266.md +0 -29
  158. package/packages/hr-multiterm-choose/index.js +0 -8
  159. package/packages/hr-multiterm-choose/src/active-icon.png +0 -0
  160. package/packages/hr-multiterm-choose/src/index.vue +0 -224
  161. package/packages/hr-multiterm-choose//345/244/232/351/200/211/346/241/206.md +0 -0
  162. package/packages/hr-no-data/index.js +0 -7
  163. package/packages/hr-no-data/src/index.vue +0 -48
  164. package/packages/hr-notice-bar/index.js +0 -7
  165. package/packages/hr-notice-bar/src/bem.js +0 -38
  166. package/packages/hr-notice-bar/src/index.js +0 -52
  167. package/packages/hr-notice-bar//351/200/232/347/237/245/346/240/217/347/273/204/344/273/266.md +0 -3
  168. package/packages/hr-notification-dialog/images/header.png +0 -0
  169. package/packages/hr-notification-dialog/index.js +0 -7
  170. package/packages/hr-notification-dialog/src/index.vue +0 -293
  171. package/packages/hr-notification-dialog//345/274/271/347/252/227/346/217/220/347/244/272/347/273/204/344/273/266.md +0 -0
  172. package/packages/hr-open-ks/index.js +0 -7
  173. package/packages/hr-open-ks/src/icon.png +0 -0
  174. package/packages/hr-open-ks/src/index.vue +0 -97
  175. package/packages/hr-open-ks/src/util.js +0 -31
  176. package/packages/hr-pager/images/next-page.png +0 -0
  177. package/packages/hr-pager/images/prev-page.png +0 -0
  178. package/packages/hr-pager/index.js +0 -7
  179. package/packages/hr-pager/src/index.vue +0 -120
  180. package/packages/hr-pager//346/214/211/351/222/256/347/277/273/351/241/265/347/273/204/344/273/266.md +0 -0
  181. package/packages/hr-popup/index.js +0 -3
  182. package/packages/hr-popup/src/index.vue +0 -64
  183. package/packages/hr-popup//345/274/271/345/207/272/345/261/202.md +0 -0
  184. package/packages/hr-preview-file/index.js +0 -7
  185. package/packages/hr-preview-file/src/index.vue +0 -58
  186. package/packages/hr-preview-file/src/util.js +0 -50
  187. package/packages/hr-radiobox/index.js +0 -8
  188. package/packages/hr-radiobox/src/data.js +0 -46
  189. package/packages/hr-radiobox/src/radiobox-group.vue +0 -64
  190. package/packages/hr-radiobox/src/radiobox.vue +0 -191
  191. package/packages/hr-radiobox-group/index.js +0 -8
  192. package/packages/hr-rate/index.js +0 -7
  193. package/packages/hr-rate/src/index.vue +0 -42
  194. package/packages/hr-rate//350/257/204/345/210/206/347/273/204/344/273/266/357/274/210/345/270/246/346/226/207/346/241/210/357/274/211.md +0 -0
  195. package/packages/hr-reason-textarea/index.js +0 -7
  196. package/packages/hr-reason-textarea/src/index.vue +0 -128
  197. package/packages/hr-search-input/image/input-close-icon.png +0 -0
  198. package/packages/hr-search-input/image/search-icon.png +0 -0
  199. package/packages/hr-search-input/index.js +0 -8
  200. package/packages/hr-search-input/src/index.vue +0 -144
  201. package/packages/hr-search-tips/index.js +0 -3
  202. package/packages/hr-search-tips/src/index.vue +0 -213
  203. package/packages/hr-search-tips//350/277/234/347/250/213/346/250/241/347/263/212/346/220/234/347/264/242.md +0 -0
  204. package/packages/hr-select/index.js +0 -7
  205. package/packages/hr-select/src/index.vue +0 -41
  206. package/packages/hr-select-list/index.js +0 -3
  207. package/packages/hr-select-list/src/index.vue +0 -214
  208. package/packages/hr-select-list//344/270/213/346/213/211/351/200/211/346/213/251(/351/273/230/350/256/244/345/244/232/351/200/211).md +0 -0
  209. package/packages/hr-single-choose/index.js +0 -8
  210. package/packages/hr-single-choose/src/index.vue +0 -195
  211. package/packages/hr-single-choose//345/215/225/351/200/211/346/241/206.md +0 -0
  212. package/packages/hr-slide-pager/guide/image/turn-left.png +0 -0
  213. package/packages/hr-slide-pager/guide/image/turn-right.png +0 -0
  214. package/packages/hr-slide-pager/guide/index.vue +0 -59
  215. package/packages/hr-slide-pager/guide//346/226/260/346/211/213/346/214/207/345/274/225.md +0 -0
  216. package/packages/hr-slide-pager/index.js +0 -7
  217. package/packages/hr-slide-pager/src/index.vue +0 -374
  218. package/packages/hr-slide-pager//346/273/221/345/212/250/347/277/273/351/241/265/347/273/204/344/273/266.md +0 -0
  219. package/packages/hr-sort/index.js +0 -3
  220. package/packages/hr-sort/src/main.vue +0 -133
  221. package/packages/hr-sort//346/216/222/345/272/217.md +0 -0
  222. package/packages/hr-stack-image/index.js +0 -3
  223. package/packages/hr-stack-image/src/main.vue +0 -77
  224. package/packages/hr-stack-image//345/261/202/345/217/240/345/233/276/347/211/207/347/273/204/344/273/266.md +0 -0
  225. package/packages/hr-tab-nav/index.js +0 -8
  226. package/packages/hr-tab-nav/src/index.vue +0 -190
  227. package/packages/hr-time-picker/index.js +0 -3
  228. package/packages/hr-time-picker/src/index.vue +0 -85
  229. package/packages/hr-time-picker//346/227/266/351/227/264/351/200/211/346/213/251/345/231/250.md +0 -0
  230. package/packages/hr-view-item/index.js +0 -13
  231. package/packages/hr-view-item/src/index.vue +0 -89
  232. package/packages/hr-view-item//350/241/250/345/215/225/351/241/271item/345/261/225/347/244/272.md +0 -0
  233. package/packages/hr-virtual-list/index.js +0 -7
  234. package/packages/hr-virtual-list/src/cc-item.vue +0 -105
  235. package/packages/hr-virtual-list/src/index.vue +0 -227
  236. package/packages/hr-virtual-list//350/231/232/346/213/237/345/210/227/350/241/250.md +0 -0
  237. package/packages/index.js +0 -23
  238. package/packages/utils/directive/common.js +0 -0
  239. package/packages/utils/directive/index.js +0 -2
  240. package/packages/utils/directive/specific.js +0 -54
  241. package/packages/utils/index.js +0 -7
  242. package/packages/utils/tool/common.js +0 -65
  243. package/packages/utils/tool/index.js +0 -2
  244. package/packages/utils/tool/specific.js +0 -0
@@ -1,133 +0,0 @@
1
- <script>
2
- export default {
3
- props: {
4
- mode: {
5
- type: String,
6
- default: 'triangle'
7
- },
8
- sortList: {
9
- type: Array,
10
- default: () => []
11
- },
12
- sotyTypes: {
13
- type: Array,
14
- default: () => ['', '0', '1']
15
- },
16
- sortConifg: {
17
- type: Object,
18
- default: () => ({
19
- size: '4px',
20
- noramlColor: '#6e6d72',
21
- activeColor: '#d8d8d8'
22
- })
23
- }
24
- },
25
- emits: ['change'],
26
- data () {
27
- return {
28
- activeSortIndex: null,
29
- sortTypeIndex: '',
30
- }
31
- },
32
- computed: {
33
- isTriangleMode () {
34
- return this.mode === 'triangle'
35
- }
36
- },
37
- methods: {
38
- handelSortChange (index) {
39
- if (this.activeSortIndex !== index) {
40
- this.activeSortIndex = index
41
- this.sortTypeIndex = 1
42
- } else {
43
- const nextIndex = this.sortTypeIndex + 1
44
- this.sortTypeIndex = nextIndex > this.sotyTypes.length - 1 ? 0 : nextIndex
45
- }
46
- this.$emit('change', { ...this.sortList[index], order: this.sotyTypes[this.sortTypeIndex] })
47
- }
48
- },
49
- render () {
50
- const labelSlot = this.$scopedSlots.label
51
-
52
- const TriangleModeOperate = ({ props }) => {
53
- const { curIndex } = props
54
- const { size, noramlColor, activeColor } = this.sortConifg
55
- const getPositiveStyle = {
56
- width: 0,
57
- height: 0,
58
- borderLeft: `${size} solid transparent`,
59
- borderRight: `${size} solid transparent`,
60
- borderBottom: `${size} solid ${noramlColor}`,
61
- borderBottomColor: this.activeSortIndex === curIndex && this.sortTypeIndex === 2 ? activeColor : void 0
62
- }
63
- const getReverseStyle = {
64
- width: 0,
65
- height: 0,
66
- borderLeft: `${size} solid transparent`,
67
- borderRight: `${size} solid transparent`,
68
- borderTop: `${size} solid ${noramlColor}`,
69
- borderTopColor: this.activeSortIndex === curIndex && this.sortTypeIndex === 1 ? activeColor : void 0
70
- }
71
-
72
- return (
73
- <div class="sort-item__operate">
74
- <div class="operate-item" style={getPositiveStyle}>
75
- </div>
76
- <div class="operate-item" style={getReverseStyle}></div>
77
- </div>
78
- )
79
- }
80
-
81
- return (
82
- <div class="sort-area">
83
- {this.sortList.map((item, index) => {
84
- return (
85
- <div key={item.label} class="sort-item" onClick={() => this.handelSortChange(index)}>
86
- <div class="sort-item__label">
87
- {labelSlot ? labelSlot(item) : item.label}
88
- </div>
89
- {this.isTriangleMode ? <TriangleModeOperate curIndex={index}></TriangleModeOperate> : null}
90
- </div>
91
- )
92
- })}
93
- </div>
94
- )
95
- }
96
- }
97
- </script>
98
-
99
- <style lang="less" scoped>
100
- .sort-area {
101
- display: flex;
102
- align-items: center;
103
-
104
- .sort-item {
105
- &:not(&:last-child) {
106
- margin-right: 12px;
107
- }
108
- }
109
- }
110
-
111
- .sort-item {
112
- display: flex;
113
- align-items: center;
114
-
115
- &__label {
116
- font-size: 12px;
117
- color: #000;
118
- }
119
-
120
- &__operate {
121
- display: flex;
122
- flex-direction: column;
123
- width: 14px;
124
- align-items: center;
125
-
126
- .operate-item {
127
- &:first-child {
128
- margin-bottom: 2px;
129
- }
130
- }
131
- }
132
- }
133
- </style>
File without changes
@@ -1,3 +0,0 @@
1
- import hrStackImage from './src/main'
2
-
3
- export default hrStackImage
@@ -1,77 +0,0 @@
1
- <script>
2
- export default {
3
- name: 'HrStackImage',
4
- props: {
5
- list: {
6
- type: Array,
7
- default: () => []
8
- },
9
- size: {
10
- type: String,
11
- default: '30px'
12
- },
13
- radius: {
14
- type: String,
15
- default: '30px'
16
- },
17
- stackSize: {
18
- type: String,
19
- default: '6px'
20
- }
21
- },
22
- emits: ['click'],
23
- computed: {
24
- hasList () {
25
- return Array.isArray(this.list) && this.list.length > 0
26
- }
27
- },
28
- methods: {
29
- handleImageClick (index) {
30
- this.$emit('click', index)
31
- }
32
- },
33
- render () {
34
- const imgConfigStyle = {
35
- width: this.size,
36
- height: this.size,
37
- borderRadius: this.radius
38
- }
39
- return (
40
- this.hasList ? <div class="image-group">
41
- {
42
- this.list.map((url, index) =>
43
- <img
44
- src={url}
45
- style={{ ...imgConfigStyle, marginLeft: index === 0 ? '0' : `-${this.stackSize}` }}
46
- onClick={() => this.handleImageClick(index)}>
47
- </img>
48
- )
49
- }
50
- </div> : null
51
- )
52
- }
53
- }
54
- </script>
55
-
56
- <style lang="less" scoped>
57
- .image-group {
58
- display: flex;
59
- align-items: center;
60
-
61
- img {
62
- width: 20px;
63
- height: 20px;
64
- border-radius: 20px;
65
- border: 1px solid #ffffff;
66
- cursor: pointer;
67
-
68
- &:hover {
69
- transform: scale(1.5);
70
- }
71
-
72
- &:last-child {
73
- margin-left: 0;
74
- }
75
- }
76
- }
77
- </style>
@@ -1,8 +0,0 @@
1
-
2
- import HrTabNav from './src/index.vue'
3
-
4
- HrTabNav.install = function (Vue) {
5
- Vue.component(HrTabNav.name, HrTabNav)
6
- }
7
-
8
- export default HrTabNav
@@ -1,190 +0,0 @@
1
- <script>
2
- export default {
3
- name: 'HrTabNav',
4
- props: {
5
- defaultType: {
6
- type: Number,
7
- default () {
8
- return 10
9
- }
10
- },
11
- tabList: {
12
- type: Array,
13
- default () {
14
- return [
15
- {
16
- text: 'tab1',
17
- count: 0,
18
- type: 10
19
- },
20
- {
21
- text: 'tab2',
22
- count: 0,
23
- type: 20
24
- },
25
- {
26
- text: 'tab3',
27
- count: 10,
28
- type: 30
29
- },
30
- {
31
- text: 'tab4',
32
- count: 1000,
33
- type: 40
34
- },
35
- {
36
- text: 'tab5',
37
- count: 0,
38
- type: 50
39
- },
40
- {
41
- text: 'tab6',
42
- count: 0,
43
- type: 60
44
- },
45
- {
46
- text: 'tab7',
47
- count: 0,
48
- type: 70
49
- },
50
- {
51
- text: 'tab8',
52
- count: 0,
53
- type: 80
54
- },
55
- {
56
- text: 'tab9',
57
- count: 0,
58
- type: 90
59
- },
60
- ]
61
- }
62
- },
63
- marginRight: {
64
- type: Number || String,
65
- default () {
66
- return 37
67
- },
68
- },
69
- defaultColor: {
70
- type: String,
71
- default () {
72
- return '#858793'
73
- },
74
- },
75
- activeColor: {
76
- type: String,
77
- default () {
78
- return '#03050d'
79
- },
80
- },
81
- defaultFontSize: {
82
- type: Number || String,
83
- default () {
84
- return 14
85
- },
86
- },
87
- activeFontSize: {
88
- type: Number || String,
89
- default () {
90
- return 14
91
- },
92
- }
93
- },
94
- data () {
95
- return {
96
- currentType: this.tabList[0].type || 10
97
- }
98
- },
99
- watch: {
100
- defaultType: {
101
- immediate: true,
102
- handler (value) {
103
- this.currentType = value
104
- }
105
- }
106
- },
107
- methods: {
108
- switchTab (type) {
109
- this.currentType = type
110
- this.$emit('switchTab', type)
111
- }
112
- },
113
- render () {
114
- // render tab
115
- const renderHeaderTab = (params = {}, index) => {
116
- const { text, type, count } = params
117
- const active = this.currentType === type
118
- const isUndefined = typeof count === 'undefined'
119
- const marginRight = index === this.tabList.length - 1 ? null : this.marginRight
120
- const color = active ? this.activeColor : this.defaultColor
121
- const fontSize = active ? this.activeFontSize : this.defaultFontSize
122
-
123
- return <div class={['nav-item', active && 'active']} style={{
124
- marginRight: `${marginRight}px`,
125
- color,
126
- fontSize: `${fontSize}px`,
127
- }} onClick={this.switchTab.bind(this, type)}>
128
- {text} {isUndefined ? '' : count}
129
- {active && <i class="item-border"></i>}
130
- </div>
131
- }
132
-
133
- return <div class="hr-tab-nav">
134
- {
135
- this.tabList.map((item, index) => {
136
- return renderHeaderTab(item, index)
137
- })
138
- }
139
- {
140
- // <div class="nav-slot">
141
- // {
142
- // this.$slots.default || ''
143
- // }
144
- // </div>
145
- }
146
- </div>
147
- }
148
- }
149
- </script>
150
- <style scoped lang="less">
151
- .hr-tab-nav {
152
- display: flex;
153
- line-height: 36px;
154
- margin-bottom: 8px;
155
- width: 100%;
156
- overflow-x: scroll;
157
- overflow-y: hidden;
158
- &::-webkit-scrollbar {
159
- display: none;
160
- }
161
- .nav-item {
162
- font-weight: 600;
163
- position: relative;
164
- margin-right: 37px;
165
- font-size: 14px;
166
- color: #858793;
167
- white-space: nowrap;
168
- .item-border {
169
- width: 15px;
170
- height: 3px;
171
- position: absolute;
172
- left: 50%;
173
- bottom: 0;
174
- transform: translateX(-50%);
175
- background: #a68cff;
176
- border-radius: 1.5px;
177
- }
178
- &:last-child {
179
- margin: 0;
180
- }
181
- }
182
- .nav-slot {
183
- margin-left: auto;
184
- }
185
- .nav-item.active {
186
- font-size: 14px;
187
- color: #03050d;
188
- }
189
- }
190
- </style>
@@ -1,3 +0,0 @@
1
- import HrTimePicker from './src/index.vue'
2
-
3
- export default HrTimePicker
@@ -1,85 +0,0 @@
1
- <script>
2
- import HrPopup from '../../hr-popup'
3
-
4
- export default {
5
- name: 'HrTimePicker',
6
- components: {
7
- HrPopup
8
- },
9
- props: {
10
- show: {
11
- type: Boolean,
12
- default: false
13
- },
14
- // 挂载位置
15
- getContainer: {
16
- type: String,
17
- default: 'body'
18
- },
19
- value: {
20
- type: String | Date
21
- },
22
- // 标题
23
- title: String,
24
- // 时间类型,可选值为 datetime date time year-month
25
- type: {
26
- type: String,
27
- default: 'datetime'
28
- },
29
- minDate: {
30
- type: Date
31
- },
32
- maxDate: {
33
- type: Date
34
- },
35
- formatter: {
36
- type: Function
37
- },
38
- filter: {
39
- type: Function
40
- }
41
- },
42
- data () {
43
- return {
44
- isShowPopup: false,
45
- timeValue: ''
46
- }
47
- },
48
- watch: {
49
- show: {
50
- handler (val) {
51
- this.isShowPopup = val
52
- if (val) {
53
- this.timeValue = this.value || ''
54
- }
55
- },
56
- immediate: true
57
- }
58
- },
59
- render () {
60
- const { type, title, minDate, maxDate, formatter, filter } = this.$props
61
-
62
- return (
63
- <HrPopup show={this.isShowPopup}
64
- get-container={this.getContainer}
65
- position="bottom"
66
- safe-area-inset-bottom
67
- onClose={() => this.$emit('cancel')}>
68
- <div class="hr-fe-together-build-hr-time-picker">
69
- <van-datetime-picker
70
- value={this.timeValue}
71
- type={type}
72
- title={title}
73
- min-date={minDate}
74
- max-date={maxDate}
75
- formatter={formatter}
76
- filter={filter}
77
- onChange={(instance) => this.$emit('change', instance)}
78
- onConfirm={(val) => this.$emit('confirm', val)}
79
- onCancel={() => this.$emit('cancel')}></van-datetime-picker>
80
- </div>
81
- </HrPopup>
82
- )
83
- }
84
- }
85
- </script>
@@ -1,13 +0,0 @@
1
- /*
2
- * @Author : HR-OA-KTS 黄强 670604@ky-tech.com.cn
3
- * @Date : 2024-02-28 19:11:32
4
- * @Description :
5
- */
6
-
7
- import hrViewItem from './src/index.vue'
8
-
9
- hrViewItem.install = function (Vue) {
10
- Vue.component(hrViewItem.name, hrViewItem);
11
- };
12
-
13
- export default hrViewItem;
@@ -1,89 +0,0 @@
1
- <!--
2
- * @Author : HR-OA-KTS 黄强 670604@ky-tech.com.cn
3
- * @Date : 2023-08-23 19:07:30
4
- * @Description :
5
- -->
6
- <template>
7
- <div class="hr-view-info-item">
8
- <div class="label">
9
- <slot name="prefix"></slot>
10
- <span>{{ label }}</span>
11
- </div>
12
- <div class="content">
13
- <template v-if="hasValue()">
14
- <slot></slot>
15
- </template>
16
- <template v-else-if="showDefaultValue">
17
- <span> - </span>
18
- </template>
19
- </div>
20
- </div>
21
- </template>
22
-
23
- <script>
24
- export default {
25
- name: 'hr-view-item',
26
- props: {
27
- label: {
28
- type: String,
29
- default: ''
30
- },
31
- value: {
32
- type: String,
33
- default: ''
34
- },
35
- // 是否显示默认值 -
36
- showDefaultValue: {
37
- type: Boolean,
38
- default: true
39
- }
40
- },
41
- data () {
42
- return {
43
- }
44
- },
45
- created () {
46
- },
47
- mounted () {
48
- },
49
- methods: {
50
- // 是否传递有效插槽值
51
- hasValue () {
52
- const defaultSlots = this.$slots.default
53
- if (!defaultSlots) return false
54
- // 插槽是否传递文本
55
- let soltText = defaultSlots[0].text
56
- if (soltText) {
57
- // 处理自动转义的 /n 换行字符
58
- soltText = soltText.trim()
59
- }
60
- // 插槽是否传递dom
61
- const soltTag = defaultSlots[0].tag
62
-
63
- return soltText || soltTag
64
- }
65
- },
66
- computed: {
67
- },
68
- }
69
- </script>
70
-
71
- <style lang="less" scoped>
72
- .hr-view-info-item {
73
- display: flex;
74
- line-height: 28px;
75
- .label,
76
- .content {
77
- font-size: 14px;
78
- font-weight: normal;
79
- }
80
- .label {
81
- min-width: 86px;
82
- color: #6e6d72;
83
- }
84
- .content {
85
- color: #03050d;
86
- word-break: break-word;
87
- }
88
- }
89
- </style>
@@ -1,7 +0,0 @@
1
- import hrVirtualList from './src/index.vue'
2
-
3
- hrVirtualList.install = function (Vue) {
4
- Vue.component(hrVirtualList.name, hrVirtualList);
5
- };
6
-
7
- export default hrVirtualList;