@kyfe/hroa-ui 1.0.5 → 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 (226) hide show
  1. package/dist/hroa-ui.common.js +2927 -2545
  2. package/dist/hroa-ui.css +1 -1
  3. package/dist/hroa-ui.umd.js +2927 -2545
  4. package/dist/hroa-ui.umd.min.js +2 -2
  5. package/dist/img/header.7e31b1d5.png +0 -0
  6. package/lib/hr-add-list/index.js +1 -1
  7. package/lib/hr-bottom-button/index.js +1 -1
  8. package/lib/hr-breadcrumb/index.js +1 -1
  9. package/lib/hr-button/index.js +1 -1
  10. package/lib/hr-checkbox/index.css +1 -0
  11. package/lib/hr-checkbox/index.js +1 -0
  12. package/lib/hr-checkbox-group/index.css +1 -0
  13. package/lib/hr-checkbox-group/index.js +1 -0
  14. package/lib/hr-clipboard/index.js +1 -1
  15. package/lib/hr-collapse-card/index.js +1 -1
  16. package/lib/hr-condition-filtrate/index.js +1 -1
  17. package/lib/hr-condition-filtrate-popup/index.js +1 -1
  18. package/lib/hr-date-filter/index.css +1 -0
  19. package/lib/hr-date-filter/index.js +1 -0
  20. package/lib/hr-dropdown-date/index.css +1 -1
  21. package/lib/hr-dropdown-date/index.js +1 -1
  22. package/lib/hr-elasticity-box/index.js +1 -1
  23. package/lib/hr-elasticity-box-item/index.js +1 -1
  24. package/lib/hr-emotional-picture/index.js +1 -1
  25. package/lib/hr-employee-choose/index.js +1 -1
  26. package/lib/hr-file-list/index.css +1 -1
  27. package/lib/hr-file-list/index.js +1 -1
  28. package/lib/hr-full-screen/index.js +1 -1
  29. package/lib/hr-img-list/index.css +1 -1
  30. package/lib/hr-img-list/index.js +1 -1
  31. package/lib/hr-info-card/index.js +1 -1
  32. package/lib/hr-information/index.js +1 -1
  33. package/lib/hr-license-plate-number/index.js +1 -1
  34. package/lib/hr-module-card/index.js +1 -1
  35. package/lib/hr-multiterm-choose/index.css +1 -1
  36. package/lib/hr-multiterm-choose/index.js +1 -1
  37. package/lib/hr-no-data/index.js +1 -1
  38. package/lib/hr-notice-bar/index.js +1 -1
  39. package/lib/hr-notification-dialog/index.css +1 -0
  40. package/lib/hr-notification-dialog/index.js +1 -0
  41. package/lib/hr-open-ks/index.js +1 -1
  42. package/lib/hr-pager/index.css +1 -1
  43. package/lib/hr-pager/index.js +1 -1
  44. package/lib/hr-popup/index.js +1 -1
  45. package/lib/hr-preview-file/index.js +1 -1
  46. package/lib/hr-radiobox/index.css +1 -0
  47. package/lib/hr-radiobox/index.js +1 -0
  48. package/lib/hr-radiobox-group/index.css +1 -0
  49. package/lib/hr-radiobox-group/index.js +1 -0
  50. package/lib/hr-rate/index.js +1 -1
  51. package/lib/hr-reason-textarea/index.js +1 -1
  52. package/lib/hr-search-input/index.js +1 -1
  53. package/lib/hr-search-tips/index.css +1 -0
  54. package/lib/hr-search-tips/index.js +9 -0
  55. package/lib/hr-select/index.js +1 -1
  56. package/lib/hr-select-list/index.js +1 -1
  57. package/lib/hr-single-choose/index.css +1 -1
  58. package/lib/hr-single-choose/index.js +1 -1
  59. package/lib/hr-slide-pager/index.css +1 -1
  60. package/lib/hr-slide-pager/index.js +1 -1
  61. package/lib/hr-sort/index.js +1 -1
  62. package/lib/hr-stack-image/index.js +1 -1
  63. package/lib/hr-tab-nav/index.js +1 -1
  64. package/lib/hr-time-picker/index.css +1 -0
  65. package/lib/hr-time-picker/index.js +1 -0
  66. package/lib/hr-view-item/index.js +1 -1
  67. package/lib/hr-virtual-list/index.css +1 -0
  68. package/lib/hr-virtual-list/index.js +1 -0
  69. package/lib/img/header.7e31b1d5.png +0 -0
  70. package/lib/index/index.css +1 -1
  71. package/lib/index/index.js +2 -2
  72. package/lib/utils/index.js +1 -1
  73. package/package.json +17 -10
  74. package/lib/getJsModule/index.css +0 -1
  75. package/lib/getJsModule/index.js +0 -9
  76. package/packages/getJsModule.js +0 -11
  77. package/packages/hr-add-list/image/add.svg +0 -1
  78. package/packages/hr-add-list/image/close.svg +0 -1
  79. package/packages/hr-add-list/index.js +0 -7
  80. package/packages/hr-add-list/src/index.vue +0 -125
  81. 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
  82. package/packages/hr-bottom-button/index.js +0 -7
  83. package/packages/hr-bottom-button/src/index.vue +0 -128
  84. package/packages/hr-breadcrumb/index.js +0 -3
  85. package/packages/hr-breadcrumb/src/index.vue +0 -87
  86. package/packages/hr-breadcrumb//351/235/242/345/214/205/345/261/221.md +0 -0
  87. package/packages/hr-button/index.js +0 -13
  88. package/packages/hr-button/src/hr-button.vue +0 -39
  89. package/packages/hr-clipboard/index.js +0 -8
  90. package/packages/hr-clipboard/src/index.vue +0 -46
  91. package/packages/hr-clipboard/src/util.js +0 -9
  92. package/packages/hr-collapse-card/index.js +0 -3
  93. package/packages/hr-collapse-card/src/images/icon_up.png +0 -0
  94. package/packages/hr-collapse-card/src/index.vue +0 -151
  95. package/packages/hr-collapse-card//346/212/230/345/217/240/345/215/241/347/211/207.md +0 -0
  96. package/packages/hr-condition-filtrate/enum/index.js +0 -11
  97. package/packages/hr-condition-filtrate/image/arrow-right.png +0 -0
  98. package/packages/hr-condition-filtrate/index.js +0 -7
  99. package/packages/hr-condition-filtrate/src/employee-choose/index.vue +0 -101
  100. package/packages/hr-condition-filtrate/src/index.vue +0 -246
  101. package/packages/hr-condition-filtrate/src/multiterm-choose/index.vue +0 -167
  102. package/packages/hr-condition-filtrate/src/org-tree-choose/index.vue +0 -102
  103. package/packages/hr-condition-filtrate/src/single-choose/index.vue +0 -144
  104. package/packages/hr-condition-filtrate/src/text-input/index.vue +0 -60
  105. package/packages/hr-condition-filtrate/src/time-selector/date-range-select.vue +0 -154
  106. package/packages/hr-condition-filtrate/src/time-selector/images/date-icon.png +0 -0
  107. package/packages/hr-condition-filtrate/src/time-selector/index.vue +0 -380
  108. package/packages/hr-condition-filtrate/src/time-selector/utils/constant.js +0 -30
  109. package/packages/hr-condition-filtrate/src/time-selector/utils/tools.js +0 -213
  110. package/packages/hr-condition-filtrate-popup/index.js +0 -7
  111. package/packages/hr-condition-filtrate-popup/src/index.vue +0 -236
  112. package/packages/hr-dropdown-date/index.js +0 -7
  113. package/packages/hr-dropdown-date/src/calendar/calendar.js +0 -128
  114. package/packages/hr-dropdown-date/src/calendar/calendar.vue +0 -485
  115. package/packages/hr-dropdown-date/src/calendar/images/arrow@3x.png +0 -0
  116. package/packages/hr-dropdown-date/src/calendar/index.js +0 -5
  117. package/packages/hr-dropdown-date/src/date-picker/date-range-select.vue +0 -92
  118. package/packages/hr-dropdown-date/src/date-picker/month-range-select.vue +0 -128
  119. package/packages/hr-dropdown-date/src/date-picker/month-select.vue +0 -98
  120. package/packages/hr-dropdown-date/src/date-picker/style.less +0 -120
  121. package/packages/hr-dropdown-date/src/date-picker/utils.js +0 -109
  122. package/packages/hr-dropdown-date/src/index.vue +0 -482
  123. package/packages/hr-dropdown-date/src/week.js +0 -194
  124. package/packages/hr-elasticity-box/index.js +0 -7
  125. package/packages/hr-elasticity-box/src/elasticity-box-item.vue +0 -61
  126. package/packages/hr-elasticity-box/src/index.vue +0 -52
  127. package/packages/hr-elasticity-box-item/index.js +0 -7
  128. package/packages/hr-emotional-picture/index.js +0 -7
  129. package/packages/hr-emotional-picture/src/index.vue +0 -66
  130. package/packages/hr-emotional-picture//346/203/205/346/204/237/345/233/276/347/273/204/344/273/266.md +0 -0
  131. package/packages/hr-employee-choose/index.js +0 -7
  132. package/packages/hr-employee-choose/src/image/arrow-right.png +0 -0
  133. package/packages/hr-employee-choose/src/index.vue +0 -119
  134. package/packages/hr-file-list/index.js +0 -3
  135. package/packages/hr-file-list/src/file-type/other.vue +0 -45
  136. package/packages/hr-file-list/src/file-type/picture.vue +0 -38
  137. package/packages/hr-file-list/src/file-type/video.vue +0 -60
  138. package/packages/hr-file-list/src/index.vue +0 -246
  139. package/packages/hr-file-list/src/utils/enum.js +0 -95
  140. package/packages/hr-file-list/src/utils/fun.js +0 -16
  141. package/packages/hr-file-list//346/226/207/344/273/266/345/210/227/350/241/250.md +0 -0
  142. package/packages/hr-full-screen/index.js +0 -7
  143. package/packages/hr-full-screen/src/index.vue +0 -117
  144. package/packages/hr-img-list/index.js +0 -3
  145. package/packages/hr-img-list/src/index.vue +0 -144
  146. package/packages/hr-img-list//345/244/232/345/233/276/345/210/227/350/241/250.md +0 -0
  147. package/packages/hr-info-card/index.js +0 -7
  148. package/packages/hr-info-card/src/index.vue +0 -67
  149. package/packages/hr-information/index.js +0 -7
  150. package/packages/hr-information/src/index.vue +0 -72
  151. package/packages/hr-license-plate-number/index.js +0 -8
  152. package/packages/hr-license-plate-number/src/enum.js +0 -44
  153. package/packages/hr-license-plate-number/src/index.vue +0 -164
  154. package/packages/hr-license-plate-number/src/vnp-keyboard.vue +0 -182
  155. package/packages/hr-license-plate-number//350/275/246/347/211/214/345/217/267/345/274/271/347/252/227.md +0 -0
  156. package/packages/hr-module-card/index.js +0 -13
  157. package/packages/hr-module-card/src/index.vue +0 -132
  158. 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
  159. package/packages/hr-multiterm-choose/index.js +0 -8
  160. package/packages/hr-multiterm-choose/src/active-icon.png +0 -0
  161. package/packages/hr-multiterm-choose/src/index.vue +0 -225
  162. package/packages/hr-multiterm-choose//345/244/232/351/200/211/346/241/206.md +0 -0
  163. package/packages/hr-no-data/index.js +0 -7
  164. package/packages/hr-no-data/src/index.vue +0 -48
  165. package/packages/hr-notice-bar/index.js +0 -7
  166. package/packages/hr-notice-bar/src/bem.js +0 -38
  167. package/packages/hr-notice-bar/src/index.js +0 -52
  168. package/packages/hr-notice-bar//351/200/232/347/237/245/346/240/217/347/273/204/344/273/266.md +0 -3
  169. package/packages/hr-open-ks/index.js +0 -7
  170. package/packages/hr-open-ks/src/icon.png +0 -0
  171. package/packages/hr-open-ks/src/index.vue +0 -97
  172. package/packages/hr-open-ks/src/util.js +0 -31
  173. package/packages/hr-pager/images/next-page.png +0 -0
  174. package/packages/hr-pager/images/prev-page.png +0 -0
  175. package/packages/hr-pager/index.js +0 -7
  176. package/packages/hr-pager/src/index.vue +0 -96
  177. 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
  178. package/packages/hr-popup/index.js +0 -3
  179. package/packages/hr-popup/src/index.vue +0 -64
  180. package/packages/hr-popup//345/274/271/345/207/272/345/261/202.md +0 -0
  181. package/packages/hr-preview-file/index.js +0 -7
  182. package/packages/hr-preview-file/src/index.vue +0 -58
  183. package/packages/hr-preview-file/src/util.js +0 -50
  184. package/packages/hr-rate/index.js +0 -7
  185. package/packages/hr-rate/src/index.vue +0 -42
  186. 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
  187. package/packages/hr-reason-textarea/index.js +0 -7
  188. package/packages/hr-reason-textarea/src/index.vue +0 -128
  189. package/packages/hr-search-input/image/input-close-icon.png +0 -0
  190. package/packages/hr-search-input/image/search-icon.png +0 -0
  191. package/packages/hr-search-input/index.js +0 -8
  192. package/packages/hr-search-input/src/index.vue +0 -144
  193. package/packages/hr-select/index.js +0 -7
  194. package/packages/hr-select/src/index.vue +0 -41
  195. package/packages/hr-select-list/index.js +0 -3
  196. package/packages/hr-select-list/src/index.vue +0 -214
  197. 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
  198. package/packages/hr-single-choose/index.js +0 -8
  199. package/packages/hr-single-choose/src/index.vue +0 -196
  200. package/packages/hr-single-choose//345/215/225/351/200/211/346/241/206.md +0 -0
  201. package/packages/hr-slide-pager/guide/image/turn-left.png +0 -0
  202. package/packages/hr-slide-pager/guide/image/turn-right.png +0 -0
  203. package/packages/hr-slide-pager/guide/index.vue +0 -59
  204. package/packages/hr-slide-pager/guide//346/226/260/346/211/213/346/214/207/345/274/225.md +0 -0
  205. package/packages/hr-slide-pager/index.js +0 -7
  206. package/packages/hr-slide-pager/src/index.vue +0 -381
  207. 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
  208. package/packages/hr-sort/index.js +0 -3
  209. package/packages/hr-sort/src/main.vue +0 -133
  210. package/packages/hr-sort//346/216/222/345/272/217.md +0 -0
  211. package/packages/hr-stack-image/index.js +0 -3
  212. package/packages/hr-stack-image/src/main.vue +0 -77
  213. 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
  214. package/packages/hr-tab-nav/index.js +0 -8
  215. package/packages/hr-tab-nav/src/index.vue +0 -190
  216. package/packages/hr-view-item/index.js +0 -13
  217. package/packages/hr-view-item/src/index.vue +0 -89
  218. package/packages/hr-view-item//350/241/250/345/215/225/351/241/271item/345/261/225/347/244/272.md +0 -0
  219. package/packages/index.js +0 -23
  220. package/packages/utils/directive/common.js +0 -0
  221. package/packages/utils/directive/index.js +0 -2
  222. package/packages/utils/directive/specific.js +0 -54
  223. package/packages/utils/index.js +0 -7
  224. package/packages/utils/tool/common.js +0 -65
  225. package/packages/utils/tool/index.js +0 -2
  226. package/packages/utils/tool/specific.js +0 -0
