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

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 (69) hide show
  1. package/package.json +1 -1
  2. package/ui-cv/components/cv-grid-item/cv-grid-item.vue +1 -1
  3. package/uni-ui/lib/uni-badge/uni-badge.vue +150 -1
  4. package/uni-ui/lib/uni-breadcrumb/uni-breadcrumb.vue +37 -1
  5. package/uni-ui/lib/uni-breadcrumb-item/uni-breadcrumb-item.vue +83 -1
  6. package/uni-ui/lib/uni-calendar/uni-calendar-item.vue +122 -1
  7. package/uni-ui/lib/uni-calendar/uni-calendar.vue +366 -1
  8. package/uni-ui/lib/uni-card/uni-card.vue +124 -1
  9. package/uni-ui/lib/uni-col/uni-col.vue +1 -1
  10. package/uni-ui/lib/uni-collapse/uni-collapse.vue +135 -1
  11. package/uni-ui/lib/uni-collapse-item/uni-collapse-item.vue +266 -1
  12. package/uni-ui/lib/uni-combox/uni-combox.vue +1 -1
  13. package/uni-ui/lib/uni-countdown/uni-countdown.vue +239 -1
  14. package/uni-ui/lib/uni-data-checkbox/uni-data-checkbox.vue +487 -1
  15. package/uni-ui/lib/uni-data-picker/uni-data-picker.vue +530 -1
  16. package/uni-ui/lib/uni-data-pickerview/uni-data-picker.js +157 -150
  17. package/uni-ui/lib/uni-data-pickerview/uni-data-pickerview.vue +166 -1
  18. package/uni-ui/lib/uni-data-select/uni-data-select.vue +289 -1
  19. package/uni-ui/lib/uni-datetime-picker/calendar-item.vue +70 -1
  20. package/uni-ui/lib/uni-datetime-picker/calendar.vue +629 -1
  21. package/uni-ui/lib/uni-datetime-picker/time-picker.vue +741 -1
  22. package/uni-ui/lib/uni-datetime-picker/uni-datetime-picker.vue +847 -1
  23. package/uni-ui/lib/uni-drawer/uni-drawer.vue +115 -1
  24. package/uni-ui/lib/uni-easyinput/uni-easyinput.vue +515 -1
  25. package/uni-ui/lib/uni-fab/uni-fab.vue +257 -1
  26. package/uni-ui/lib/uni-fav/uni-fav.vue +123 -1
  27. package/uni-ui/lib/uni-file-picker/uni-file-picker.vue +642 -1
  28. package/uni-ui/lib/uni-file-picker/upload-file.vue +177 -1
  29. package/uni-ui/lib/uni-file-picker/upload-image.vue +176 -1
  30. package/uni-ui/lib/uni-forms/uni-forms.vue +375 -1
  31. package/uni-ui/lib/uni-forms-item/uni-forms-item.vue +429 -1
  32. package/uni-ui/lib/uni-goods-nav/uni-goods-nav.vue +129 -1
  33. package/uni-ui/lib/uni-grid/uni-grid.vue +115 -1
  34. package/uni-ui/lib/uni-grid-item/uni-grid-item.vue +78 -1
  35. package/uni-ui/lib/uni-group/uni-group.vue +85 -1
  36. package/uni-ui/lib/uni-icons/uni-icons.vue +85 -1
  37. package/uni-ui/lib/uni-indexed-list/uni-indexed-list-item.vue +68 -1
  38. package/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue +294 -1
  39. package/uni-ui/lib/uni-list/uni-list.vue +81 -1
  40. package/uni-ui/lib/uni-list-ad/uni-list-ad.vue +77 -1
  41. package/uni-ui/lib/uni-list-chat/uni-list-chat.vue +294 -1
  42. package/uni-ui/lib/uni-list-item/uni-list-item.vue +346 -1
  43. package/uni-ui/lib/uni-load-more/uni-load-more.vue +172 -1
  44. package/uni-ui/lib/uni-nav-bar/uni-nav-bar.vue +205 -1
  45. package/uni-ui/lib/uni-nav-bar/uni-status-bar.vue +18 -1
  46. package/uni-ui/lib/uni-notice-bar/uni-notice-bar.vue +331 -1
  47. package/uni-ui/lib/uni-number-box/uni-number-box.vue +166 -1
  48. package/uni-ui/lib/uni-pagination/uni-pagination.vue +323 -1
  49. package/uni-ui/lib/uni-popup/uni-popup.vue +1 -1
  50. package/uni-ui/lib/uni-popup-dialog/uni-popup-dialog.vue +173 -1
  51. package/uni-ui/lib/uni-popup-message/uni-popup-message.vue +74 -1
  52. package/uni-ui/lib/uni-popup-share/uni-popup-share.vue +106 -1
  53. package/uni-ui/lib/uni-rate/uni-rate.vue +322 -1
  54. package/uni-ui/lib/uni-row/uni-row.vue +1 -1
  55. package/uni-ui/lib/uni-search-bar/uni-search-bar.vue +236 -1
  56. package/uni-ui/lib/uni-section/uni-section.vue +109 -1
  57. package/uni-ui/lib/uni-segmented-control/uni-segmented-control.vue +103 -1
  58. package/uni-ui/lib/uni-status-bar/uni-status-bar.vue +1 -1
  59. package/uni-ui/lib/uni-steps/uni-steps.vue +120 -1
  60. package/uni-ui/lib/uni-swipe-action-item/uni-swipe-action-item.vue +226 -3
  61. package/uni-ui/lib/uni-swiper-dot/uni-swiper-dot.vue +167 -1
  62. package/uni-ui/lib/uni-table/uni-table.vue +297 -1
  63. package/uni-ui/lib/uni-tag/uni-tag.vue +100 -1
  64. package/uni-ui/lib/uni-td/uni-td.vue +78 -1
  65. package/uni-ui/lib/uni-th/filter-dropdown.vue +1 -1
  66. package/uni-ui/lib/uni-th/uni-th.vue +224 -1
  67. package/uni-ui/lib/uni-thead/uni-thead.vue +77 -1
  68. package/uni-ui/lib/uni-tr/table-checkbox.vue +79 -1
  69. package/uni-ui/lib/uni-tr/uni-tr.vue +135 -1
