@10yun/cv-mobile-ui 0.5.20 → 0.5.22

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 (71) hide show
  1. package/package.json +1 -1
  2. package/plugins/jumps.js +57 -12
  3. package/plugins/lbs.js +17 -8
  4. package/ui-cv/components/cv-grid-item/cv-grid-item.vue +1 -1
  5. package/uni-ui/lib/uni-badge/uni-badge.vue +150 -1
  6. package/uni-ui/lib/uni-breadcrumb/uni-breadcrumb.vue +37 -1
  7. package/uni-ui/lib/uni-breadcrumb-item/uni-breadcrumb-item.vue +83 -1
  8. package/uni-ui/lib/uni-calendar/uni-calendar-item.vue +122 -1
  9. package/uni-ui/lib/uni-calendar/uni-calendar.vue +366 -1
  10. package/uni-ui/lib/uni-card/uni-card.vue +124 -1
  11. package/uni-ui/lib/uni-col/uni-col.vue +1 -1
  12. package/uni-ui/lib/uni-collapse/uni-collapse.vue +135 -1
  13. package/uni-ui/lib/uni-collapse-item/uni-collapse-item.vue +266 -1
  14. package/uni-ui/lib/uni-combox/uni-combox.vue +1 -1
  15. package/uni-ui/lib/uni-countdown/uni-countdown.vue +239 -1
  16. package/uni-ui/lib/uni-data-checkbox/uni-data-checkbox.vue +487 -1
  17. package/uni-ui/lib/uni-data-picker/uni-data-picker.vue +530 -1
  18. package/uni-ui/lib/uni-data-pickerview/uni-data-picker.js +157 -150
  19. package/uni-ui/lib/uni-data-pickerview/uni-data-pickerview.vue +166 -1
  20. package/uni-ui/lib/uni-data-select/uni-data-select.vue +289 -1
  21. package/uni-ui/lib/uni-datetime-picker/calendar-item.vue +70 -1
  22. package/uni-ui/lib/uni-datetime-picker/calendar.vue +629 -1
  23. package/uni-ui/lib/uni-datetime-picker/time-picker.vue +741 -1
  24. package/uni-ui/lib/uni-datetime-picker/uni-datetime-picker.vue +847 -1
  25. package/uni-ui/lib/uni-drawer/uni-drawer.vue +115 -1
  26. package/uni-ui/lib/uni-easyinput/uni-easyinput.vue +515 -1
  27. package/uni-ui/lib/uni-fab/uni-fab.vue +257 -1
  28. package/uni-ui/lib/uni-fav/uni-fav.vue +123 -1
  29. package/uni-ui/lib/uni-file-picker/uni-file-picker.vue +642 -1
  30. package/uni-ui/lib/uni-file-picker/upload-file.vue +177 -1
  31. package/uni-ui/lib/uni-file-picker/upload-image.vue +176 -1
  32. package/uni-ui/lib/uni-forms/uni-forms.vue +375 -1
  33. package/uni-ui/lib/uni-forms-item/uni-forms-item.vue +429 -1
  34. package/uni-ui/lib/uni-goods-nav/uni-goods-nav.vue +129 -1
  35. package/uni-ui/lib/uni-grid/uni-grid.vue +115 -1
  36. package/uni-ui/lib/uni-grid-item/uni-grid-item.vue +78 -1
  37. package/uni-ui/lib/uni-group/uni-group.vue +85 -1
  38. package/uni-ui/lib/uni-icons/uni-icons.vue +85 -1
  39. package/uni-ui/lib/uni-indexed-list/uni-indexed-list-item.vue +68 -1
  40. package/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue +294 -1
  41. package/uni-ui/lib/uni-list/uni-list.vue +81 -1
  42. package/uni-ui/lib/uni-list-ad/uni-list-ad.vue +77 -1
  43. package/uni-ui/lib/uni-list-chat/uni-list-chat.vue +294 -1
  44. package/uni-ui/lib/uni-list-item/uni-list-item.vue +346 -1
  45. package/uni-ui/lib/uni-load-more/uni-load-more.vue +172 -1
  46. package/uni-ui/lib/uni-nav-bar/uni-nav-bar.vue +205 -1
  47. package/uni-ui/lib/uni-nav-bar/uni-status-bar.vue +18 -1
  48. package/uni-ui/lib/uni-notice-bar/uni-notice-bar.vue +331 -1
  49. package/uni-ui/lib/uni-number-box/uni-number-box.vue +166 -1
  50. package/uni-ui/lib/uni-pagination/uni-pagination.vue +323 -1
  51. package/uni-ui/lib/uni-popup/uni-popup.vue +1 -1
  52. package/uni-ui/lib/uni-popup-dialog/uni-popup-dialog.vue +173 -1
  53. package/uni-ui/lib/uni-popup-message/uni-popup-message.vue +74 -1
  54. package/uni-ui/lib/uni-popup-share/uni-popup-share.vue +106 -1
  55. package/uni-ui/lib/uni-rate/uni-rate.vue +322 -1
  56. package/uni-ui/lib/uni-row/uni-row.vue +1 -1
  57. package/uni-ui/lib/uni-search-bar/uni-search-bar.vue +236 -1
  58. package/uni-ui/lib/uni-section/uni-section.vue +109 -1
  59. package/uni-ui/lib/uni-segmented-control/uni-segmented-control.vue +103 -1
  60. package/uni-ui/lib/uni-status-bar/uni-status-bar.vue +1 -1
  61. package/uni-ui/lib/uni-steps/uni-steps.vue +120 -1
  62. package/uni-ui/lib/uni-swipe-action-item/uni-swipe-action-item.vue +226 -3
  63. package/uni-ui/lib/uni-swiper-dot/uni-swiper-dot.vue +167 -1
  64. package/uni-ui/lib/uni-table/uni-table.vue +297 -1
  65. package/uni-ui/lib/uni-tag/uni-tag.vue +100 -1
  66. package/uni-ui/lib/uni-td/uni-td.vue +78 -1
  67. package/uni-ui/lib/uni-th/filter-dropdown.vue +1 -1
  68. package/uni-ui/lib/uni-th/uni-th.vue +224 -1
  69. package/uni-ui/lib/uni-thead/uni-thead.vue +77 -1
  70. package/uni-ui/lib/uni-tr/table-checkbox.vue +79 -1
  71. package/uni-ui/lib/uni-tr/uni-tr.vue +135 -1
