@kyfe/hroa-ui 1.0.6 → 1.0.8-beta.0

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 (246) hide show
  1. package/dist/hroa-ui.common.js +2344 -2381
  2. package/dist/hroa-ui.css +1 -1
  3. package/dist/hroa-ui.umd.js +2344 -2381
  4. package/dist/hroa-ui.umd.min.js +2 -2
  5. package/lib/h5-iaa/hr-assistant-profile/demo/index.css +1 -0
  6. package/lib/h5-iaa/hr-assistant-profile/demo/index.js +1 -0
  7. package/lib/hr-add-list/index.js +1 -1
  8. package/lib/hr-bottom-button/index.js +1 -1
  9. package/lib/hr-breadcrumb/index.js +2 -2
  10. package/lib/hr-button/index.js +1 -1
  11. package/lib/hr-checkbox/index.js +1 -1
  12. package/lib/hr-checkbox-group/index.js +1 -1
  13. package/lib/hr-clipboard/index.js +1 -1
  14. package/lib/hr-collapse-card/index.js +1 -1
  15. package/lib/hr-condition-filtrate/index.js +1 -1
  16. package/lib/hr-condition-filtrate-popup/index.js +1 -1
  17. package/lib/hr-date-filter/index.css +1 -1
  18. package/lib/hr-date-filter/index.js +1 -1
  19. package/lib/hr-dropdown-date/index.css +1 -1
  20. package/lib/hr-dropdown-date/index.js +1 -1
  21. package/lib/hr-elasticity-box/index.js +1 -1
  22. package/lib/hr-elasticity-box-item/index.js +1 -1
  23. package/lib/hr-emotional-picture/index.js +1 -1
  24. package/lib/hr-employee-choose/index.js +1 -1
  25. package/lib/hr-file-list/index.js +1 -1
  26. package/lib/hr-full-screen/index.js +1 -1
  27. package/lib/hr-img-list/index.css +1 -1
  28. package/lib/hr-img-list/index.js +1 -1
  29. package/lib/hr-info-card/index.js +1 -1
  30. package/lib/hr-information/index.js +1 -1
  31. package/lib/hr-license-plate-number/index.js +1 -1
  32. package/lib/hr-module-card/index.js +1 -1
  33. package/lib/hr-multiterm-choose/index.css +1 -1
  34. package/lib/hr-multiterm-choose/index.js +1 -1
  35. package/lib/hr-no-data/index.js +1 -1
  36. package/lib/hr-notice-bar/index.js +1 -1
  37. package/lib/hr-notification-dialog/index.js +1 -1
  38. package/lib/hr-open-ks/index.js +1 -1
  39. package/lib/hr-pager/index.js +1 -1
  40. package/lib/hr-popup/index.js +1 -1
  41. package/lib/hr-preview-file/index.js +1 -1
  42. package/lib/hr-radiobox/index.js +1 -1
  43. package/lib/hr-radiobox-group/index.js +1 -1
  44. package/lib/hr-rate/index.js +1 -1
  45. package/lib/hr-reason-textarea/index.js +1 -1
  46. package/lib/hr-search-input/index.js +1 -1
  47. package/lib/hr-search-tips/index.js +2 -2
  48. package/lib/hr-select/index.js +1 -1
  49. package/lib/hr-select-list/index.js +2 -2
  50. package/lib/hr-single-choose/index.css +1 -1
  51. package/lib/hr-single-choose/index.js +1 -1
  52. package/lib/hr-slide-pager/index.js +1 -1
  53. package/lib/hr-sort/index.js +1 -1
  54. package/lib/hr-stack-image/index.js +1 -1
  55. package/lib/hr-tab-nav/index.js +1 -1
  56. package/lib/hr-time-picker/index.js +1 -1
  57. package/lib/hr-view-item/index.js +1 -1
  58. package/lib/hr-virtual-list/index.js +1 -1
  59. package/lib/index/index.css +1 -1
  60. package/lib/index/index.js +2 -2
  61. package/lib/utils/index.js +1 -1
  62. package/package.json +82 -71
  63. package/lib/getJsModule/index.css +0 -1
  64. package/lib/getJsModule/index.js +0 -9
  65. package/packages/getJsModule.js +0 -11
  66. package/packages/hr-add-list/image/add.svg +0 -1
  67. package/packages/hr-add-list/image/close.svg +0 -1
  68. package/packages/hr-add-list/index.js +0 -7
  69. package/packages/hr-add-list/src/index.vue +0 -125
  70. 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
  71. package/packages/hr-bottom-button/index.js +0 -7
  72. package/packages/hr-bottom-button/src/index.vue +0 -128
  73. package/packages/hr-breadcrumb/index.js +0 -3
  74. package/packages/hr-breadcrumb/src/index.vue +0 -87
  75. package/packages/hr-breadcrumb//351/235/242/345/214/205/345/261/221.md +0 -0
  76. package/packages/hr-button/index.js +0 -13
  77. package/packages/hr-button/src/hr-button.vue +0 -39
  78. package/packages/hr-checkbox/index.js +0 -8
  79. package/packages/hr-checkbox/src/active-icon.png +0 -0
  80. package/packages/hr-checkbox/src/checkbox-group.vue +0 -74
  81. package/packages/hr-checkbox/src/checkbox.vue +0 -226
  82. package/packages/hr-checkbox/src/data.js +0 -46
  83. 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
  84. package/packages/hr-checkbox-group/index.js +0 -8
  85. package/packages/hr-clipboard/index.js +0 -8
  86. package/packages/hr-clipboard/src/index.vue +0 -46
  87. package/packages/hr-clipboard/src/util.js +0 -9
  88. package/packages/hr-collapse-card/index.js +0 -3
  89. package/packages/hr-collapse-card/src/images/icon_up.png +0 -0
  90. package/packages/hr-collapse-card/src/index.vue +0 -151
  91. package/packages/hr-collapse-card//346/212/230/345/217/240/345/215/241/347/211/207.md +0 -0
  92. package/packages/hr-condition-filtrate/enum/index.js +0 -11
  93. package/packages/hr-condition-filtrate/image/arrow-right.png +0 -0
  94. package/packages/hr-condition-filtrate/index.js +0 -7
  95. package/packages/hr-condition-filtrate/src/employee-choose/index.vue +0 -101
  96. package/packages/hr-condition-filtrate/src/index.vue +0 -246
  97. package/packages/hr-condition-filtrate/src/multiterm-choose/index.vue +0 -167
  98. package/packages/hr-condition-filtrate/src/org-tree-choose/index.vue +0 -102
  99. package/packages/hr-condition-filtrate/src/single-choose/index.vue +0 -144
  100. package/packages/hr-condition-filtrate/src/text-input/index.vue +0 -60
  101. package/packages/hr-condition-filtrate/src/time-selector/date-range-select.vue +0 -154
  102. package/packages/hr-condition-filtrate/src/time-selector/images/date-icon.png +0 -0
  103. package/packages/hr-condition-filtrate/src/time-selector/index.vue +0 -380
  104. package/packages/hr-condition-filtrate/src/time-selector/utils/constant.js +0 -30
  105. package/packages/hr-condition-filtrate/src/time-selector/utils/tools.js +0 -213
  106. package/packages/hr-condition-filtrate-popup/index.js +0 -7
  107. package/packages/hr-condition-filtrate-popup/src/index.vue +0 -236
  108. package/packages/hr-date-filter/index.js +0 -7
  109. package/packages/hr-date-filter/src/date-select.vue +0 -153
  110. package/packages/hr-date-filter/src/index.vue +0 -243
  111. package/packages/hr-date-filter/src/style.less +0 -130
  112. package/packages/hr-date-filter/src/utils.js +0 -109
  113. package/packages/hr-dropdown-date/index.js +0 -7
  114. package/packages/hr-dropdown-date/src/calendar/calendar.js +0 -128
  115. package/packages/hr-dropdown-date/src/calendar/calendar.vue +0 -485
  116. package/packages/hr-dropdown-date/src/calendar/images/arrow@3x.png +0 -0
  117. package/packages/hr-dropdown-date/src/calendar/index.js +0 -5
  118. package/packages/hr-dropdown-date/src/date-picker/date-range-select.vue +0 -92
  119. package/packages/hr-dropdown-date/src/date-picker/month-range-select.vue +0 -128
  120. package/packages/hr-dropdown-date/src/date-picker/month-select.vue +0 -98
  121. package/packages/hr-dropdown-date/src/date-picker/style.less +0 -120
  122. package/packages/hr-dropdown-date/src/date-picker/utils.js +0 -109
  123. package/packages/hr-dropdown-date/src/index.vue +0 -482
  124. package/packages/hr-dropdown-date/src/week.js +0 -194
  125. package/packages/hr-elasticity-box/index.js +0 -7
  126. package/packages/hr-elasticity-box/src/elasticity-box-item.vue +0 -61
  127. package/packages/hr-elasticity-box/src/index.vue +0 -52
  128. package/packages/hr-elasticity-box-item/index.js +0 -7
  129. package/packages/hr-emotional-picture/index.js +0 -7
  130. package/packages/hr-emotional-picture/src/index.vue +0 -66
  131. package/packages/hr-emotional-picture//346/203/205/346/204/237/345/233/276/347/273/204/344/273/266.md +0 -0
  132. package/packages/hr-employee-choose/index.js +0 -7
  133. package/packages/hr-employee-choose/src/image/arrow-right.png +0 -0
  134. package/packages/hr-employee-choose/src/index.vue +0 -119
  135. package/packages/hr-file-list/index.js +0 -3
  136. package/packages/hr-file-list/src/file-type/other.vue +0 -45
  137. package/packages/hr-file-list/src/file-type/picture.vue +0 -38
  138. package/packages/hr-file-list/src/file-type/video.vue +0 -60
  139. package/packages/hr-file-list/src/index.vue +0 -246
  140. package/packages/hr-file-list/src/utils/enum.js +0 -95
  141. package/packages/hr-file-list/src/utils/fun.js +0 -16
  142. package/packages/hr-file-list//346/226/207/344/273/266/345/210/227/350/241/250.md +0 -0
  143. package/packages/hr-full-screen/index.js +0 -7
  144. package/packages/hr-full-screen/src/index.vue +0 -117
  145. package/packages/hr-img-list/index.js +0 -3
  146. package/packages/hr-img-list/src/index.vue +0 -144
  147. package/packages/hr-img-list//345/244/232/345/233/276/345/210/227/350/241/250.md +0 -0
  148. package/packages/hr-info-card/index.js +0 -7
  149. package/packages/hr-info-card/src/index.vue +0 -67
  150. package/packages/hr-information/index.js +0 -7
  151. package/packages/hr-information/src/index.vue +0 -72
  152. package/packages/hr-license-plate-number/index.js +0 -8
  153. package/packages/hr-license-plate-number/src/enum.js +0 -44
  154. package/packages/hr-license-plate-number/src/index.vue +0 -164
  155. package/packages/hr-license-plate-number/src/vnp-keyboard.vue +0 -182
  156. package/packages/hr-license-plate-number//350/275/246/347/211/214/345/217/267/345/274/271/347/252/227.md +0 -0
  157. package/packages/hr-module-card/index.js +0 -13
  158. package/packages/hr-module-card/src/index.vue +0 -132
  159. 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
  160. package/packages/hr-multiterm-choose/index.js +0 -8
  161. package/packages/hr-multiterm-choose/src/active-icon.png +0 -0
  162. package/packages/hr-multiterm-choose/src/index.vue +0 -224
  163. package/packages/hr-multiterm-choose//345/244/232/351/200/211/346/241/206.md +0 -0
  164. package/packages/hr-no-data/index.js +0 -7
  165. package/packages/hr-no-data/src/index.vue +0 -48
  166. package/packages/hr-notice-bar/index.js +0 -7
  167. package/packages/hr-notice-bar/src/bem.js +0 -38
  168. package/packages/hr-notice-bar/src/index.js +0 -52
  169. package/packages/hr-notice-bar//351/200/232/347/237/245/346/240/217/347/273/204/344/273/266.md +0 -3
  170. package/packages/hr-notification-dialog/images/header.png +0 -0
  171. package/packages/hr-notification-dialog/index.js +0 -7
  172. package/packages/hr-notification-dialog/src/index.vue +0 -293
  173. 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
  174. package/packages/hr-open-ks/index.js +0 -7
  175. package/packages/hr-open-ks/src/icon.png +0 -0
  176. package/packages/hr-open-ks/src/index.vue +0 -97
  177. package/packages/hr-open-ks/src/util.js +0 -31
  178. package/packages/hr-pager/images/next-page.png +0 -0
  179. package/packages/hr-pager/images/prev-page.png +0 -0
  180. package/packages/hr-pager/index.js +0 -7
  181. package/packages/hr-pager/src/index.vue +0 -120
  182. 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
  183. package/packages/hr-popup/index.js +0 -3
  184. package/packages/hr-popup/src/index.vue +0 -64
  185. package/packages/hr-popup//345/274/271/345/207/272/345/261/202.md +0 -0
  186. package/packages/hr-preview-file/index.js +0 -7
  187. package/packages/hr-preview-file/src/index.vue +0 -58
  188. package/packages/hr-preview-file/src/util.js +0 -50
  189. package/packages/hr-radiobox/index.js +0 -8
  190. package/packages/hr-radiobox/src/data.js +0 -46
  191. package/packages/hr-radiobox/src/radiobox-group.vue +0 -64
  192. package/packages/hr-radiobox/src/radiobox.vue +0 -191
  193. package/packages/hr-radiobox-group/index.js +0 -8
  194. package/packages/hr-rate/index.js +0 -7
  195. package/packages/hr-rate/src/index.vue +0 -42
  196. 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
  197. package/packages/hr-reason-textarea/index.js +0 -7
  198. package/packages/hr-reason-textarea/src/index.vue +0 -128
  199. package/packages/hr-search-input/image/input-close-icon.png +0 -0
  200. package/packages/hr-search-input/image/search-icon.png +0 -0
  201. package/packages/hr-search-input/index.js +0 -8
  202. package/packages/hr-search-input/src/index.vue +0 -144
  203. package/packages/hr-search-tips/index.js +0 -3
  204. package/packages/hr-search-tips/src/index.vue +0 -213
  205. 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
  206. package/packages/hr-select/index.js +0 -7
  207. package/packages/hr-select/src/index.vue +0 -41
  208. package/packages/hr-select-list/index.js +0 -3
  209. package/packages/hr-select-list/src/index.vue +0 -214
  210. 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
  211. package/packages/hr-single-choose/index.js +0 -8
  212. package/packages/hr-single-choose/src/index.vue +0 -195
  213. package/packages/hr-single-choose//345/215/225/351/200/211/346/241/206.md +0 -0
  214. package/packages/hr-slide-pager/guide/image/turn-left.png +0 -0
  215. package/packages/hr-slide-pager/guide/image/turn-right.png +0 -0
  216. package/packages/hr-slide-pager/guide/index.vue +0 -59
  217. package/packages/hr-slide-pager/guide//346/226/260/346/211/213/346/214/207/345/274/225.md +0 -0
  218. package/packages/hr-slide-pager/index.js +0 -7
  219. package/packages/hr-slide-pager/src/index.vue +0 -374
  220. 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
  221. package/packages/hr-sort/index.js +0 -3
  222. package/packages/hr-sort/src/main.vue +0 -133
  223. package/packages/hr-sort//346/216/222/345/272/217.md +0 -0
  224. package/packages/hr-stack-image/index.js +0 -3
  225. package/packages/hr-stack-image/src/main.vue +0 -77
  226. 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
  227. package/packages/hr-tab-nav/index.js +0 -8
  228. package/packages/hr-tab-nav/src/index.vue +0 -190
  229. package/packages/hr-time-picker/index.js +0 -3
  230. package/packages/hr-time-picker/src/index.vue +0 -85
  231. package/packages/hr-time-picker//346/227/266/351/227/264/351/200/211/346/213/251/345/231/250.md +0 -0
  232. package/packages/hr-view-item/index.js +0 -13
  233. package/packages/hr-view-item/src/index.vue +0 -89
  234. package/packages/hr-view-item//350/241/250/345/215/225/351/241/271item/345/261/225/347/244/272.md +0 -0
  235. package/packages/hr-virtual-list/index.js +0 -7
  236. package/packages/hr-virtual-list/src/cc-item.vue +0 -105
  237. package/packages/hr-virtual-list/src/index.vue +0 -227
  238. package/packages/hr-virtual-list//350/231/232/346/213/237/345/210/227/350/241/250.md +0 -0
  239. package/packages/index.js +0 -23
  240. package/packages/utils/directive/common.js +0 -0
  241. package/packages/utils/directive/index.js +0 -2
  242. package/packages/utils/directive/specific.js +0 -54
  243. package/packages/utils/index.js +0 -7
  244. package/packages/utils/tool/common.js +0 -65
  245. package/packages/utils/tool/index.js +0 -2
  246. package/packages/utils/tool/specific.js +0 -0
