@kengic/uni 0.5.1 → 0.5.2-beta.1

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 (146) hide show
  1. package/dist/uni/uni-ui/uni-badge/uni-badge.vue +222 -219
  2. package/dist/uni/uni-ui/uni-breadcrumb/uni-breadcrumb.vue +29 -29
  3. package/dist/uni/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue +88 -88
  4. package/dist/uni/uni-ui/uni-calendar/calendar.js +936 -532
  5. package/dist/uni/uni-ui/uni-calendar/i18n/en.json +10 -10
  6. package/dist/uni/uni-ui/uni-calendar/i18n/index.js +8 -7
  7. package/dist/uni/uni-ui/uni-calendar/i18n/zh-Hans.json +10 -10
  8. package/dist/uni/uni-ui/uni-calendar/i18n/zh-Hant.json +10 -10
  9. package/dist/uni/uni-ui/uni-calendar/uni-calendar-item.vue +190 -168
  10. package/dist/uni/uni-ui/uni-calendar/uni-calendar.vue +459 -459
  11. package/dist/uni/uni-ui/uni-calendar/util.js +324 -340
  12. package/dist/uni/uni-ui/uni-card/uni-card.vue +8 -1
  13. package/dist/uni/uni-ui/uni-col/uni-col.vue +294 -287
  14. package/dist/uni/uni-ui/uni-collapse/uni-collapse.vue +139 -140
  15. package/dist/uni/uni-ui/uni-collapse-item/uni-collapse-item.vue +381 -378
  16. package/dist/uni/uni-ui/uni-combox/uni-combox.vue +280 -272
  17. package/dist/uni/uni-ui/uni-countdown/i18n/en.json +4 -4
  18. package/dist/uni/uni-ui/uni-countdown/i18n/index.js +8 -7
  19. package/dist/uni/uni-ui/uni-countdown/i18n/zh-Hans.json +4 -4
  20. package/dist/uni/uni-ui/uni-countdown/i18n/zh-Hant.json +4 -4
  21. package/dist/uni/uni-ui/uni-countdown/uni-countdown.vue +249 -257
  22. package/dist/uni/uni-ui/uni-data-checkbox/uni-data-checkbox.vue +832 -813
  23. package/dist/uni/uni-ui/uni-data-picker/keypress.js +42 -42
  24. package/dist/uni/uni-ui/uni-data-picker/uni-data-picker.vue +535 -516
  25. package/dist/uni/uni-ui/uni-data-pickerview/uni-data-picker.js +623 -618
  26. package/dist/uni/uni-ui/uni-data-pickerview/uni-data-pickerview.vue +293 -288
  27. package/dist/uni/uni-ui/uni-data-select/uni-data-select.vue +495 -509
  28. package/dist/uni/uni-ui/uni-dateformat/date-format.js +181 -184
  29. package/dist/uni/uni-ui/uni-dateformat/uni-dateformat.vue +81 -82
  30. package/dist/uni/uni-ui/uni-datetime-picker/calendar-item.vue +176 -170
  31. package/dist/uni/uni-ui/uni-datetime-picker/calendar.vue +926 -920
  32. package/dist/uni/uni-ui/uni-datetime-picker/i18n/en.json +20 -20
  33. package/dist/uni/uni-ui/uni-datetime-picker/i18n/index.js +8 -7
  34. package/dist/uni/uni-ui/uni-datetime-picker/i18n/zh-Hans.json +21 -21
  35. package/dist/uni/uni-ui/uni-datetime-picker/i18n/zh-Hant.json +21 -21
  36. package/dist/uni/uni-ui/uni-datetime-picker/time-picker.vue +921 -926
  37. package/dist/uni/uni-ui/uni-datetime-picker/uni-datetime-picker.vue +1059 -1012
  38. package/dist/uni/uni-ui/uni-datetime-picker/util.js +366 -377
  39. package/dist/uni/uni-ui/uni-drawer/keypress.js +42 -42
  40. package/dist/uni/uni-ui/uni-drawer/uni-drawer.vue +176 -167
  41. package/dist/uni/uni-ui/uni-easyinput/common.js +40 -42
  42. package/dist/uni/uni-ui/uni-easyinput/uni-easyinput.vue +628 -547
  43. package/dist/uni/uni-ui/uni-fab/uni-fab.vue +507 -483
  44. package/dist/uni/uni-ui/uni-fav/i18n/en.json +2 -2
  45. package/dist/uni/uni-ui/uni-fav/i18n/index.js +8 -7
  46. package/dist/uni/uni-ui/uni-fav/i18n/zh-Hans.json +2 -2
  47. package/dist/uni/uni-ui/uni-fav/i18n/zh-Hant.json +2 -2
  48. package/dist/uni/uni-ui/uni-fav/uni-fav.vue +155 -147
  49. package/dist/uni/uni-ui/uni-file-picker/choose-and-upload-file.js +172 -198
  50. package/dist/uni/uni-ui/uni-file-picker/uni-file-picker.vue +636 -634
  51. package/dist/uni/uni-ui/uni-file-picker/upload-file.vue +294 -293
  52. package/dist/uni/uni-ui/uni-file-picker/upload-image.vue +267 -270
  53. package/dist/uni/uni-ui/uni-file-picker/utils.js +81 -82
  54. package/dist/uni/uni-ui/uni-forms/uni-forms.vue +360 -372
  55. package/dist/uni/uni-ui/uni-forms/utils.js +170 -174
  56. package/dist/uni/uni-ui/uni-forms/validate.js +447 -456
  57. package/dist/uni/uni-ui/uni-forms-item/uni-forms-item.vue +497 -497
  58. package/dist/uni/uni-ui/uni-goods-nav/i18n/en.json +4 -4
  59. package/dist/uni/uni-ui/uni-goods-nav/i18n/index.js +8 -7
  60. package/dist/uni/uni-ui/uni-goods-nav/i18n/zh-Hans.json +4 -4
  61. package/dist/uni/uni-ui/uni-goods-nav/i18n/zh-Hant.json +4 -4
  62. package/dist/uni/uni-ui/uni-goods-nav/uni-goods-nav.vue +238 -222
  63. package/dist/uni/uni-ui/uni-grid/uni-grid.vue +134 -134
  64. package/dist/uni/uni-ui/uni-grid-item/uni-grid-item.vue +121 -119
  65. package/dist/uni/uni-ui/uni-group/uni-group.vue +121 -121
  66. package/dist/uni/uni-ui/uni-icons/icons.js +1170 -1168
  67. package/dist/uni/uni-ui/uni-icons/uni-icons.vue +91 -86
  68. package/dist/uni/uni-ui/uni-icons/uniicons.css +166 -166
  69. package/dist/uni/uni-ui/uni-indexed-list/uni-indexed-list-item.vue +129 -129
  70. package/dist/uni/uni-ui/uni-indexed-list/uni-indexed-list.vue +352 -347
  71. package/dist/uni/uni-ui/uni-link/uni-link.vue +134 -119
  72. package/dist/uni/uni-ui/uni-list/uni-list.vue +119 -110
  73. package/dist/uni/uni-ui/uni-list/uni-refresh.vue +14 -14
  74. package/dist/uni/uni-ui/uni-list/uni-refresh.wxs +14 -14
  75. package/dist/uni/uni-ui/uni-list-ad/uni-list-ad.vue +101 -95
  76. package/dist/uni/uni-ui/uni-list-chat/uni-list-chat.scss +18 -18
  77. package/dist/uni/uni-ui/uni-list-chat/uni-list-chat.vue +602 -586
  78. package/dist/uni/uni-ui/uni-list-item/uni-list-item.vue +507 -503
  79. package/dist/uni/uni-ui/uni-load-more/i18n/en.json +3 -3
  80. package/dist/uni/uni-ui/uni-load-more/i18n/index.js +8 -7
  81. package/dist/uni/uni-ui/uni-load-more/i18n/zh-Hans.json +3 -3
  82. package/dist/uni/uni-ui/uni-load-more/i18n/zh-Hant.json +3 -3
  83. package/dist/uni/uni-ui/uni-load-more/uni-load-more.vue +402 -392
  84. package/dist/uni/uni-ui/uni-nav-bar/uni-nav-bar.vue +328 -330
  85. package/dist/uni/uni-ui/uni-nav-bar/uni-status-bar.vue +17 -17
  86. package/dist/uni/uni-ui/uni-notice-bar/uni-notice-bar.vue +422 -401
  87. package/dist/uni/uni-ui/uni-number-box/uni-number-box.vue +211 -205
  88. package/dist/uni/uni-ui/uni-pagination/i18n/en.json +3 -3
  89. package/dist/uni/uni-ui/uni-pagination/i18n/es.json +3 -3
  90. package/dist/uni/uni-ui/uni-pagination/i18n/fr.json +3 -3
  91. package/dist/uni/uni-ui/uni-pagination/i18n/index.js +12 -11
  92. package/dist/uni/uni-ui/uni-pagination/i18n/zh-Hans.json +3 -3
  93. package/dist/uni/uni-ui/uni-pagination/i18n/zh-Hant.json +3 -3
  94. package/dist/uni/uni-ui/uni-pagination/uni-pagination.vue +450 -433
  95. package/dist/uni/uni-ui/uni-popup/uni-popup.vue +404 -404
  96. package/dist/uni/uni-ui/uni-popup-dialog/keypress.js +42 -42
  97. package/dist/uni/uni-ui/uni-popup-dialog/uni-popup-dialog.vue +1 -0
  98. package/dist/uni/uni-ui/uni-popup-message/uni-popup-message.vue +126 -125
  99. package/dist/uni/uni-ui/uni-popup-share/uni-popup-share.vue +172 -172
  100. package/dist/uni/uni-ui/uni-rate/uni-rate.vue +343 -347
  101. package/dist/uni/uni-ui/uni-row/uni-row.vue +180 -182
  102. package/dist/uni/uni-ui/uni-scss/changelog.md +11 -4
  103. package/dist/uni/uni-ui/uni-scss/package.json +73 -73
  104. package/dist/uni/uni-ui/uni-scss/readme.md +2 -1
  105. package/dist/uni/uni-ui/uni-scss/styles/setting/_border.scss +2 -2
  106. package/dist/uni/uni-ui/uni-scss/styles/setting/_color.scss +46 -47
  107. package/dist/uni/uni-ui/uni-scss/styles/setting/_radius.scss +49 -49
  108. package/dist/uni/uni-ui/uni-scss/styles/setting/_space.scss +52 -53
  109. package/dist/uni/uni-ui/uni-scss/styles/setting/_styles.scss +142 -147
  110. package/dist/uni/uni-ui/uni-scss/styles/setting/_text.scss +20 -20
  111. package/dist/uni/uni-ui/uni-scss/styles/setting/_variables.scss +111 -95
  112. package/dist/uni/uni-ui/uni-scss/styles/tools/functions.scss +28 -18
  113. package/dist/uni/uni-ui/uni-scss/theme.scss +10 -7
  114. package/dist/uni/uni-ui/uni-scss/variables.scss +42 -24
  115. package/dist/uni/uni-ui/uni-search-bar/i18n/en.json +3 -3
  116. package/dist/uni/uni-ui/uni-search-bar/i18n/index.js +8 -7
  117. package/dist/uni/uni-ui/uni-search-bar/i18n/zh-Hans.json +2 -2
  118. package/dist/uni/uni-ui/uni-search-bar/i18n/zh-Hant.json +2 -2
  119. package/dist/uni/uni-ui/uni-search-bar/uni-search-bar.vue +290 -281
  120. package/dist/uni/uni-ui/uni-section/uni-section.vue +149 -146
  121. package/dist/uni/uni-ui/uni-segmented-control/uni-segmented-control.vue +141 -131
  122. package/dist/uni/uni-ui/uni-steps/uni-steps.vue +255 -236
  123. package/dist/uni/uni-ui/uni-swipe-action/uni-swipe-action.vue +51 -51
  124. package/dist/uni/uni-ui/uni-swipe-action-item/bindingx.js +276 -282
  125. package/dist/uni/uni-ui/uni-swipe-action-item/isPC.js +10 -10
  126. package/dist/uni/uni-ui/uni-swipe-action-item/mpalipay.js +182 -187
  127. package/dist/uni/uni-ui/uni-swipe-action-item/mpother.js +235 -244
  128. package/dist/uni/uni-ui/uni-swipe-action-item/mpwxs.js +70 -75
  129. package/dist/uni/uni-ui/uni-swipe-action-item/render.js +238 -247
  130. package/dist/uni/uni-ui/uni-swipe-action-item/uni-swipe-action-item.vue +387 -313
  131. package/dist/uni/uni-ui/uni-swipe-action-item/wx.wxs +206 -215
  132. package/dist/uni/uni-ui/uni-swiper-dot/uni-swiper-dot.vue +241 -197
  133. package/dist/uni/uni-ui/uni-table/uni-table.vue +445 -447
  134. package/dist/uni/uni-ui/uni-tag/uni-tag.vue +234 -244
  135. package/dist/uni/uni-ui/uni-tbody/uni-tbody.vue +20 -23
  136. package/dist/uni/uni-ui/uni-td/uni-td.vue +79 -80
  137. package/dist/uni/uni-ui/uni-th/filter-dropdown.vue +510 -503
  138. package/dist/uni/uni-ui/uni-th/uni-th.vue +289 -273
  139. package/dist/uni/uni-ui/uni-thead/uni-thead.vue +115 -114
  140. package/dist/uni/uni-ui/uni-title/uni-title.vue +151 -154
  141. package/dist/uni/uni-ui/uni-tooltip/uni-tooltip.vue +55 -60
  142. package/dist/uni/uni-ui/uni-tr/table-checkbox.vue +162 -163
  143. package/dist/uni/uni-ui/uni-tr/uni-tr.vue +158 -157
  144. package/dist/uni/uni-ui/uni-transition/createAnimation.js +130 -113
  145. package/dist/uni/uni-ui/uni-transition/uni-transition.vue +274 -272
  146. package/package.json +1 -1