@@ -1 +1,79 @@
1
- <template>
2
1
  <view class="uni-table-checkbox" @click="selected">
3
2
  <view v-if="!indeterminate" class="checkbox__inner" :class="{ 'is-checked': isChecked, 'is-disable': isDisabled }">
4
3
  <view class="checkbox__inner-icon"></view>
5
4
  </view>
6
5
  <view v-else class="checkbox__inner checkbox--indeterminate">
7
6
  <view class="checkbox__inner-icon"></view>
8
7
  </view>
9
8
  </view>
10
9
  name: 'TableCheckbox',
11
10
  emits: ['checkboxSelected'],
12
11
  props: {
13
12
  indeterminate: {
14
13
  type: Boolean,
15
14
  default: false
16
15
  },
17
16
  checked: {
18
17
  type: [Boolean, String],
19
18
  default: false
20
19
  },
21
20
  disabled: {
22
21
  type: Boolean,
23
22
  default: false
24
23
  },
25
24
  index: {
26
25
  type: Number,
27
26
  default: -1
28
27
  },
29
28
  cellData: {
30
29
  type: Object,
31
30
  default() {
32
31
  return {};
33
32
  }
34
33
  }
35
34
  },
36
35
  watch: {
37
36
  checked(newVal) {
38
37
  if (typeof this.checked === 'boolean') {
39
38
  this.isChecked = newVal;
40
39
  } else {
41
40
  this.isChecked = true;
42
41
  }
43
42
  },
44
43
  indeterminate(newVal) {
45
44
  this.isIndeterminate = newVal;
46
45
  }
47
46
  },
48
47
  data() {
49
48
  return {
50
49
  isChecked: false,
51
50
  isDisabled: false,
52
51
  isIndeterminate: false
53
52
  };
54
53
  },
55
54
  created() {
56
55
  if (typeof this.checked === 'boolean') {
57
56
  this.isChecked = this.checked;
58
57
  }
59
58
  this.isDisabled = this.disabled;
60
59
  },