@@ -1,67 +0,0 @@
1
- <script>
2
- export default {
3
- name: 'HrInfoCard',
4
- props: {
5
- title: {
6
- type: String,
7
- default: '标题'
8
- },
9
- size: {
10
- type: [String, Number],
11
- default: '15'
12
- },
13
- titleColor: {
14
- type: String,
15
- default: 'inherit'
16
- },
17
- weight: {
18
- type: String,
19
- default: 'bold'
20
- },
21
- background: {
22
- type: String,
23
- default: '#fff'
24
- },
25
- borderColor: {
26
- type: String,
27
- default: '#ebedf5'
28
- },
29
- titleBackground: {
30
- type: String,
31
- default: 'inherit'
32
- }
33
- },
34
- render () {
35
- const wrapStyle = {
36
- background: `${this.background}`,
37
- }
38
- const titleStyle = {
39
- fontSize: `${this.size}px`,
40
- color: this.titleColor,
41
- fontWeight: this.weight,
42
- borderBottom: `0.5px solid ${this.borderColor}`,
43
- background: `${this.titleBackground}`,
44
- }
45
- return (<div style={wrapStyle} class="hr-info-card">
46
- <div style={titleStyle} class="card-title">
47
- {this.$slots.title ? this.$slots.title : this.title}
48
- {this.$slots.right ? this.$slots.right : null}
49
- </div>
50
- {this.$slots.default ? this.$slots.default : null}
51
- </div>)
52
- }
53
- }
54
- </script>
55
- <style lang="less" scoped>
56
- .hr-info-card {
57
- border-radius: 6px;
58
- .card-title {
59
- padding: 16px;
60
- border-top-left-radius: 6px;
61
- border-top-right-radius: 6px;
62
- display: flex;
63
- justify-content: space-between;
64
- align-items: center;
65
- }
66
- }
67
- </style>
@@ -1,7 +0,0 @@
1
- import HrInformation from './src/index.vue'
2
-
3
- HrInformation.install = function (Vue) {
4
- Vue.component(HrInformation.name, HrInformation)
5
- }
6
-
7
- export default HrInformation
@@ -1,72 +0,0 @@
1
- <script>
2
- const IMMOBILIZATION_WIDTH = 58
3
- export default {
4
- name: 'HrInformation',
5
- props: {
6
- title: {
7
- type: String,
8
- default () {
9
- return '标题'
10
- }
11
- },
12
- value: {
13
- type: String,
14
- default () {
15
- return '内容'
16
- }
17
- },
18
- titleColor: {
19
- type: String,
20
- default () {
21
- return '#6E6D72'
22
- }
23
- },
24
- valueColor: {
25
- type: String,
26
- default () {
27
- return '#03050D'
28
- }
29
- }
30
- },
31
- data () {
32
- return {}
33
- },
34
- computed: {
35
- isAstrictWidth () {
36
- return this.title.length > 5
37
- }
38
- },
39
- methods: {
40
- },
41
- render () {
42
- return <div class="hr-information">
43
- <div class="information-title">
44
- <span class="title-astrict" style={{
45
- color: this.titleColor,
46
- width: this.isAstrictWidth ? `${IMMOBILIZATION_WIDTH}px` : null
47
- }}>{this.title}</span>
48
- </div>
49
- <span class="information-value" style={{
50
- color: this.valueColor
51
- }}>{this.value}</span>
52
- </div>
53
- }
54
- }
55
- </script>
56
-
57
- <style scoped lang="less">
58
- .hr-information {
59
- display: flex;
60
- font-size: 14px;
61
- padding: 5px 0;
62
- line-height: 20px;
63
- .information-title {
64
- width: 86px;
65
- display: flex;
66
- }
67
- .information-value {
68
- flex: 1;
69
- word-break: break-all;
70
- }
71
- }
72
- </style>
@@ -1,8 +0,0 @@
1
-
2
- import HrLicensePlateNumber from './src/index.vue'
3
-
4
- HrLicensePlateNumber.install = function (Vue) {
5
- Vue.component(HrLicensePlateNumber.name, HrLicensePlateNumber)
6
- }
7
-
8
- export default HrLicensePlateNumber
@@ -1,44 +0,0 @@
1
- // 语言
2
- export const LANGUAGE_TYPE = {
3
- CHINESE: 10,
4
- ENGLISH: 20
5
- }
6
-
7
- // 语言按钮
8
- export const LANGUAGE_BUTTON_TEXT = {
9
- [LANGUAGE_TYPE.CHINESE]: [
10
- ["京", "津", "沪", "渝", "冀", "豫", "云", "辽", "黑", "湘"],
11
- ["皖", "鲁", "新", "苏", "浙", "赣", "鄂", "桂", "甘", "晋"],
12
- ["蒙", "陕", "吉", "闽", "贵", "粤", "青", "藏", "川", "宁"],
13
- ["琼", "", "", "", "", "", "", "del"]
14
- ],
15
- [LANGUAGE_TYPE.ENGLISH]: [
16
- ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"],
17
- ["Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P"],
18
- ["A", "S", "D", "F", "G", "H", "J", "K", "L"],
19
- ["港", "澳", "Z", "X", "C", "V", "B", "N", "M", "del"]
20
- ],
21
- }
22
-
23
- // 按钮索引
24
- export const LANGUAGE_BUTTON_TYPE = {
25
- ZERO: 0,
26
- ONE: 1,
27
- TWO: 2,
28
- THREE: 3,
29
- FOUR: 4,
30
- FIVE: 5,
31
- SIX: 6,
32
- SEVEN: 7,
33
- }
34
-
35
- // 禁用按钮
36
- export const DISABLED_LANGUAGE_BUTTON_TEXT = {
37
- [LANGUAGE_BUTTON_TYPE.ONE]: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "I", "港", "澳"],
38
- [LANGUAGE_BUTTON_TYPE.TWO]: ["港", "澳", "O", "I"],
39
- [LANGUAGE_BUTTON_TYPE.THREE]: ["港", "澳", "O", "I"],
40
- [LANGUAGE_BUTTON_TYPE.FOUR]: ["港", "澳", "O", "I"],
41
- [LANGUAGE_BUTTON_TYPE.FIVE]: ["港", "澳", "O", "I"],
42
- [LANGUAGE_BUTTON_TYPE.SIX]: ["O", "I"],
43
- [LANGUAGE_BUTTON_TYPE.SEVEN]: ["港", "澳", "O", "I"],
44
- }
@@ -1,164 +0,0 @@
1
- <script>
2
- import Keyboard from './vnp-keyboard.vue'
3
- import { LANGUAGE_TYPE } from './enum.js'
4
- export default {
5
- name: 'HrLicensePlateNumber',
6
- components: {
7
- Keyboard,
8
- },
9
- props: {
10
- defaultValue: {
11
- type: String,
12
- default: '',
13
- }
14
- },
15
- data () {
16
- return {
17
- showKeyboard: false,
18
- currentIndex: '',
19
- updateKey: 1,
20
- numberList: [] // 车牌选项
21
- }
22
- },
23
- computed: {
24
- // 键盘中英切换
25
- keyboardType () {
26
- return this.currentIndex === 0 ? LANGUAGE_TYPE.CHINESE : LANGUAGE_TYPE.ENGLISH
27
- }
28
- },
29
- watch: {
30
- showKeyboard (newValue) {
31
- this.$emit('bindShow', newValue)
32
- }
33
- },
34
- mounted () {
35
- this.init()
36
- },
37
- methods: {
38
- init () {
39
- this.initNumberList()
40
- },
41
- // 组建车牌选项
42
- initNumberList () {
43
- this.numberList = this.defaultValue && this.defaultValue.split('') || []
44
- },
45
- // 点击车牌item
46
- handelClick (index) {
47
- this.currentIndex = index
48
- this.showKeyboard = true
49
- },
50
- // 点击键盘
51
- keyboardChange (val) {
52
- this.numberList.splice(this.currentIndex, 1, val)
53
- if (this.currentIndex < 7) {
54
- this.currentIndex++
55
- }
56
- this.updateKey++
57
- this.emitValue()
58
- },
59
- // 键盘删除按钮
60
- keyboardDelete () {
61
- this.numberList[this.currentIndex] = ''
62
- if (this.currentIndex > 0) {
63
- this.currentIndex--
64
- }
65
- this.updateKey++
66
- this.emitValue()
67
- },
68
- // 校验车牌号 满7位通过
69
- check () {
70
- let list = this.numberList.slice(0, 7)
71
- return list.every((item) => item)
72
- },
73
- emitValue () {
74
- let strValue = this.numberList.join('')
75
- this.$emit('change', strValue)
76
- },
77
- keyboardFinish () {
78
- if (!this.check()) {
79
- this.$toast('请输入正确的车牌号码')
80
- }
81
- }
82
- },
83
- render () {
84
- // 渲染单个车牌文本
85
- const renderNumberItem = (value, index) => {
86
- const isStartOrEnd = index === 0 || index === this.numberList.length - 1
87
- const text = index === 0 ? '省' : '新能源'
88
- return isStartOrEnd ? <div class="placeholder-val">{value || text}</div>
89
- : <div class="item-value"> {value}</div>
90
- }
91
-
92
- // 渲染车牌号
93
- const renderNumberList = () => {
94
- return <ks-row gutter="8">
95
- {
96
- this.numberList.map((item, index) => {
97
- return <ks-col
98
- onClick={this.handelClick.bind(this, index)}
99
- key={this.updateKey + index}
100
- span="3">
101
- <div class={[
102
- 'item-box',
103
- index === 7 && 'last-box',
104
- currentIndex === index && 'active'
105
- ]}> {renderNumberItem(item, index)} </div>
106
- </ks-col>
107
- })
108
- }
109
- </ks-row>
110
- }
111
-
112
- // 渲染键盘
113
- const renderKeyboard = () => {
114
- return <Keyboard show={this.showKeyboard}
115
- onUpdate:show={(value) => { this.showKeyboard = value }}
116
- onchange={this.keyboardChange}
117
- onDelete={this.keyboardDelete}
118
- onFinish={this.keyboardFinish}
119
- currentIndex={this.currentIndex} />
120
- }
121
-
122
- return <div class="hr-license-plate-number">
123
- {renderNumberList()}
124
- {renderKeyboard()}
125
- </div>
126
- }
127
- }
128
- </script>
129
-
130
- <style lang="less" scoped>
131
- .hr-license-plate-number {
132
- font-size: 14px;
133
- .van-col {
134
- & > div {
135
- background: #f7f8fa;
136
- border-radius: 4px;
137
- height: 42px;
138
- display: flex;
139
- align-items: center;
140
- justify-content: center;
141
- color: #03050d;
142
- box-sizing: border-box;
143
- }
144
- .item-box {
145
- &.active {
146
- border: 1px solid #7972fe;
147
- }
148
- }
149
- }
150
-
151
- .placeholder-val {
152
- color: #b0b3bf;
153
- }
154
- .last-box {
155
- border: 1px dashed #9adeb9;
156
- box-sizing: border-box;
157
- white-space: nowrap;
158
- .placeholder-val {
159
- font-size: 10px;
160
- transform: scale(0.8);
161
- }
162
- }
163
- }
164
- </style>
@@ -1,182 +0,0 @@
1
- <script>
2
- import { LANGUAGE_BUTTON_TEXT, LANGUAGE_TYPE, DISABLED_LANGUAGE_BUTTON_TEXT } from './enum.js'
3
- export default {
4
- props: {
5
- // 显示
6
- show: {
7
- type: Boolean,
8
- default: false
9
- },
10
- currentIndex: {
11
- type: [Number, String],
12
- default: 0
13
- },
14
- },
15
- computed: {
16
- visible: {
17
- set (val) {
18
- this.$emit("update:show", val);
19
- },
20
- get () {
21
- return this.show;
22
- }
23
- },
24
- list () {
25
- return LANGUAGE_BUTTON_TEXT[this.currentIndex === 0 ? LANGUAGE_TYPE.CHINESE : LANGUAGE_TYPE.ENGLISH]
26
- }
27
- },
28
- mounted () {
29
-
30
- },
31
- methods: {
32
- // 不同位数禁用按键
33
- itemDisabled (val) {
34
- const disabledList = DISABLED_LANGUAGE_BUTTON_TEXT[this.currentIndex] || []
35
- return disabledList.includes(val)
36
- },
37
- // 点击事件
38
- handleClickKey (val) {
39
- if (this.itemDisabled(val)) return
40
- if (val) { this.$emit('change', val) }
41
- },
42
- // 删除
43
- handleDel () {
44
- this.$emit('delete')
45
- },
46
- // 完成
47
- finish () {
48
- this.$emit('finish')
49
- this.visible = false
50
- }
51
- },
52
- render () {
53
- return <van-action-sheet
54
- value={this.visible}
55
- onInput={(value) => this.visible = value}
56
- overlay={false}
57
- get-container="body">
58
- <div class="vnp-header">
59
- <button type="button"
60
- class="vnp-btn-finish"
61
- onClick={this.finish}>完成</button>
62
- </div>
63
- <div class="vnp-keys">
64
- {
65
- this.list.map((item, index) => {
66
- <div class="vnp-keys-row" key={index}>
67
- {
68
- item.map((child, index) => {
69
- return <div class={[
70
- 'vnp-btn-key-wrapper',
71
- child === 'del' && 'vnp-del-wrapper'
72
- ]} key={index}>
73
- {
74
- child === 'del' ? <van-button
75
- class="vnp-btn-key"
76
- onClick={this.handleDel}>
77
- <svg viewBox="0 0 32 22"
78
- xmlns="http://www.w3.org/2000/svg"
79
- class="vnp-delete-icon">
80
- <path d="M28.016 0A3.991 3.991 0 0132 3.987v14.026c0 2.2-1.787 3.987-3.98 3.987H10.382c-.509 0-.996-.206-1.374-.585L.89 13.09C.33 12.62 0 11.84 0 11.006c0-.86.325-1.62.887-2.08L9.01.585A1.936 1.936 0 0110.383 0zm0 1.947H10.368L2.24 10.28c-.224.226-.312.432-.312.73 0 .287.094.51.312.729l8.128 8.333h17.648a2.041 2.041 0 002.037-2.04V3.987c0-1.127-.915-2.04-2.037-2.04zM23.028 6a.96.96 0 01.678.292.95.95 0 01-.003 1.377l-3.342 3.348 3.326 3.333c.189.188.292.43.292.679 0 .248-.103.49-.292.679a.96.96 0 01-.678.292.959.959 0 01-.677-.292L18.99 12.36l-3.343 3.345a.96.96 0 01-.677.292.96.96 0 01-.678-.292.962.962 0 01-.292-.68c0-.248.104-.49.292-.679l3.342-3.348-3.342-3.348A.963.963 0 0114 6.971c0-.248.104-.49.292-.679A.96.96 0 0114.97 6a.96.96 0 01.677.292l3.358 3.348 3.345-3.348A.96.96 0 0123.028 6z"
81
- fill="currentColor"></path>
82
- </svg>
83
- </van-button> : <van-button
84
- class={[
85
- 'vnp-btn-key',
86
- !child && 'vnp-btn-empty',
87
- this.itemDisabled(val) && 'disabled'
88
- ]}
89
- onClick={this.handleClickKey.bind(this, child)}>
90
- {{ val }}
91
- </van-button>
92
- }
93
- </div>
94
- })
95
- }
96
- </div>
97
- })
98
- }
99
- </div>
100
- </van-action-sheet>
101
- }
102
- }
103
- </script>
104
-
105
- <style lang="less" scoped>
106
- .vnp-header {
107
- height: 40px;
108
- position: relative;
109
- border-top: 1px solid #f1f1f1;
110
-
111
- .vnp-btn-finish {
112
- position: absolute;
113
- right: 0;
114
- height: 100%;
115
- padding: 0 16px;
116
- color: #7972fe;
117
- font-size: 14px;
118
- background-color: transparent;
119
- border: none;
120
- cursor: pointer;
121
- }
122
- }
123
-
124
- .vnp-input-box-outer {
125
- width: 82%;
126
- max-width: 600px;
127
- margin: 0 auto;
128
- padding: 10px;
129
- }
130
-
131
- .vnp-keys {
132
- padding: 3px;
133
- background: #f2f3f5;
134
- padding-bottom: 22px;
135
-
136
- .vnp-keys-row {
137
- height: 46px;
138
- display: flex;
139
- justify-content: center;
140
- }
141
- .vnp-btn-key-wrapper {
142
- flex: 0 1 calc((100% - 6px * 10) / 10);
143
- padding: 3px;
144
- box-sizing: content-box;
145
-
146
- &.vnp-del-wrapper,
147
- &.vnp-type-wrapper {
148
- flex: 1;
149
- }
150
- &.vnp-type-wrapper {
151
- .vnp-smaller {
152
- color: #999;
153
- font-size: 12px;
154
- }
155
- }
156
-
157
- .vnp-btn-key {
158
- width: 100%;
159
- border-radius: 4px;
160
- display: flex;
161
- align-items: center;
162
- justify-content: center;
163
- }
164
- .vnp-btn-empty {
165
- background: transparent;
166
- border: none;
167
- }
168
- button.disabled {
169
- background: #f2f3f5;
170
- color: #ccc;
171
- }
172
- .vnp-delete-icon {
173
- width: 18px;
174
- vertical-align: middle;
175
- }
176
- }
177
- }
178
- #kuasheng-h5 .van-button--normal,
179
- #kuasheng-h5 .van-button--small {
180
- padding: 0 0px !important;
181
- }
182
- </style>>
@@ -1,13 +0,0 @@
1
- /*
2
- * @Author : HR-OA-KTS 黄强 670604@ky-tech.com.cn
3
- * @Date : 2024-02-28 19:08:32
4
- * @Description :
5
- */
6
-
7
- import hrModuleCard from './src/index.vue'
8
-
9
- hrModuleCard.install = function (Vue) {
10
- Vue.component(hrModuleCard.name, hrModuleCard);
11
- };
12
-
13
- export default hrModuleCard;
@@ -1,132 +0,0 @@
1
- <!--
2
- * @Author : HR-OA-KTS 黄强 670604@ky-tech.com.cn
3
- * @Date : 2023-08-15 21:28:37
4
- * @Description :
5
- -->
6
- <template>
7
- <div :class="{'module-card': true,'card-radius': radius}">
8
- <div :class="{'card-title': true, 'title-divider': divider }"
9
- v-if="showTitle">
10
- <slot name="title">
11
- <!-- 标题插槽,如果没传则显示以下默认格式 -->
12
- <div class='title-txt'>
13
- <slot name="prefix"></slot>
14
- {{title}}
15
- </div>
16
- <div class="title-btn">
17
- <div v-if="refresh"
18
- @click="handleBtnClick('refresh')">
19
- <ks-icon name="replay" />
20
- </div>
21
- <div v-if="edit"
22
- @click="handleBtnClick('edit')">
23
- <ks-icon name="edit" />
24
- <!-- <ks-image :src="require('@/assets/images/icon-edit.svg')"></ks-image> -->
25
- </div>
26
- </div>
27
- </slot>
28
- </div>
29
- <div class="card-content">
30
- <slot></slot>
31
- </div>
32
- </div>
33
- </template>
34
-
35
- <script>
36
- export default {
37
- name: 'hr-module-card',
38
- props: {
39
- // 标题名称
40
- title: {
41
- type: String,
42
- default: '',
43
- },
44
- // 标题-刷新按钮
45
- refresh: {
46
- type: Boolean,
47
- default: false,
48
- },
49
- // 标题-编辑按钮
50
- edit: {
51
- type: Boolean,
52
- default: false,
53
- },
54
- // 标题分割线
55
- divider: {
56
- type: Boolean,
57
- default: true
58
- },
59
- // 卡片-默认圆角
60
- radius: {
61
- type: Boolean,
62
- default: true
63
- }
64
-
65
- },
66
- computed: {
67
- // 是否显示标题,根据传参决定
68
- showTitle () {
69
- const hasTitleProps = this.title
70
- const hasTitleSlots = this.$slots && this.$slots.title
71
- // 如果传递了title的props或者 传递slot=title的插槽则显示
72
- return hasTitleProps || hasTitleSlots
73
- }
74
- },
75
- created () {
76
- // console.log('this.props :>> ', this);
77
- },
78
- methods: {
79
- // 标题按钮点击事件
80
- handleBtnClick (type) {
81
- this.$emit('clickTitleBtn', type)
82
- },
83
- }
84
- }
85
- </script>
86
-
87
- <style lang="less" scoped>
88
- // 主题色
89
- @primaryColor: #7972fe;
90
- .module-card {
91
- margin-bottom: 10px;
92
- background-color: #fff;
93
- overflow: hidden;
94
- font-size: 14px;
95
- }
96
- .card-radius {
97
- border-radius: 8px;
98
- padding: 1px; // 留出了1px的白色底边
99
- }
100
- .card-title {
101
- display: flex;
102
- justify-content: space-between;
103
- align-items: center;
104
- padding: 14px 11px;
105
- background: linear-gradient(179deg, #edefff 9%, rgba(255, 255, 255, 0) 96%);
106
- }
107
- .title-divider {
108
- border-bottom: 1px solid #ebedf5;
109
- }
110
-
111
- .title-txt {
112
- color: #03050d;
113
- font-size: 16px;
114
- font-weight: 500;
115
- }
116
- .title-btn {
117
- display: flex;
118
- font-size: 12px;
119
- vertical-align: middle;
120
- color: @primaryColor;
121
- > div {
122
- margin-left: 5px;
123
- > i {
124
- vertical-align: middle;
125
- padding-right: 5px;
126
- }
127
- }
128
- }
129
-
130
- .card-content {
131
- }
132
- </style>