@@ -1 +1,123 @@
1
- <template>
2
1
  <view
3
2
  :class="[circle === true || circle === 'true' ? 'uni-fav--circle' : '']"
4
3
  :style="[{ backgroundColor: checked ? bgColorChecked : bgColor }]"
5
4
  @click="onClick"
6
5
  class="uni-fav"
7
6
  >
8
7
  <!-- #ifdef MP-ALIPAY -->
9
8
  <view class="uni-fav-star" v-if="!checked && (star === true || star === 'true')">
10
9
  <uni-icons :color="fgColor" :style="{ color: checked ? fgColorChecked : fgColor }" size="14" type="star-filled" />
11
10
  </view>
12
11
  <!-- #endif -->
13
12
  <!-- #ifndef MP-ALIPAY -->
14
13
  <uni-icons
15
14
  :color="fgColor"
16
15
  :style="{ color: checked ? fgColorChecked : fgColor }"
17
16
  class="uni-fav-star"
18
17
  size="14"
19
18
  type="star-filled"
20
19
  v-if="!checked && (star === true || star === 'true')"
21
20
  />
22
21
  <!-- #endif -->
23
22
  <text :style="{ color: checked ? fgColorChecked : fgColor }" class="uni-fav-text">
24
23
  {{ checked ? contentFav : contentDefault }}
25
24
  </text>
26
25
  </view>
27
26
  * Fav 收藏按钮
28
27
  * @description 用于收藏功能,可点击切换选中、不选中的状态
29
28
  * @tutorial https://ext.dcloud.net.cn/plugin?id=864
30
29
  * @property {Boolean} star = [true|false] 按钮是否带星星
31
30
  * @property {String} bgColor 未收藏时的背景色
32
31
  * @property {String} bgColorChecked 已收藏时的背景色
33
32
  * @property {String} fgColor 未收藏时的文字颜色
34
33
  * @property {String} fgColorChecked 已收藏时的文字颜色
35
34
  * @property {Boolean} circle = [true|false] 是否为圆角
36
35
  * @property {Boolean} checked = [true|false] 是否为已收藏
37
36
  * @property {Object} contentText = [true|false] 收藏按钮文字
38
37
  * @property {Boolean} stat 是否开启统计功能
39
38
  * @event {Function} click 点击 fav按钮触发事件
40
39
  * @example <uni-fav :checked="true"/>
41
40
  */
42
41
  name: 'UniFav',
43
42
  // TODO 兼容 vue3,需要注册事件
44
43
  emits: ['click'],
45
44
  props: {
46
45
  star: {
47
46
  type: [Boolean, String],
48
47
  default: true
49
48
  },
50
49
  bgColor: {
51
50
  type: String,
52
51
  default: '#eeeeee'
53
52
  },
54
53
  fgColor: {
55
54
  type: String,
56
55
  default: '#666666'
57
56
  },
58
57
  bgColorChecked: {
59
58
  type: String,
60
59
  default: '#007aff'
61
60
  },
62
61
  fgColorChecked: {
63
62
  type: String,
64
63
  default: '#FFFFFF'
65
64
  },
66
65
  circle: {
67
66
  type: [Boolean, String],
68
67
  default: false
69
68
  },
70
69
  checked: {
71
70
  type: Boolean,
72
71
  default: false
73
72
  },
74
73
  contentText: {
75
74
  type: Object,
76
75
  default() {
77
76
  return {
78
77
  contentDefault: '',
79
78
  contentFav: ''
80
79
  };
81
80
  }
82
81
  },
83
82
  stat: {
84
83
  type: Boolean,
85
84
  default: false
86
85
  }
87
86
  },