61
60
  methods: {
62
61
  selected() {
63
62
  if (this.isDisabled) return;
64
63
  this.isIndeterminate = false;
65
64
  this.isChecked = !this.isChecked;
66
65
  this.$emit('checkboxSelected', {
67
66
  checked: this.isChecked,
68
67
  data: this.cellData
69
68
  });
70
69
  }
71
70
  }
71
+ <template>
72
+ <view class="uni-table-checkbox" @click="selected">
73
+ <view v-if="!indeterminate" class="checkbox__inner" :class="{ 'is-checked': isChecked, 'is-disable': isDisabled }">
74
+ <view class="checkbox__inner-icon"></view>
75
+ </view>
76
+ <view v-else class="checkbox__inner checkbox--indeterminate">
77
+ <view class="checkbox__inner-icon"></view>
78
+ </view>
79
+ </view>
80
+ </template>
81
+ <script>
82
+ export default {
83
+ name: 'TableCheckbox',
84
+ emits: ['checkboxSelected'],
85
+ props: {
86
+ indeterminate: {
87
+ type: Boolean,
88
+ default: false
89
+ },
90
+ checked: {
91
+ type: [Boolean, String],
92
+ default: false
93
+ },
94
+ disabled: {
95
+ type: Boolean,
96
+ default: false
97
+ },
98
+ index: {
99
+ type: Number,
100
+ default: -1
101
+ },
102
+ cellData: {
103
+ type: Object,
104
+ default() {
105
+ return {};
106
+ }
107
+ }
108
+ },
109
+ watch: {
110
+ checked(newVal) {
111
+ if (typeof this.checked === 'boolean') {
112
+ this.isChecked = newVal;
113
+ } else {
114
+ this.isChecked = true;
115
+ }
116
+ },
117
+ indeterminate(newVal) {
118
+ this.isIndeterminate = newVal;
119
+ }
120
+ },
121
+ data() {
122
+ return {
123
+ isChecked: false,
124
+ isDisabled: false,
125
+ isIndeterminate: false
126
+ };
127
+ },
128
+ created() {
129
+ if (typeof this.checked === 'boolean') {
130
+ this.isChecked = this.checked;
131
+ }
132
+ this.isDisabled = this.disabled;
133
+ },
134
+ methods: {
135
+ selected() {
136
+ if (this.isDisabled) return;
137
+ this.isIndeterminate = false;
138
+ this.isChecked = !this.isChecked;
139
+ this.$emit('checkboxSelected', {
140
+ checked: this.isChecked,
141
+ data: this.cellData
142
+ });
143
+ }
144
+ }
145
+ };
146
+ </script>
147
+ <style>
148
+ @import 'style.css';
149
+ </style>
@@ -1 +1,135 @@
1
- <template>
2
1
  <!-- #ifdef H5 -->
3
2
  <tr class="uni-table-tr">
4
3
  <th v-if="selection === 'selection' && ishead" class="checkbox" :class="{ 'tr-table--border': border }">
5
4
  <table-checkbox
6
5
  :checked="checked"
7
6
  :indeterminate="indeterminate"
8
7
  :disabled="disabled"
9
8
  @checkboxSelected="checkboxSelected"
10
9
  ></table-checkbox>
11
10
  </th>
12
11
  <slot></slot>
13
12
  <!-- <uni-th class="th-fixed">123</uni-th> -->
14
13
  </tr>
15
14
  <!-- #endif -->
16
15
  <!-- #ifndef H5 -->
17
16
  <view class="uni-table-tr">
18
17
  <view v-if="selection === 'selection'" class="checkbox" :class="{ 'tr-table--border': border }">
19
18
  <table-checkbox
20
19
  :checked="checked"
21
20
  :indeterminate="indeterminate"
22
21
  :disabled="disabled"
23
22
  @checkboxSelected="checkboxSelected"
24
23
  ></table-checkbox>
25
24
  </view>
26
25
  <slot></slot>
27
26
  </view>
28
27
  <!-- #endif -->
29
28
  * Tr 表格行组件
