@10yun/cv-mobile-ui 0.4.2 → 0.4.3

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 (166) hide show
  1. package/package.json +1 -1
  2. package/ui-uni/amap-wx/js/util.js +166 -158
  3. package/ui-uni/page-foot/page-foot.vue +38 -0
  4. package/ui-uni/page-head/page-head.vue +16 -0
  5. package/ui-uni/product.vue +52 -52
  6. package/ui-uni/u-charts/u-charts.js +743 -1092
  7. package/ui-uni/u-link/u-link.vue +59 -0
  8. package/ui-uni/uni-badge/uni-badge.vue +250 -0
  9. package/ui-uni/uni-calendar/calendar.js +546 -0
  10. package/ui-uni/uni-calendar/uni-calendar-item.vue +171 -0
  11. package/ui-uni/uni-calendar/uni-calendar.vue +504 -0
  12. package/{ui-cv/cv-calendar → ui-uni/uni-calendar}/util.js +0 -0
  13. package/ui-uni/uni-card/uni-card.vue +420 -0
  14. package/ui-uni/uni-col/uni-col.vue +2968 -0
  15. package/ui-uni/uni-collapse/uni-collapse.vue +146 -0
  16. package/ui-uni/uni-collapse-item/uni-collapse-item.vue +378 -0
  17. package/ui-uni/uni-combox/uni-combox.vue +237 -0
  18. package/ui-uni/uni-countdown/uni-countdown.vue +234 -0
  19. package/ui-uni/uni-data-checkbox/uni-data-checkbox.vue +792 -0
  20. package/{ui-cv/cv-data-indexed-list → ui-uni/uni-data-indexed-list}/clientdb.js +0 -0
  21. package/ui-uni/uni-data-indexed-list/uni-data-indexed-list-item.vue +142 -0
  22. package/ui-uni/uni-data-indexed-list/uni-data-indexed-list.vue +364 -0
  23. package/{ui-cv/cv-data-picker → ui-uni/uni-data-picker}/keypress.js +0 -0
  24. package/ui-uni/uni-data-picker/uni-data-picker.vue +468 -0
  25. package/{ui-cv/cv-data-pickerview/cv-data-picker.js → ui-uni/uni-data-pickerview/uni-data-picker.js} +0 -0
  26. package/ui-uni/uni-data-pickerview/uni-data-pickerview.vue +298 -0
  27. package/{ui-cv/cv-dateformat → ui-uni/uni-dateformat}/date-format.js +0 -0
  28. package/ui-uni/uni-dateformat/uni-dateformat.vue +88 -0
  29. package/{ui-cv/cv-datetime-picker → ui-uni/uni-datetime-picker}/calendar-item.vue +0 -0
  30. package/{ui-cv/cv-datetime-picker → ui-uni/uni-datetime-picker}/calendar.js +0 -0
  31. package/ui-uni/uni-datetime-picker/calendar.vue +747 -0
  32. package/{ui-cv/cv-datetime-picker → ui-uni/uni-datetime-picker}/keypress.js +0 -0
  33. package/ui-uni/uni-datetime-picker/time-picker.vue +899 -0
  34. package/ui-uni/uni-datetime-picker/uni-datetime-picker.vue +874 -0
  35. package/{ui-cv/cv-datetime-picker → ui-uni/uni-datetime-picker}/util.js +0 -0
  36. package/ui-uni/uni-drawer/keypress.js +45 -0
  37. package/ui-uni/uni-drawer/uni-drawer.vue +178 -0
  38. package/{ui-cv/cv-easyinput → ui-uni/uni-easyinput}/common.js +0 -0
  39. package/ui-uni/uni-easyinput/uni-easyinput.vue +438 -0
  40. package/ui-uni/uni-fab/uni-fab.vue +443 -0
  41. package/{ui-cv/cv-fab/cv-fab.vue.bak → ui-uni/uni-fab/uni-fab.vue.bak} +2 -2
  42. package/ui-uni/uni-fav/uni-fav.vue +136 -0
  43. package/{ui-cv/cv-file-picker → ui-uni/uni-file-picker}/choose-and-upload-file.js +0 -0
  44. package/ui-uni/uni-file-picker/uni-file-picker.vue +614 -0
  45. package/{ui-cv/cv-file-picker → ui-uni/uni-file-picker}/upload-file.vue +0 -0
  46. package/{ui-cv/cv-file-picker → ui-uni/uni-file-picker}/upload-image.vue +0 -0
  47. package/{ui-cv/cv-file-picker → ui-uni/uni-file-picker}/utils.js +0 -0
  48. package/ui-uni/uni-forms/uni-forms.vue +467 -0
  49. package/ui-uni/uni-forms/validate.js +486 -0
  50. package/ui-uni/uni-forms-item/uni-forms-item.vue +500 -0
  51. package/{ui-cv/cv-goods-nav/cv-goods-nav.vue → ui-uni/uni-goods-nav/uni-goods-nav.vue} +1 -1
  52. package/ui-uni/uni-grid/uni-grid.vue +141 -0
  53. package/ui-uni/uni-grid-item/uni-grid-item.vue +123 -0
  54. package/ui-uni/uni-group/uni-group.vue +123 -0
  55. package/ui-uni/uni-icons/icons.js +132 -0
  56. package/ui-uni/uni-icons/uni-icons.vue +72 -0
  57. package/{ui-cv/cv-icon2 → ui-uni/uni-icons}/uni.ttf +0 -0
  58. package/ui-uni/uni-indexed-list/uni-indexed-list-item.vue +142 -0
  59. package/ui-uni/uni-indexed-list/uni-indexed-list.vue +357 -0
  60. package/ui-uni/uni-link/uni-link.vue +117 -0
  61. package/ui-uni/uni-list/uni-list.vue +107 -0
  62. package/ui-uni/uni-list/uni-refresh.vue +65 -0
  63. package/{ui-cv/cv-list → ui-uni/uni-list}/uni-refresh.wxs +0 -0
  64. package/ui-uni/uni-list-ad/uni-list-ad.vue +106 -0
  65. package/{ui-cv/cv-list-chat/cv-list-chat.scss → ui-uni/uni-list-chat/uni-list-chat.scss} +0 -0
  66. package/{ui-cv/cv-list-chat/cv-list-chat.vue → ui-uni/uni-list-chat/uni-list-chat.vue} +0 -0
  67. package/ui-uni/uni-list-item/uni-list-item.vue +428 -0
  68. package/ui-uni/uni-load-more/uni-load-more.vue +366 -0
  69. package/ui-uni/uni-nav-bar/uni-nav-bar.vue +244 -0
  70. package/{ui-cv/cv-nav-bar/cv-status-bar.vue → ui-uni/uni-nav-bar/uni-status-bar.vue} +0 -0
  71. package/ui-uni/uni-notice-bar/uni-notice-bar.vue +394 -0
  72. package/ui-uni/uni-number-box/uni-number-box.vue +224 -0
  73. package/ui-uni/uni-pagination/uni-pagination.vue +376 -0
  74. package/{ui-cv/cv-popup → ui-uni/uni-popup}/keypress.js +0 -0
  75. package/{ui-cv/cv-popup → ui-uni/uni-popup}/popup.js +0 -0
  76. package/ui-uni/uni-popup/uni-popup.vue +412 -0
  77. package/{ui-cv/cv-popup-dialog → ui-uni/uni-popup-dialog}/keypress.js +0 -0
  78. package/{ui-cv/cv-popup-dialog/cv-popup-dialog.vue → ui-uni/uni-popup-dialog/uni-popup-dialog.vue} +0 -0
  79. package/ui-uni/uni-popup-message/uni-popup-message.vue +143 -0
  80. package/{ui-cv/cv-popup-share/cv-popup-share.vue → ui-uni/uni-popup-share/uni-popup-share.vue} +0 -0
  81. package/ui-uni/uni-rate/uni-rate.vue +357 -0
  82. package/ui-uni/uni-row/uni-row.vue +155 -0
  83. package/ui-uni/uni-search-bar/uni-search-bar.vue +262 -0
  84. package/{ui-cv/cv-section/cv-section.vue → ui-uni/uni-section/uni-section.vue} +0 -0
  85. package/{ui-cv/cv-segmented-control/cv-segmented-control.vue → ui-uni/uni-segmented-control/uni-segmented-control.vue} +0 -0
  86. package/{ui-cv/cv-status-bar/cv-status-bar.vue → ui-uni/uni-status-bar/uni-status-bar.vue} +0 -0
  87. package/ui-uni/uni-steps/uni-steps.vue +250 -0
  88. package/{ui-cv/cv-swipe-action/cv-swipe-action.vue → ui-uni/uni-swipe-action/uni-swipe-action.vue} +0 -0
  89. package/{ui-cv/cv-swipe-action-item → ui-uni/uni-swipe-action-item}/bindingx.js +0 -0
  90. package/{ui-cv/cv-swipe-action-item → ui-uni/uni-swipe-action-item}/index.wxs +0 -0
  91. package/{ui-cv/cv-swipe-action-item → ui-uni/uni-swipe-action-item}/isPC.js +0 -0
  92. package/{ui-cv/cv-swipe-action-item → ui-uni/uni-swipe-action-item}/mpalipay.js +0 -0
  93. package/{ui-cv/cv-swipe-action-item → ui-uni/uni-swipe-action-item}/mpother.js +0 -0
  94. package/{ui-cv/cv-swipe-action-item → ui-uni/uni-swipe-action-item}/mpwxs.js +0 -0
  95. package/{ui-cv/cv-swipe-action-item/cv-swipe-action-item.vue → ui-uni/uni-swipe-action-item/uni-swipe-action-item.vue} +0 -0
  96. package/ui-uni/uni-swiper-dot/uni-swiper-dot.vue +205 -0
  97. package/ui-uni/uni-table/uni-table.vue +455 -0
  98. package/ui-uni/uni-tag/uni-tag.vue +283 -0
  99. package/ui-uni/uni-tbody/uni-tbody.vue +30 -0
  100. package/ui-uni/uni-td/uni-td.vue +88 -0
  101. package/{ui-cv/cv-test/cv-test.vue → ui-uni/uni-test/uni-test.vue} +0 -0
  102. package/{ui-cv/cv-th → ui-uni/uni-th}/filter-dropdown.vue +0 -0
  103. package/ui-uni/uni-th/uni-th.vue +259 -0
  104. package/ui-uni/uni-thead/uni-thead.vue +114 -0
  105. package/ui-uni/uni-title/uni-title.vue +171 -0
  106. package/{ui-cv/cv-tr → ui-uni/uni-tr}/table-checkbox.vue +0 -0
  107. package/ui-uni/uni-tr/uni-tr.vue +156 -0
  108. package/{ui-cv/cv-transition → ui-uni/uni-transition}/createAnimation.js +0 -0
  109. package/ui-uni/uni-transition/uni-transition.vue +287 -0
  110. package/ui-cv/cv-badge/cv-badge.vue +0 -249
  111. package/ui-cv/cv-calendar/calendar.js +0 -963
  112. package/ui-cv/cv-calendar/cv-calendar-item.vue +0 -198
  113. package/ui-cv/cv-calendar/cv-calendar.vue +0 -508
  114. package/ui-cv/cv-card/cv-card.vue +0 -427
  115. package/ui-cv/cv-col/cv-col.vue +0 -2965
  116. package/ui-cv/cv-collapse/cv-collapse.vue +0 -146
  117. package/ui-cv/cv-collapse-item/cv-collapse-item.vue +0 -395
  118. package/ui-cv/cv-combox/cv-combox.vue +0 -250
  119. package/ui-cv/cv-countdown/cv-countdown.vue +0 -245
  120. package/ui-cv/cv-data-checkbox/cv-data-checkbox.vue +0 -841
  121. package/ui-cv/cv-data-indexed-list/cv-data-indexed-list-item.vue +0 -154
  122. package/ui-cv/cv-data-indexed-list/cv-data-indexed-list.vue +0 -376
  123. package/ui-cv/cv-data-picker/cv-data-picker.vue +0 -486
  124. package/ui-cv/cv-data-pickerview/cv-data-pickerview.vue +0 -304
  125. package/ui-cv/cv-dateformat/cv-dateformat.vue +0 -86
  126. package/ui-cv/cv-datetime-picker/calendar.vue +0 -761
  127. package/ui-cv/cv-datetime-picker/cv-datetime-picker.vue +0 -958
  128. package/ui-cv/cv-datetime-picker/time-picker.vue +0 -907
  129. package/ui-cv/cv-drawer/cv-drawer.vue +0 -185
  130. package/ui-cv/cv-drawer/keypress.js +0 -45
  131. package/ui-cv/cv-easyinput/cv-easyinput.vue +0 -514
  132. package/ui-cv/cv-fab/cv-fab.vue +0 -465
  133. package/ui-cv/cv-fav/cv-fav.vue +0 -150
  134. package/ui-cv/cv-file-picker/cv-file-picker.vue +0 -619
  135. package/ui-cv/cv-form-base/cv-form-base.vue +0 -470
  136. package/ui-cv/cv-form-base/validate.js +0 -477
  137. package/ui-cv/cv-grid-group/cv-grid-group.vue +0 -148
  138. package/ui-cv/cv-grid-item/cv-grid-item.vue +0 -132
  139. package/ui-cv/cv-icon2/cv-icon2.vue +0 -78
  140. package/ui-cv/cv-icon2/icons.js +0 -132
  141. package/ui-cv/cv-indexed-list/cv-indexed-list-item.vue +0 -154
  142. package/ui-cv/cv-indexed-list/cv-indexed-list.vue +0 -371
  143. package/ui-cv/cv-link2/cv-link2.vue +0 -130
  144. package/ui-cv/cv-list/cv-list.vue +0 -107
  145. package/ui-cv/cv-list/cv-refresh.vue +0 -65
  146. package/ui-cv/cv-list-ad/cv-list-ad.vue +0 -113
  147. package/ui-cv/cv-list-item/cv-list-item.vue +0 -449
  148. package/ui-cv/cv-nav-bar/cv-nav-bar.vue +0 -256
  149. package/ui-cv/cv-notice-bar/cv-notice-bar.vue +0 -453
  150. package/ui-cv/cv-number-box/cv-number-box.vue +0 -223
  151. package/ui-cv/cv-pagination/cv-pagination.vue +0 -397
  152. package/ui-cv/cv-popup/cv-popup.vue +0 -429
  153. package/ui-cv/cv-popup-message/cv-popup-message.vue +0 -143
  154. package/ui-cv/cv-row/cv-row.vue +0 -157
  155. package/ui-cv/cv-search-bar/cv-search-bar.vue +0 -280
  156. package/ui-cv/cv-steps/cv-steps.vue +0 -293
  157. package/ui-cv/cv-swiper-dot/cv-swiper-dot.vue +0 -255
  158. package/ui-cv/cv-table/cv-table.vue +0 -460
  159. package/ui-cv/cv-tag/cv-tag.vue +0 -276
  160. package/ui-cv/cv-tbody/cv-tbody.vue +0 -28
  161. package/ui-cv/cv-td/cv-td.vue +0 -93
  162. package/ui-cv/cv-th/cv-th.vue +0 -270
  163. package/ui-cv/cv-thead/cv-thead.vue +0 -114
  164. package/ui-cv/cv-title/cv-title.vue +0 -168
  165. package/ui-cv/cv-tr/cv-tr.vue +0 -166
  166. package/ui-cv/cv-transition/cv-transition.vue +0 -279