88
87
  computed: {
89
88
  contentDefault() {
90
89
  return this.contentText.contentDefault || t('uni-fav.collect');
91
90
  },
92
91
  contentFav() {
93
92
  return this.contentText.contentFav || t('uni-fav.collected');
94
93
  }
95
94
  },
96
95
  watch: {
97
96
  checked() {
98
97
  if (uni.report && this.stat) {
99
98
  if (this.checked) {
100
99
  uni.report('收藏', '收藏');
101
100
  } else {
102
101
  uni.report('取消收藏', '取消收藏');
103
102
  }
104
103
  }
105
104
  }
106
105
  },
107
106
  methods: {
108
107
  onClick() {
109
108
  this.$emit('click');
110
109
  }
111
110
  }
111
+ <template>
112
+ <view
113
+ :class="[circle === true || circle === 'true' ? 'uni-fav--circle' : '']"
114
+ :style="[{ backgroundColor: checked ? bgColorChecked : bgColor }]"
115
+ @click="onClick"
116
+ class="uni-fav"
117
+ >
118
+ <!-- #ifdef MP-ALIPAY -->
119
+ <view class="uni-fav-star" v-if="!checked && (star === true || star === 'true')">
120
+ <uni-icons :color="fgColor" :style="{ color: checked ? fgColorChecked : fgColor }" size="14" type="star-filled" />
121
+ </view>
122
+ <!-- #endif -->
123
+ <!-- #ifndef MP-ALIPAY -->
124
+ <uni-icons
125
+ :color="fgColor"
126
+ :style="{ color: checked ? fgColorChecked : fgColor }"
127
+ class="uni-fav-star"
128
+ size="14"
129
+ type="star-filled"
130
+ v-if="!checked && (star === true || star === 'true')"
131
+ />
132
+ <!-- #endif -->
133
+ <text :style="{ color: checked ? fgColorChecked : fgColor }" class="uni-fav-text">
134
+ {{ checked ? contentFav : contentDefault }}
135
+ </text>
136
+ </view>
137
+ </template>
138
+ <script>
139
+ /**
140
+ * Fav 收藏按钮
141
+ * @description 用于收藏功能,可点击切换选中、不选中的状态
142
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=864
143
+ * @property {Boolean} star = [true|false] 按钮是否带星星
144
+ * @property {String} bgColor 未收藏时的背景色
145
+ * @property {String} bgColorChecked 已收藏时的背景色
146
+ * @property {String} fgColor 未收藏时的文字颜色
147
+ * @property {String} fgColorChecked 已收藏时的文字颜色
148
+ * @property {Boolean} circle = [true|false] 是否为圆角
149
+ * @property {Boolean} checked = [true|false] 是否为已收藏
150
+ * @property {Object} contentText = [true|false] 收藏按钮文字
151
+ * @property {Boolean} stat 是否开启统计功能
152
+ * @event {Function} click 点击 fav按钮触发事件
153
+ * @example <uni-fav :checked="true"/>
154
+ */
155
+ import { initVueI18n } from '@dcloudio/uni-i18n';
156
+ import messages from './i18n/index.js';
157
+ const { t } = initVueI18n(messages);
158
+ export default {
159
+ name: 'UniFav',
160
+ // TODO 兼容 vue3,需要注册事件
161
+ emits: ['click'],
162
+ props: {
163
+ star: {
164
+ type: [Boolean, String],
165
+ default: true
166
+ },
167
+ bgColor: {
168
+ type: String,
169
+ default: '#eeeeee'
170
+ },
171
+ fgColor: {
172
+ type: String,
173
+ default: '#666666'
174
+ },
175
+ bgColorChecked: {
176
+ type: String,
177
+ default: '#007aff'
178
+ },
179
+ fgColorChecked: {
180
+ type: String,
181
+ default: '#FFFFFF'
182
+ },
183
+ circle: {
184
+ type: [Boolean, String],
185
+ default: false
186
+ },
187
+ checked: {
188
+ type: Boolean,
189
+ default: false
190
+ },
191
+ contentText: {
192
+ type: Object,
193
+ default() {
194
+ return {
195
+ contentDefault: '',
196
+ contentFav: ''
197
+ };
198
+ }
199
+ },
200
+ stat: {
201
+ type: Boolean,
202
+ default: false
203
+ }
204
+ },
205
+ computed: {
206
+ contentDefault() {
207
+ return this.contentText.contentDefault || t('uni-fav.collect');
208
+ },
209
+ contentFav() {
210
+ return this.contentText.contentFav || t('uni-fav.collected');
211
+ }
212
+ },
213
+ watch: {
214
+ checked() {
215
+ if (uni.report && this.stat) {
216
+ if (this.checked) {
217
+ uni.report('收藏', '收藏');
218
+ } else {
219
+ uni.report('取消收藏', '取消收藏');
220
+ }
221
+ }
222
+ }
223
+ },
224
+ methods: {
225
+ onClick() {
226
+ this.$emit('click');
227
+ }
228
+ }
229
+ };
230
+ </script>
231
+ <style>
232
+ @import 'style.css';
233
+ </style>