30
29
  * @description 表格行组件 仅包含 th,td 组件
31
30
  * @tutorial https://ext.dcloud.net.cn/plugin?id=
32
31
  */
33
32
  name: 'uniTr',
34
33
  components: { tableCheckbox },
35
34
  props: {
36
35
  disabled: {
37
36
  type: Boolean,
38
37
  default: false
39
38
  },
40
39
  keyValue: {
41
40
  type: [String, Number],
42
41
  default: ''
43
42
  }
44
43
  },
45
44
  options: {
46
45
  virtualHost: true
47
46
  },
48
47
  data() {
49
48
  return {
50
49
  value: false,
51
50
  border: false,
52
51
  selection: false,
53
52
  widthThArr: [],
54
53
  ishead: true,
55
54
  checked: false,
56
55
  indeterminate: false
57
56
  };
58
57
  },
59
58
  created() {
60
59
  this.root = this.getTable();
61
60
  this.head = this.getTable('uniThead');
62
61
  if (this.head) {
63
62
  this.ishead = false;
64
63
  this.head.init(this);
65
64
  }
66
65
  this.border = this.root.border;
67
66
  this.selection = this.root.type;
68
67
  this.root.trChildren.push(this);
69
68
  const rowData = this.root.data.find((v) => v[this.root.rowKey] === this.keyValue);
70
69
  if (rowData) {
71
70
  this.rowData = rowData;
72
71
  }
73
72
  this.root.isNodata();
74
73
  },
75
74
  mounted() {
76
75
  if (this.widthThArr.length > 0) {
77
76
  const selectionWidth = this.selection === 'selection' ? 50 : 0;
78
77
  this.root.minWidth = this.widthThArr.reduce((a, b) => Number(a) + Number(b)) + selectionWidth;
79
78
  }
80
79
  },
81
80
  // #ifndef VUE3
82
81
  destroyed() {
83
82
  const index = this.root.trChildren.findIndex((i) => i === this);
84
83
  this.root.trChildren.splice(index, 1);
85
84
  this.root.isNodata();
86
85
  },
87
86
  // #endif
88
87
  // #ifdef VUE3
89
88
  unmounted() {
90
89
  const index = this.root.trChildren.findIndex((i) => i === this);
91
90
  this.root.trChildren.splice(index, 1);
92
91
  this.root.isNodata();
93
92
  },
94
93
  // #endif
95
94
  methods: {
96
95
  minWidthUpdate(width) {
97
96
  this.widthThArr.push(width);
98
97
  },
99
98
  // 选中
100
99
  checkboxSelected(e) {
101
100
  let rootData = this.root.data.find((v) => v[this.root.rowKey] === this.keyValue);
102
101
  this.checked = e.checked;
103
102
  this.root.check(rootData || this, e.checked, rootData ? this.keyValue : null);
104
103
  },
105
104
  change(e) {
106
105
  this.root.trChildren.forEach((item) => {
107
106
  if (item === this) {
108
107
  this.root.check(this, e.detail.value.length > 0 ? true : false);
109
108
  }
110
109
  });
111
110
  },
112
111
  /**
113
112
  * 获取父元素实例
114
113
  */
115
114
  getTable(name = 'uniTable') {
116
115
  let parent = this.$parent;
117
116
  let parentName = parent.$options.name;
118
117
  while (parentName !== name) {
119
118
  parent = parent.$parent;
120
119
  if (!parent) return false;
121
120
  parentName = parent.$options.name;
122
121
  }
123
122
  return parent;
124
123
  }
125
124
  }