@@ -1,147 +1,146 @@
1
1
  <template>
2
- <view class="uni-collapse">
3
- <slot />
4
- </view>
2
+ <view class="uni-collapse">
3
+ <slot />
4
+ </view>
5
5
  </template>
6
6
  <script>
7
- /**
8
- * Collapse 折叠面板
9
- * @description 展示可以折叠 / 展开的内容区域
10
- * @tutorial https://ext.dcloud.net.cn/plugin?id=23
11
- * @property {String|Array} value 当前激活面板改变时触发(如果是手风琴模式,参数类型为string,否则为array)
12
- * @property {Boolean} accordion = [true|false] 是否开启手风琴效果是否开启手风琴效果
13
- * @event {Function} change 切换面板时触发,如果是手风琴模式,返回类型为string,否则为array
14
- */
15
- export default {
16
- name: 'uniCollapse',
17
- emits:['change','activeItem','input','update:modelValue'],
18
- props: {
19
- value: {
20
- type: [String, Array],
21
- default: ''
22
- },
23
- modelValue: {
24
- type: [String, Array],
25
- default: ''
26
- },
27
- accordion: {
28
- // 是否开启手风琴效果
29
- type: [Boolean, String],
30
- default: false
31
- },
32
- },
33
- data() {
34
- return {}
35
- },
36
- computed: {
37
- // TODO 兼容 vue2 和 vue3
38
- dataValue() {
39
- let value = (typeof this.value === 'string' && this.value === '') ||
40
- (Array.isArray(this.value) && this.value.length === 0)
41
- let modelValue = (typeof this.modelValue === 'string' && this.modelValue === '') ||
42
- (Array.isArray(this.modelValue) && this.modelValue.length === 0)
43
- if (value) {
44
- return this.modelValue
45
- }
46
- if (modelValue) {
47
- return this.value
48
- }
7
+ /**
8
+ * Collapse 折叠面板
9
+ * @description 展示可以折叠 / 展开的内容区域
10
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=23
11
+ * @property {String|Array} value 当前激活面板改变时触发(如果是手风琴模式,参数类型为string,否则为array)
12
+ * @property {Boolean} accordion = [true|false] 是否开启手风琴效果是否开启手风琴效果
13
+ * @event {Function} change 切换面板时触发,如果是手风琴模式,返回类型为string,否则为array
14
+ */
15
+ export default {
16
+ name: 'uniCollapse',
17
+ emits: ['change', 'activeItem', 'input', 'update:modelValue'],
18
+ props: {
19
+ value: {
20
+ type: [String, Array],
21
+ default: '',
22
+ },
23
+ modelValue: {
24
+ type: [String, Array],
25
+ default: '',
26
+ },
27
+ accordion: {
28
+ // 是否开启手风琴效果
29
+ type: [Boolean, String],
30
+ default: false,
31
+ },
32
+ },
33
+ data() {
34
+ return {};
35
+ },
36
+ computed: {
37
+ // TODO 兼容 vue2 和 vue3
38
+ dataValue() {
39
+ let value = (typeof this.value === 'string' && this.value === '') || (Array.isArray(this.value) && this.value.length === 0);
40
+ let modelValue =
41
+ (typeof this.modelValue === 'string' && this.modelValue === '') || (Array.isArray(this.modelValue) && this.modelValue.length === 0);
42
+ if (value) {
43
+ return this.modelValue;
44
+ }
45
+ if (modelValue) {
46
+ return this.value;
47
+ }
49
48
 
50
- return this.value
51
- }
52
- },
53
- watch: {
54
- dataValue(val) {
55
- this.setOpen(val)
56
- }
57
- },
58
- created() {
59
- this.childrens = []
60
- this.names = []
61
- },
62
- mounted() {
63
- this.$nextTick(()=>{
64
- this.setOpen(this.dataValue)
65
- })
66
- },
67
- methods: {
68
- setOpen(val) {
69
- let str = typeof val === 'string'
70
- let arr = Array.isArray(val)
71
- this.childrens.forEach((vm, index) => {
72
- if (str) {
73
- if (val === vm.nameSync) {
74
- if (!this.accordion) {
75
- console.warn('accordion 属性为 false ,v-model 类型应该为 array')
76
- return
77
- }
78
- vm.isOpen = true
79
- }
80
- }
81
- if (arr) {
82
- val.forEach(v => {
83
- if (v === vm.nameSync) {
84
- if (this.accordion) {
85
- console.warn('accordion 属性为 true ,v-model 类型应该为 string')
86
- return
87
- }
88
- vm.isOpen = true
89
- }
90
- })
91
- }
92
- })
93
- this.emit(val)
94
- },
95
- setAccordion(self) {
96
- if (!this.accordion) return
97
- this.childrens.forEach((vm, index) => {
98
- if (self !== vm) {
99
- vm.isOpen = false
100
- }
101
- })
102
- },
103
- resize() {
104
- this.childrens.forEach((vm, index) => {
105
- // #ifndef APP-NVUE
106
- vm.getCollapseHeight()
107
- // #endif
108
- // #ifdef APP-NVUE
109
- vm.getNvueHwight()
110
- // #endif
111
- })
112
- },
113
- onChange(isOpen, self) {
114
- let activeItem = []
49
+ return this.value;
50
+ },
51
+ },
52
+ watch: {
53
+ dataValue(val) {
54
+ this.setOpen(val);
55
+ },
56
+ },
57
+ created() {
58
+ this.childrens = [];
59
+ this.names = [];
60
+ },
61
+ mounted() {
62
+ this.$nextTick(() => {
63
+ this.setOpen(this.dataValue);
64
+ });
65
+ },
66
+ methods: {
67
+ setOpen(val) {
68
+ let str = typeof val === 'string';
69
+ let arr = Array.isArray(val);
70
+ this.childrens.forEach((vm, index) => {
71
+ if (str) {
72
+ if (val === vm.nameSync) {
73
+ if (!this.accordion) {
74
+ console.warn('accordion 属性为 false ,v-model 类型应该为 array');
75
+ return;
76
+ }
77
+ vm.isOpen = true;
78
+ }
79
+ }
80
+ if (arr) {
81
+ val.forEach((v) => {
82
+ if (v === vm.nameSync) {
83
+ if (this.accordion) {
84
+ console.warn('accordion 属性为 true ,v-model 类型应该为 string');
85
+ return;
86
+ }
87
+ vm.isOpen = true;
88
+ }
89
+ });
90
+ }
91
+ });
92
+ this.emit(val);
93
+ },
94
+ setAccordion(self) {
95
+ if (!this.accordion) return;
96
+ this.childrens.forEach((vm, index) => {
97
+ if (self !== vm) {
98
+ vm.isOpen = false;
99
+ }
100
+ });
101
+ },
102
+ resize() {
103
+ this.childrens.forEach((vm, index) => {
104
+ // #ifndef APP-NVUE
105
+ vm.getCollapseHeight();
106
+ // #endif
107
+ // #ifdef APP-NVUE
108
+ vm.getNvueHwight();
109
+ // #endif
110
+ });
111
+ },
112
+ onChange(isOpen, self) {
113
+ let activeItem = [];
115
114
 
116
- if (this.accordion) {
117
- activeItem = isOpen ? self.nameSync : ''
118
- } else {
119
- this.childrens.forEach((vm, index) => {
120
- if (vm.isOpen) {
121
- activeItem.push(vm.nameSync)
122
- }
123
- })
124
- }
125
- this.$emit('change', activeItem)
126
- this.emit(activeItem)
127
- },
128
- emit(val){
129
- this.$emit('input', val)
130
- this.$emit('update:modelValue', val)
131
- }
132
- }
133
- }
115
+ if (this.accordion) {
116
+ activeItem = isOpen ? self.nameSync : '';
117
+ } else {
118
+ this.childrens.forEach((vm, index) => {
119
+ if (vm.isOpen) {
120
+ activeItem.push(vm.nameSync);
121
+ }
122
+ });
123
+ }
124
+ this.$emit('change', activeItem);
125
+ this.emit(activeItem);
126
+ },
127
+ emit(val) {
128
+ this.$emit('input', val);
129
+ this.$emit('update:modelValue', val);
130
+ },
131
+ },
132
+ };
134
133
  </script>
135
- <style lang="scss" >
136
- .uni-collapse {
137
- /* #ifndef APP-NVUE */
138
- width: 100%;
139
- display: flex;
140
- /* #endif */
141
- /* #ifdef APP-NVUE */
142
- flex: 1;
143
- /* #endif */
144
- flex-direction: column;
145
- background-color: #fff;
146
- }
134
+ <style lang="scss">
135
+ .uni-collapse {
136
+ /* #ifndef APP-NVUE */
137
+ width: 100%;
138
+ display: flex;
139
+ /* #endif */
140
+ /* #ifdef APP-NVUE */
141
+ flex: 1;
142
+ /* #endif */
143
+ flex-direction: column;
144
+ background-color: #fff;
145
+ }
147
146
  </style>