@@ -1,371 +0,0 @@
1
- <template>
2
- <view class="uni-indexed-list" ref="list" id="list">
3
- <!-- #ifdef APP-NVUE -->
4
- <list class="uni-indexed-list__scroll" scrollable="true" show-scrollbar="false">
5
- <cell v-for="(list, idx) in lists" :key="idx" :ref="'uni-indexed-list-' + idx">
6
- <!-- #endif -->
7
- <!-- #ifndef APP-NVUE -->
8
- <scroll-view :scroll-into-view="scrollViewId" class="uni-indexed-list__scroll" scroll-y>
9
- <view v-for="(list, idx) in lists" :key="idx" :id="'uni-indexed-list-' + idx">
10
- <!-- #endif -->
11
- <indexed-list-item
12
- :list="list"
13
- :loaded="loaded"
14
- :idx="idx"
15
- :showSelect="showSelect"
16
- @itemClick="onClick"
17
- ></indexed-list-item>
18
- <!-- #ifndef APP-NVUE -->
19
- </view>
20
- </scroll-view>
21
- <!-- #endif -->
22
- <!-- #ifdef APP-NVUE -->
23
- </cell>
24
- </list>
25
- <!-- #endif -->
26
- <view
27
- class="uni-indexed-list__menu"
28
- :class="touchmove ? 'uni-indexed-list__menu--active' : ''"
29
- @touchstart="touchStart"
30
- @touchmove.stop.prevent="touchMove"
31
- @touchend="touchEnd"
32
- @mousedown.stop="mousedown"
33
- @mousemove.stop.prevent="mousemove"
34
- @mouseleave.stop="mouseleave"
35
- >
36
- <view v-for="(list, key) in lists" :key="key" class="uni-indexed-list__menu-item">
37
- <text class="uni-indexed-list__menu-text" :class="touchmoveIndex == key ? 'uni-indexed-list__menu-text--active' : ''">
38
- {{ list.key }}
39
- </text>
40
- </view>
41
- </view>
42
- <view v-if="touchmove" class="uni-indexed-list__alert-wrapper">
43
- <text class="uni-indexed-list__alert">{{ lists[touchmoveIndex].key }}</text>
44
- </view>
45
- </view>
46
- </template>
47
- <script>
48
- import indexedListItem from './uni-indexed-list-item.vue';
49
- // #ifdef APP-NVUE
50
- const dom = weex.requireModule('dom');
51
- // #endif
52
- // #ifdef APP-PLUS
53
- function throttle(func, delay) {
54
- var prev = Date.now();
55
- return function () {
56
- var context = this;
57
- var args = arguments;
58
- var now = Date.now();
59
- if (now - prev >= delay) {
60
- func.apply(context, args);
61
- prev = Date.now();
62
- }
63
- };
64
- }
65
-
66
- function touchMove(e) {
67
- let pageY = e.touches[0].pageY;
68
- let index = Math.floor((pageY - this.winOffsetY) / this.itemHeight);
69
- if (this.touchmoveIndex === index) {
70
- return false;
71
- }
72
- let item = this.lists[index];
73
- if (item) {
74
- // #ifndef APP-NVUE
75
- this.scrollViewId = 'uni-indexed-list-' + index;
76
- this.touchmoveIndex = index;
77
- // #endif
78
- // #ifdef APP-NVUE
79
- dom.scrollToElement(this.$refs['uni-indexed-list-' + index][0], {
80
- animated: false
81
- });
82
- this.touchmoveIndex = index;
83
- // #endif
84
- }
85
- }
86
- const throttleTouchMove = throttle(touchMove, 40);
87
- // #endif
88
-
89
- /**
90
- * IndexedList 索引列表
91
- * @description 用于展示索引列表
92
- * @tutorial https://ext.dcloud.net.cn/plugin?id=375
93
- * @property {Boolean} showSelect = [true|false] 展示模式
94
- * @value true 展示模式
95
- * @value false 选择模式
96
- * @property {Object} options 索引列表需要的数据对象
97
- * @event {Function} click 点击列表事件 ,返回当前选择项的事件对象
98
- * @example <uni-indexed-list options="" showSelect="false" @click=""></uni-indexed-list>
99
- */
100
- export default {
101
- name: 'UniIndexedList',
102
- components: {
103
- indexedListItem
104
- },
105
- emits: ['click'],
106
- props: {
107
- options: {
108
- type: Array,
109
- default() {
110
- return [];
111
- }
112
- },
113
- showSelect: {
114
- type: Boolean,
115
- default: false
116
- }
117
- },
118
- data() {
119
- return {
120
- lists: [],
121
- winHeight: 0,
122
- itemHeight: 0,
123
- winOffsetY: 0,
124
- touchmove: false,
125
- touchmoveIndex: -1,
126
- scrollViewId: '',
127
- touchmovable: true,
128
- loaded: false,
129
- isPC: false
130
- };
131
- },
132
- watch: {
133
- options: {
134
- handler: function () {
135
- this.setList();
136
- },
137
- deep: true
138
- }
139
- },
140
- mounted() {
141
- // #ifdef H5
142
- this.isPC = this.IsPC();
143
- // #endif
144
- setTimeout(() => {
145
- this.setList();
146
- }, 50);
147
- setTimeout(() => {
148
- this.loaded = true;
149
- }, 300);
150
- },
151
- methods: {
152
- setList() {
153
- let index = 0;
154
- this.lists = [];
155
- this.options.forEach((value, index) => {
156
- if (value.data.length === 0) {
157
- return;
158
- }
159
- let indexBefore = index;
160
- let items = value.data.map((item) => {
161
- let obj = {};
162
- obj['key'] = value.letter;
163
- obj['name'] = item;
164
- obj['itemIndex'] = index;
165
- index++;
166
- obj.checked = item.checked ? item.checked : false;
167
- return obj;
168
- });
169
- this.lists.push({
170
- title: value.letter,
171
- key: value.letter,
172
- items: items,
173
- itemIndex: indexBefore
174
- });
175
- });
176
- // #ifndef APP-NVUE
177
- uni
178
- .createSelectorQuery()
179
- .in(this)
180
- .select('#list')
181
- .boundingClientRect()
182
- .exec((ret) => {
183
- this.winOffsetY = ret[0].top;
184
- this.winHeight = ret[0].height;
185
- this.itemHeight = this.winHeight / this.lists.length;
186
- });
187
- // #endif
188
- // #ifdef APP-NVUE
189
- dom.getComponentRect(this.$refs['list'], (res) => {
190
- this.winOffsetY = res.size.top;
191
- this.winHeight = res.size.height;
192
- this.itemHeight = this.winHeight / this.lists.length;
193
- });
194
- // #endif
195
- },
196
- touchStart(e) {
197
- this.touchmove = true;
198
- let pageY = this.isPC ? e.pageY : e.touches[0].pageY;
199
- let index = Math.floor((pageY - this.winOffsetY) / this.itemHeight);
200
- let item = this.lists[index];
201
- if (item) {
202
- this.scrollViewId = 'uni-indexed-list-' + index;
203
- this.touchmoveIndex = index;
204
- // #ifdef APP-NVUE
205
- dom.scrollToElement(this.$refs['uni-indexed-list-' + index][0], {
206
- animated: false
207
- });
208
- // #endif
209
- }
210
- },
211
- touchMove(e) {
212
- // #ifndef APP-PLUS
213
- let pageY = this.isPC ? e.pageY : e.touches[0].pageY;
214
- let index = Math.floor((pageY - this.winOffsetY) / this.itemHeight);
215
- if (this.touchmoveIndex === index) {
216
- return false;
217
- }
218
- let item = this.lists[index];
219
- if (item) {
220
- this.scrollViewId = 'uni-indexed-list-' + index;
221
- this.touchmoveIndex = index;
222
- }
223
- // #endif
224
- // #ifdef APP-PLUS
225
- throttleTouchMove.call(this, e);
226
- // #endif
227
- },
228
- touchEnd() {
229
- this.touchmove = false;
230
- this.touchmoveIndex = -1;
231
- },
232
-
233
- /**
234
- * 兼容 PC @tian
235
- */
236
-
237
- mousedown(e) {
238
- if (!this.isPC) return;
239
- this.touchStart(e);
240
- },
241
- mousemove(e) {
242
- if (!this.isPC) return;
243
- this.touchMove(e);
244
- },
245
- mouseleave(e) {
246
- if (!this.isPC) return;
247
- this.touchEnd(e);
248
- },
249
-
250
- // #ifdef H5
251
- IsPC() {
252
- var userAgentInfo = navigator.userAgent;
253
- var Agents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'];
254
- var flag = true;
255
- for (let v = 0; v < Agents.length - 1; v++) {
256
- if (userAgentInfo.indexOf(Agents[v]) > 0) {
257
- flag = false;
258
- break;
259
- }
260
- }
261
- return flag;
262
- },
263
- // #endif
264
-
265
- onClick(e) {
266
- let { idx, index } = e;
267
- let obj = {};
268
- for (let key in this.lists[idx].items[index]) {
269
- obj[key] = this.lists[idx].items[index][key];
270
- }
271
- let select = [];
272
- if (this.showSelect) {
273
- this.lists[idx].items[index].checked = !this.lists[idx].items[index].checked;
274
- this.lists.forEach((value, idx) => {
275
- value.items.forEach((item, index) => {
276
- if (item.checked) {
277
- let obj = {};
278
- for (let key in this.lists[idx].items[index]) {
279
- obj[key] = this.lists[idx].items[index][key];
280
- }
281
- select.push(obj);
282
- }
283
- });
284
- });
285
- }
286
- this.$emit('click', {
287
- item: obj,
288
- select: select
289
- });
290
- }
291
- }
292
- };
293
- </script>
294
- <style scoped>
295
- .uni-indexed-list {
296
- position: absolute;
297
- left: 0;
298
- top: 0;
299
- right: 0;
300
- bottom: 0;
301
- /* #ifndef APP-NVUE */
302
- display: flex;
303
- /* #endif */
304
- flex-direction: row;
305
- }
306
-
307
- .uni-indexed-list__scroll {
308
- flex: 1;
309
- }
310
-
311
- .uni-indexed-list__menu {
312
- width: 24px;
313
- background-color: lightgrey;
314
- /* #ifndef APP-NVUE */
315
- display: flex;
316
- /* #endif */
317
- flex-direction: column;
318
- }
319
-
320
- .uni-indexed-list__menu-item {
321
- /* #ifndef APP-NVUE */
322
- display: flex;
323
- /* #endif */
324
- flex: 1;
325
- align-items: center;
326
- justify-content: center;
327
- /* #ifdef H5 */
328
- cursor: pointer;
329
- /* #endif */
330
- }
331
-
332
- .uni-indexed-list__menu-text {
333
- line-height: 20px;
334
- font-size: 12px;
335
- text-align: center;
336
- color: #aaa;
337
- }
338
-
339
- .uni-indexed-list__menu--active {
340
- background-color: #c8c8c8;
341
- }
342
-
343
- .uni-indexed-list__menu-text--active {
344
- color: #007aff;
345
- }
346
-
347
- .uni-indexed-list__alert-wrapper {
348
- position: absolute;
349
- left: 0;
350
- top: 0;
351
- right: 0;
352
- bottom: 0;
353
- /* #ifndef APP-NVUE */
354
- display: flex;
355
- /* #endif */
356
- flex-direction: row;
357
- align-items: center;
358
- justify-content: center;
359
- }
360
-
361
- .uni-indexed-list__alert {
362
- width: 80px;
363
- height: 80px;
364
- border-radius: 80px;
365
- text-align: center;
366
- line-height: 80px;
367
- font-size: 35px;
368
- color: #fff;
369
- background-color: rgba(0, 0, 0, 0.5);
370
- }
371
- </style>
@@ -1,130 +0,0 @@
1
- <template>
2
- <a
3
- v-if="isShowA"
4
- class="uni-link"
5
- :href="href"
6
- :class="{ 'uni-link--withline': showUnderLine === true || showUnderLine === 'true' }"
7
- :style="{ color, fontSize: fontSize + 'px' }"
8
- :download="download"
9
- >
10
- <slot>{{ text }}</slot>
11
- </a>
12
- <text
13
- v-else
14
- class="uni-link"
15
- :class="{ 'uni-link--withline': showUnderLine === true || showUnderLine === 'true' }"
16
- :style="{ color, fontSize: fontSize + 'px' }"
17
- @click="openURL"
18
- >
19
- <slot>{{ text }}</slot>
20
- </text>
21
- </template>
22
-
23
- <script>
24
- /**
25
- * Link 外部网页超链接组件
26
- * @description uni-link是一个外部网页超链接组件,在小程序内复制url,在app内打开外部浏览器,在h5端打开新网页
27
- * @tutorial https://ext.dcloud.net.cn/plugin?id=1182
28
- * @property {String} href 点击后打开的外部网页url
29
- * @property {String} text 显示的文字
30
- * @property {String} downlaod H5平台下载文件名
31
- * @property {Boolean} showUnderLine 是否显示下划线
32
- * @property {String} copyTips 在小程序端复制链接时显示的提示语
33
- * @property {String} color 链接文字颜色
34
- * @property {String} fontSize 链接文字大小
35
- * @example * <uni-link href="https://ext.dcloud.net.cn" text="https://ext.dcloud.net.cn"></uni-link>
36
- */
37
- export default {
38
- name: 'cvLink2',
39
- props: {
40
- href: {
41
- type: String,
42
- default: ''
43
- },
44
- text: {
45
- type: String,
46
- default: ''
47
- },
48
- download: {
49
- type: String,
50
- default: ''
51
- },
52
- showUnderLine: {
53
- type: [Boolean, String],
54
- default: true
55
- },
56
- copyTips: {
57
- type: String,
58
- default: '已自动复制网址,请在手机浏览器里粘贴该网址'
59
- },
60
- color: {
61
- type: String,
62
- default: '#999999'
63
- },
64
- fontSize: {
65
- type: [Number, String],
66
- default: 14
67
- }
68
- },
69
- computed: {
70
- isShowA() {
71
- // #ifdef H5
72
- this._isH5 = true;
73
- // #endif
74
- if ((this.isMail() || this.isTel()) && this._isH5 === true) {
75
- return true;
76
- }
77
- return false;
78
- }
79
- },
80
- created() {
81
- this._isH5 = null;
82
- },
83
- methods: {
84
- isMail() {
85
- return this.href.startsWith('mailto:');
86
- },
87
- isTel() {
88
- return this.href.startsWith('tel:');
89
- },
90
- openURL() {
91
- // #ifdef APP-PLUS
92
- if (this.isTel()) {
93
- this.makePhoneCall(this.href.replace('tel:', ''));
94
- } else {
95
- plus.runtime.openURL(this.href);
96
- }
97
- // #endif
98
- // #ifdef H5
99
- window.open(this.href);
100
- // #endif
101
- // #ifdef MP
102
- uni.setClipboardData({
103
- data: this.href
104
- });
105
- uni.showModal({
106
- content: this.copyTips,
107
- showCancel: false
108
- });
109
- // #endif
110
- },
111
- makePhoneCall(phoneNumber) {
112
- uni.makePhoneCall({
113
- phoneNumber
114
- });
115
- }
116
- }
117
- };
118
- </script>
119
-
120
- <style scoped>
121
- /* #ifndef APP-NVUE */
122
- .uni-link {
123
- cursor: pointer;
124
- }
125
-
126
- /* #endif */
127
- .uni-link--withline {
128
- text-decoration: underline;
129
- }
130
- </style>
@@ -1,107 +0,0 @@
1
- <template>
2
- <!-- #ifndef APP-NVUE -->
3
- <view class="uni-list uni-border-top-bottom">
4
- <view v-if="border" class="uni-list--border-top"></view>
5
- <slot />
6
- <view v-if="border" class="uni-list--border-bottom"></view>
7
- </view>
8
- <!-- #endif -->
9
- <!-- #ifdef APP-NVUE -->
10
- <list class="uni-list" :class="{ 'uni-list--border': border }" :enableBackToTop="enableBackToTop" loadmoreoffset="15">
11
- <slot />
12
- </list>
13
- <!-- #endif -->
14
- </template>
15
-
16
- <script>
17
- /**
18
- * List 列表
19
- * @description 列表组件
20
- * @tutorial https://ext.dcloud.net.cn/plugin?id=24
21
- * @property {String} border = [true|false] 标题
22
- */
23
- export default {
24
- name: 'cvList',
25
- 'mp-weixin': {
26
- options: {
27
- multipleSlots: false
28
- }
29
- },
30
- props: {
31
- enableBackToTop: {
32
- type: [Boolean, String],
33
- default: false
34
- },
35
- scrollY: {
36
- type: [Boolean, String],
37
- default: false
38
- },
39
- border: {
40
- type: Boolean,
41
- default: true
42
- }
43
- },
44
- // provide() {
45
- // return {
46
- // list: this
47
- // };
48
- // },
49
- created() {
50
- this.firstChildAppend = false;
51
- },
52
- methods: {
53
- loadMore(e) {
54
- this.$emit('scrolltolower');
55
- }
56
- }
57
- };
58
- </script>
59
- <style scoped>
60
- .uni-list {
61
- /* #ifndef APP-NVUE */
62
- display: flex;
63
- /* #endif */
64
- background-color: #ffffff;
65
- position: relative;
66
- flex-direction: column;
67
- }
68
-
69
- .uni-list--border {
70
- position: relative;
71
- /* #ifdef APP-NVUE */
72
- border-top-color: #e5e5e5;
73
- border-top-style: solid;
74
- border-top-width: 0.5px;
75
- border-bottom-color: #e5e5e5;
76
- border-bottom-style: solid;
77
- border-bottom-width: 0.5px;
78
- /* #endif */
79
- z-index: -1;
80
- }
81
-
82
- /* #ifndef APP-NVUE */
83
- .uni-list--border-top {
84
- position: absolute;
85
- top: 0;
86
- right: 0;
87
- left: 0;
88
- height: 1px;
89
- -webkit-transform: scaleY(0.5);
90
- transform: scaleY(0.5);
91
- background-color: #e5e5e5;
92
- z-index: 1;
93
- }
94
-
95
- .uni-list--border-bottom {
96
- position: absolute;
97
- bottom: 0;
98
- right: 0;
99
- left: 0;
100
- height: 1px;
101
- -webkit-transform: scaleY(0.5);
102
- transform: scaleY(0.5);
103
- background-color: #e5e5e5;
104
- }
105
-
106
- /* #endif */
107
- </style>
@@ -1,65 +0,0 @@
1
- <template>
2
- <!-- #ifdef APP-NVUE -->
3
- <refresh :display="display" @refresh="onrefresh" @pullingdown="onpullingdown">
4
- <slot />
5
- </refresh>
6
- <!-- #endif -->
7
- <!-- #ifndef APP-NVUE -->
8
- <view ref="uni-refresh" class="uni-refresh" v-show="isShow">
9
- <slot />
10
- </view>
11
- <!-- #endif -->
12
- </template>
13
-
14
- <script>
15
- export default {
16
- name: 'cvRefresh',
17
- props: {
18
- display: {
19
- type: [String],
20
- default: 'hide'
21
- }
22
- },
23
- data() {
24
- return {
25
- pulling: false
26
- };
27
- },
28
- computed: {
29
- isShow() {
30
- if (this.display === 'show' || this.pulling === true) {
31
- return true;
32
- }
33
- return false;
34
- }
35
- },
36
- created() {},
37
- methods: {
38
- onchange(value) {
39
- this.pulling = value;
40
- },
41
- onrefresh(e) {
42
- this.$emit('refresh', e);
43
- },
44
- onpullingdown(e) {
45
- // #ifdef APP-NVUE
46
- this.$emit('pullingdown', e);
47
- // #endif
48
- // #ifndef APP-NVUE
49
- var detail = {
50
- viewHeight: 90,
51
- pullingDistance: e.height
52
- };
53
- this.$emit('pullingdown', detail);
54
- // #endif
55
- }
56
- }
57
- };
58
- </script>
59
-
60
- <style scoped>
61
- .uni-refresh {
62
- height: 0;
63
- overflow: hidden;
64
- }
65
- </style>