@@ -1,214 +0,0 @@
1
- <script>
2
- import { cloneDeep } from 'lodash'
3
- import HrPopup from '../../hr-popup'
4
-
5
- export default {
6
- name: 'HrSelectList',
7
- components: {
8
- HrPopup
9
- },
10
- props: {
11
- show: {
12
- type: Boolean,
13
- default: false
14
- },
15
- // 标题
16
- title: String,
17
- // 默认值
18
- defaultValue: {
19
- type: [String, Array, Number],
20
- default: ''
21
- },
22
- // 选项value用到的字段
23
- valKey: {
24
- type: String,
25
- default: 'code'
26
- },
27
- // 选项显示值用到的字段
28
- labelKey: {
29
- type: String,
30
- default: 'text'
31
- },
32
- // 是否多选
33
- multiple: {
34
- type: Boolean,
35
- default: false
36
- },
37
- // 选项列
38
- columns: {
39
- type: Array,
40
- default: () => ([])
41
- },
42
- // 挂载位置
43
- getContainer: {
44
- type: String,
45
- default: 'body'
46
- },
47
- closeable: {
48
- type: Boolean
49
- },
50
- // 弹出位置,可选值为 top bottom right left
51
- position: {
52
- type: String,
53
- default: 'bottom'
54
- },
55
- // 展示确认按钮
56
- showSubmitBtn: {
57
- type: Boolean,
58
- default: true
59
- },
60
- // 确定按钮文本
61
- submitBtnTxt: {
62
- type: String,
63
- default: '确定'
64
- }
65
- },
66
- data () {
67
- return {
68
- isShowPopup: false,
69
- selectValue: [],
70
- popupStyle: ''
71
- }
72
- },
73
- watch: {
74
- position: {
75
- handler (val) {
76
- const positionCls = {
77
- top: 'border-radius: 0 0 10px 10px',
78
- bottom: 'border-radius: 10px 10px 0 0',
79
- left: 'border-radius: 0 10px 10px 0',
80
- right: 'border-radius: 10px 0 0 10px '
81
- }
82
- this.popupStyle = positionCls[val] || 'border-radius: 0'
83
- },
84
- immediate: true
85
- },
86
- show: {
87
- handler (val) {
88
- this.isShowPopup = val
89
- if (val) {
90
- this.loadValue()
91
- }
92
- },
93
- immediate: true
94
- }
95
- },
96
- render () {
97
- return (
98
- // get-container挂载在body的原因:防止被外部组件内容遮挡
99
- <HrPopup show={this.isShowPopup}
100
- get-container={this.getContainer}
101
- closeable={this.closeable}
102
- position={this.position}
103
- popupStyle={this.popupStyle}
104
- safe-area-inset-bottom={this.position === 'bottom'}
105
- title={this.title}
106
- onClose={this.close}>
107
- <div class="hr-select-list">
108
- <div class="list-box">
109
- {
110
- this.columns.map((item) => {
111
- return <div class={['option-item', this.isSelectedOption(item[this.valKey]) ? 'active' : '']}
112
- onClick={() => this.optionClick(item[this.valKey])}>
113
- {item[this.labelKey]}
114
- <div class="check-box">
115
- {
116
- this.isSelectedOption(item[this.valKey]) && <ks-icon name="success" class="icon-cls" />
117
- }
118
- </div>
119
- </div>
120
- })
121
- }
122
- </div>
123
- {this.showSubmitBtn && <div class="submit-btn" onClick={this.submit}>{this.submitBtnTxt}</div>}
124
- </div>
125
- </HrPopup>
126
- )
127
- },
128
- methods: {
129
- loadValue () {
130
- const val = cloneDeep(this.defaultValue)
131
- if (Object.prototype.toString.call(val) === '[object String]') {
132
- this.selectValue = val ? [val] : []
133
- } else if (Object.prototype.toString.call(val) === '[object Number]') {
134
- this.selectValue = String(val) ? [String(val)] : []
135
- } else {
136
- this.selectValue = val || []
137
- }
138
- },
139
- isSelectedOption (key) {
140
- return this.selectValue.some(i => String(i) === String(key))
141
- },
142
- // 当前值
143
- optionClick (key) {
144
- const selectedOptions = this.selectValue || []
145
- if (this.multiple) {
146
- const hasSelected = selectedOptions.some(i => String(i) === String(key))
147
- if (hasSelected) {
148
- this.selectValue = selectedOptions.filter(i => String(i) !== String(key))
149
- } else {
150
- this.selectValue.push(key)
151
- }
152
- } else {
153
- this.selectValue = [key]
154
- }
155
- this.optionClickAfter(key)
156
- },
157
- // 选项点击后执行回调
158
- optionClickAfter (key) {
159
- const selectOptions = this.columns.filter(i => this.selectValue.includes(i[this.valKey]))
160
- this.$emit('optionClick', key, this.selectValue, selectOptions)
161
- },
162
- close () {
163
- const selectOptions = this.columns.filter(i => this.selectValue.includes(i[this.valKey]))
164
- this.isShowPopup = false
165
- this.$emit('close', this.selectValue, selectOptions)
166
- },
167
- submit () {
168
- const selectOptions = this.columns.filter(i => this.selectValue.includes(i[this.valKey]))
169
- this.$emit('change', this.selectValue, selectOptions)
170
- }
171
- }
172
- }
173
- </script>
174
-
175
-
176
- <style lang="less" scoped>
177
- .hr-select-list {
178
- // min-height: 30vh;
179
- max-height: 70vh;
180
- display: flex;
181
- flex-direction: column;
182
- .list-box {
183
- flex: 1;
184
- padding: 4px 0;
185
- overflow: auto;
186
- .option-item {
187
- padding: 12px 16px;
188
- font-size: 14px;
189
- color: #03050d;
190
- display: flex;
191
- justify-content: space-between;
192
- align-items: center;
193
- &.active {
194
- color: #7972fe;
195
- }
196
- .check-box {
197
- width: 14px;
198
- }
199
- }
200
- }
201
- .submit-btn {
202
- min-height: 40px;
203
- max-height: 40px;
204
- margin: 24px 16px 8px 16px;
205
- font-size: 16px;
206
- color: #ffffff;
207
- border-radius: 8px;
208
- background: #7972fe;
209
- display: flex;
210
- justify-content: center;
211
- align-items: center;
212
- }
213
- }
214
- </style>
@@ -1,8 +0,0 @@
1
-
2
- import HrSingleChoose from './src/index.vue'
3
-
4
- HrSingleChoose.install = function (Vue) {
5
- Vue.component(HrSingleChoose.name, HrSingleChoose)
6
- }
7
-
8
- export default HrSingleChoose
@@ -1,196 +0,0 @@
1
- <script>
2
- export default {
3
- name: 'HrSingleChoose',
4
- props: {
5
- list: {
6
- type: Array,
7
- default () {
8
- return [
9
- {
10
- label: '课程类型',
11
- value: 10
12
- },
13
- {
14
- label: '课程类型2',
15
- value: 20
16
- },
17
- {
18
- label: '课程类型3',
19
- value: 30
20
- },
21
- {
22
- label: '课程类型4',
23
- value: 40
24
- }
25
- ]
26
- }
27
- },
28
- title: {
29
- type: String,
30
- default () {
31
- return ''
32
- }
33
- },
34
- isShowAll: {
35
- type: Boolean,
36
- default () {
37
- return false
38
- }
39
- },
40
- divideeQually: {
41
- type: Number,
42
- default () {
43
- return 3
44
- }
45
- },
46
- margin: {
47
- type: Number,
48
- default () {
49
- return 12
50
- }
51
- },
52
- marginBottom: {
53
- type: Number,
54
- default () {
55
- return this.margin
56
- }
57
- },
58
- selfAdaption: {
59
- type: Boolean,
60
- default () {
61
- return false
62
- }
63
- },
64
- checkValue: {
65
- type: String || Number,
66
- default () {
67
- return -1
68
- }
69
- }
70
- },
71
- data () {
72
- return {
73
- active: -1
74
- }
75
- },
76
- created () {
77
- this.init()
78
- },
79
- computed: {
80
- filterList () {
81
- return this.isShowAll ? [{ label: '全部', value: 0 }].concat(this.list) : this.list
82
- }
83
- },
84
- watch: {
85
- checkValue: {
86
- handler (newValue) {
87
- this.initActive(newValue)
88
- },
89
- immediate: true
90
- }
91
- },
92
- methods: {
93
- init () {
94
- this.initState()
95
- },
96
- initState () {
97
- },
98
- initActive (newValue) {
99
- this.active = newValue
100
- },
101
- select (value, index) {
102
- this.active = this.active === value ? -1 : value
103
- this.$emit('select', this.filterList[index])
104
- },
105
- },
106
- render () {
107
- const width = this.selfAdaption ? null : `calc((100% - ${this.margin * (this.divideeQually - 1)}px) / ${this.divideeQually})`
108
- const marginBottom = this.selfAdaption ? null : `${this.marginBottom}px`
109
- const gap = this.selfAdaption ? `${this.margin}px` : null
110
- return <div class="single-choose">
111
- {
112
- this.title && <div class="choose-title">{this.title}</div>
113
- }
114
- <div class="choose-condition" style={{ gap }}>
115
- {
116
- this.filterList.map((item, index) => {
117
- const marginRight = this.selfAdaption ? null : `${(index + 1) % this.divideeQually === 0 ? 0 : this.margin}px`
118
- const { value, label } = item
119
- return <div
120
- onClick={this.select.bind(this, value, index)}
121
- style={{ width, marginRight, marginBottom }}
122
- class={[
123
- 'condition-item',
124
- 'ellipsis',
125
- this.active === value && 'active',
126
- ]}>
127
- {label}
128
- </div>
129
- })
130
- }
131
- </div>
132
- </div>
133
- }
134
- }
135
- </script>
136
-
137
- <style scoped lang="less">
138
- .ellipsis {
139
- overflow: hidden;
140
- white-space: nowrap;
141
- text-overflow: ellipsis;
142
- }
143
- .single-choose {
144
- .choose-title {
145
- line-height: 20px;
146
- margin-bottom: 12px;
147
- text-align: left;
148
- font-size: 14px;
149
- font-weight: 600;
150
- color: #03050d;
151
- .title-black {
152
- font-size: 14px;
153
- font-weight: normal;
154
- color: #6e6d72;
155
- }
156
- }
157
- .choose-condition {
158
- display: flex;
159
- flex-wrap: wrap;
160
- justify-content: flex-start;
161
- .condition-item {
162
- // width: calc((100% - 16px) / 3);
163
- height: 28px;
164
- border-radius: 8px;
165
- box-sizing: border-box;
166
- background: #f7f8fa;
167
- text-align: center;
168
- line-height: 27px;
169
- color: #03050d;
170
- font-size: 12px;
171
- padding: 0 8px;
172
- position: relative;
173
- }
174
- .condition-item.active {
175
- // border: 1px solid rgba(121, 114, 254, 0.8);
176
- background: rgba(121, 114, 254, 0.08);
177
- color: #7972fe;
178
- &::after {
179
- content: " ";
180
- position: absolute;
181
- left: 0;
182
- top: 0;
183
- width: calc(200% - 2px);
184
- height: calc(200% - 2px);
185
- border: 1px solid #7972fe;
186
- border-radius: 16px;
187
- box-sizing: border-box;
188
- -webkit-transform-origin: 0 0;
189
- transform-origin: 0 0;
190
- -webkit-transform: scale(0.5);
191
- transform: scale(0.5);
192
- }
193
- }
194
- }
195
- }
196
- </style>
@@ -1,59 +0,0 @@
1
- <template>
2
- <div class="slide-pager-guide">
3
- <div class="content-box">
4
- <div class="arrow-img">
5
- <img src="./image/turn-left.png">
6
- <img src="./image/turn-right.png">
7
- </div>
8
-
9
- <div class="tips">左右滑动可切换上下篇</div>
10
-
11
- <van-button type="primary"
12
- style="width: 128px; height: 40px;"
13
- @click="$emit('markRead')">知道了</van-button>
14
- </div>
15
- </div>
16
- </template>
17
-
18
- <script>
19
- export default {
20
- }
21
- </script>
22
-
23
- <style lang="less" scoped>
24
- .slide-pager-guide {
25
- position: fixed;
26
- left: 0;
27
- top: 0;
28
- height: 100%;
29
- width: 100%;
30
- z-index: 999;
31
- // opacity: 1;
32
- /* 中性色/蒙层#000000-70% */
33
- background: rgba(0, 0, 0, 0.7);
34
- display: flex;
35
- align-items: center;
36
- justify-content: center;
37
-
38
- .content-box {
39
- display: flex;
40
- flex-direction: column;
41
- align-items: center;
42
- justify-content: center;
43
- }
44
-
45
- .arrow-img {
46
- display: flex;
47
- align-items: center;
48
- justify-content: space-around;
49
- > img {
50
- width: 28%;
51
- }
52
- }
53
- .tips {
54
- margin: 60px 0;
55
- font-size: 32px;
56
- color: #ffffff;
57
- }
58
- }
59
- </style>
@@ -1,7 +0,0 @@
1
- import hrSlidePager from './src/index.vue'
2
-
3
- hrSlidePager.install = function (Vue) {
4
- Vue.component(hrSlidePager.name, hrSlidePager);
5
- };
6
-
7
- export default hrSlidePager;