125
+ <template>
126
+ <!-- #ifdef H5 -->
127
+ <tr class="uni-table-tr">
128
+ <th v-if="selection === 'selection' && ishead" class="checkbox" :class="{ 'tr-table--border': border }">
129
+ <table-checkbox
130
+ :checked="checked"
131
+ :indeterminate="indeterminate"
132
+ :disabled="disabled"
133
+ @checkboxSelected="checkboxSelected"
134
+ ></table-checkbox>
135
+ </th>
136
+ <slot></slot>
137
+ <!-- <uni-th class="th-fixed">123</uni-th> -->
138
+ </tr>
139
+ <!-- #endif -->
140
+ <!-- #ifndef H5 -->
141
+ <view class="uni-table-tr">
142
+ <view v-if="selection === 'selection'" class="checkbox" :class="{ 'tr-table--border': border }">
143
+ <table-checkbox
144
+ :checked="checked"
145
+ :indeterminate="indeterminate"
146
+ :disabled="disabled"
147
+ @checkboxSelected="checkboxSelected"
148
+ ></table-checkbox>
149
+ </view>
150
+ <slot></slot>
151
+ </view>
152
+ <!-- #endif -->
153
+ </template>
154
+ <script>
155
+ import tableCheckbox from './table-checkbox.vue';
156
+ /**
157
+ * Tr 表格行组件
158
+ * @description 表格行组件 仅包含 th,td 组件
159
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=
160
+ */
161
+ export default {
162
+ name: 'uniTr',
163
+ components: { tableCheckbox },
164
+ props: {
165
+ disabled: {
166
+ type: Boolean,
167
+ default: false
168
+ },
169
+ keyValue: {
170
+ type: [String, Number],
171
+ default: ''
172
+ }
173
+ },
174
+ options: {
175
+ virtualHost: true
176
+ },
177
+ data() {
178
+ return {
179
+ value: false,
180
+ border: false,
181
+ selection: false,
182
+ widthThArr: [],
183
+ ishead: true,
184
+ checked: false,
185
+ indeterminate: false
186
+ };
187
+ },
188
+ created() {
189
+ this.root = this.getTable();
190
+ this.head = this.getTable('uniThead');
191
+ if (this.head) {
192
+ this.ishead = false;
193
+ this.head.init(this);
194
+ }
195
+ this.border = this.root.border;
196
+ this.selection = this.root.type;
197
+ this.root.trChildren.push(this);
198
+ const rowData = this.root.data.find((v) => v[this.root.rowKey] === this.keyValue);
199
+ if (rowData) {
200
+ this.rowData = rowData;
201
+ }
202
+ this.root.isNodata();
203
+ },
204
+ mounted() {
205
+ if (this.widthThArr.length > 0) {
206
+ const selectionWidth = this.selection === 'selection' ? 50 : 0;
207
+ this.root.minWidth = this.widthThArr.reduce((a, b) => Number(a) + Number(b)) + selectionWidth;
208
+ }
209
+ },
210
+ // #ifndef VUE3
211
+ destroyed() {
212
+ const index = this.root.trChildren.findIndex((i) => i === this);
213
+ this.root.trChildren.splice(index, 1);
214
+ this.root.isNodata();
215
+ },
216
+ // #endif
217
+ // #ifdef VUE3
218
+ unmounted() {
219
+ const index = this.root.trChildren.findIndex((i) => i === this);
220
+ this.root.trChildren.splice(index, 1);
221
+ this.root.isNodata();
222
+ },
223
+ // #endif
224
+ methods: {
225
+ minWidthUpdate(width) {
226
+ this.widthThArr.push(width);
227
+ },
228
+ // 选中
229
+ checkboxSelected(e) {
230
+ let rootData = this.root.data.find((v) => v[this.root.rowKey] === this.keyValue);
231
+ this.checked = e.checked;
232
+ this.root.check(rootData || this, e.checked, rootData ? this.keyValue : null);
233
+ },
234
+ change(e) {
235
+ this.root.trChildren.forEach((item) => {
236
+ if (item === this) {
237
+ this.root.check(this, e.detail.value.length > 0 ? true : false);
238
+ }
239
+ });
240
+ },
241
+ /**
242
+ * 获取父元素实例
243
+ */
244
+ getTable(name = 'uniTable') {
245
+ let parent = this.$parent;
246
+ let parentName = parent.$options.name;
247
+ while (parentName !== name) {
248
+ parent = parent.$parent;
249
+ if (!parent) return false;
250
+ parentName = parent.$options.name;
251
+ }
252
+ return parent;
253
+ }
254
+ }
255
+ };
256
+ </script>
257
+ <style>
258
+ @import 'style.css';
259
+ </style>