uview-plus 3.6.29 → 3.7.13

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 (124) hide show
  1. package/README.md +20 -5
  2. package/changelog.md +352 -0
  3. package/components/u-action-sheet/actionSheet.js +2 -0
  4. package/components/u-action-sheet/props.js +10 -0
  5. package/components/u-action-sheet/u-action-sheet.vue +3 -3
  6. package/components/u-album/album.js +1 -1
  7. package/components/u-avatar/avatar.js +4 -4
  8. package/components/u-avatar-group/avatarGroup.js +4 -4
  9. package/components/u-back-top/backtop.js +4 -4
  10. package/components/u-badge/badge.js +4 -4
  11. package/components/u-box/box.js +24 -0
  12. package/components/u-box/props.js +37 -7
  13. package/components/u-box/u-box.vue +29 -14
  14. package/components/u-button/button.js +4 -4
  15. package/components/u-calendar/calendar.js +4 -4
  16. package/components/u-canvas/u-canvas.vue +423 -0
  17. package/components/u-car-keyboard/carKeyboard.js +4 -4
  18. package/components/u-cascader/u-cascader.vue +19 -10
  19. package/components/u-cate-tab/u-cate-tab.vue +14 -4
  20. package/components/u-cell/cell.js +4 -4
  21. package/components/u-cell-group/cellGroup.js +4 -4
  22. package/components/u-checkbox/checkbox.js +4 -4
  23. package/components/u-checkbox-group/checkboxGroup.js +4 -4
  24. package/components/u-checkbox-group/u-checkbox-group.vue +4 -1
  25. package/components/u-circle-progress/circleProgress.js +4 -4
  26. package/components/u-code/code.js +3 -3
  27. package/components/u-code-input/codeInput.js +4 -4
  28. package/components/u-col/col.js +4 -4
  29. package/components/u-collapse/collapse.js +4 -4
  30. package/components/u-collapse-item/collapseItem.js +4 -4
  31. package/components/u-column-notice/columnNotice.js +4 -4
  32. package/components/u-count-down/countDown.js +4 -4
  33. package/components/u-count-to/countTo.js +4 -4
  34. package/components/u-cropper/u-cropper.vue +6 -3
  35. package/components/u-datetime-picker/datetimePicker.js +4 -4
  36. package/components/u-divider/divider.js +4 -4
  37. package/components/u-dragsort/u-dragsort.vue +85 -72
  38. package/components/u-empty/empty.js +4 -4
  39. package/components/u-form/form.js +4 -4
  40. package/components/u-form-item/formItem.js +4 -4
  41. package/components/u-gap/gap.js +4 -4
  42. package/components/u-grid/grid.js +4 -4
  43. package/components/u-grid/u-grid.vue +1 -1
  44. package/components/u-grid-item/gridItem.js +4 -4
  45. package/components/u-icon/icon.js +4 -4
  46. package/components/u-image/image.js +4 -4
  47. package/components/u-index-anchor/indexAnchor.js +4 -4
  48. package/components/u-index-list/indexList.js +4 -4
  49. package/components/u-input/input.js +1 -1
  50. package/components/u-input/u-input.vue +5 -2
  51. package/components/u-keyboard/keyboard.js +4 -4
  52. package/components/u-line/line.js +4 -4
  53. package/components/u-line-progress/lineProgress.js +4 -4
  54. package/components/u-link/link.js +4 -4
  55. package/components/u-list/list.js +4 -4
  56. package/components/u-list/u-list.vue +4 -1
  57. package/components/u-list-item/listItem.js +4 -4
  58. package/components/u-loading-icon/loadingIcon.js +4 -4
  59. package/components/u-loading-page/loadingPage.js +4 -4
  60. package/components/u-loadmore/loadmore.js +4 -4
  61. package/components/u-modal/modal.js +5 -5
  62. package/components/u-navbar/navbar.js +4 -4
  63. package/components/u-no-network/noNetwork.js +4 -4
  64. package/components/u-no-network/u-no-network.vue +7 -3
  65. package/components/u-notice-bar/noticeBar.js +4 -4
  66. package/components/u-notify/notify.js +4 -4
  67. package/components/u-number-box/numberBox.js +4 -4
  68. package/components/u-number-keyboard/numberKeyboard.js +4 -4
  69. package/components/u-overlay/overlay.js +4 -4
  70. package/components/u-parse/props.js +1 -1
  71. package/components/u-picker/picker.js +4 -4
  72. package/components/u-picker/props.js +4 -0
  73. package/components/u-picker/u-picker.vue +1 -1
  74. package/components/u-popup/popup.js +4 -4
  75. package/components/u-qrcode/qrcode.js +17 -67
  76. package/components/u-qrcode/u-qrcode.vue +179 -86
  77. package/components/u-radio/radio.js +4 -4
  78. package/components/u-radio-group/radioGroup.js +3 -3
  79. package/components/u-rate/rate.js +4 -4
  80. package/components/u-read-more/readMore.js +4 -4
  81. package/components/u-row/row.js +4 -4
  82. package/components/u-row-notice/rowNotice.js +4 -4
  83. package/components/u-scroll-list/scrollList.js +4 -4
  84. package/components/u-search/search.js +7 -5
  85. package/components/u-search/u-search.vue +2 -2
  86. package/components/u-section/section.js +4 -4
  87. package/components/u-select/u-select.vue +7 -1
  88. package/components/u-signature/u-signature.vue +138 -137
  89. package/components/u-skeleton/skeleton.js +4 -4
  90. package/components/u-slider/props.js +17 -2
  91. package/components/u-slider/slider.js +10 -7
  92. package/components/u-slider/u-slider.vue +112 -35
  93. package/components/u-status-bar/statusBar.js +4 -4
  94. package/components/u-steps/steps.js +4 -4
  95. package/components/u-steps/u-steps.vue +1 -1
  96. package/components/u-steps-item/stepsItem.js +4 -4
  97. package/components/u-sticky/sticky.js +4 -4
  98. package/components/u-subsection/subsection.js +4 -4
  99. package/components/u-swipe-action/swipeAction.js +4 -4
  100. package/components/u-swipe-action-item/swipeActionItem.js +4 -4
  101. package/components/u-swiper/swiper.js +4 -4
  102. package/components/u-swiper-indicator/swipterIndicator.js +4 -4
  103. package/components/u-switch/switch.js +4 -4
  104. package/components/u-tabbar/tabbar.js +4 -4
  105. package/components/u-tabbar-item/tabbarItem.js +4 -4
  106. package/components/u-tabs/tabs.js +4 -4
  107. package/components/u-tabs/u-tabs.vue +83 -95
  108. package/components/u-tag/tag.js +4 -4
  109. package/components/u-text/text.js +4 -4
  110. package/components/u-textarea/textarea.js +4 -4
  111. package/components/u-toast/toast.js +4 -4
  112. package/components/u-toolbar/toolbar.js +4 -4
  113. package/components/u-tooltip/tooltip.js +4 -4
  114. package/components/u-transition/transition.js +4 -4
  115. package/components/u-upload/upload.js +4 -4
  116. package/libs/css/flex.scss +2 -1
  117. package/libs/function/index.js +9 -4
  118. package/libs/util/gcanvas/bridge/bridge-weex.js +2 -1
  119. package/libs/util/gcanvas/env/image.js +24 -16
  120. package/package.json +2 -4
  121. package/types/comps/radio.d.ts +6 -2
  122. package/types/func.d.ts +317 -0
  123. package/types/index.d.ts +73 -105
  124. package/components/u-scroll-list/other.js +0 -0
@@ -3,49 +3,28 @@
3
3
  <view class="u-tabs__wrapper">
4
4
  <slot name="left" />
5
5
  <view class="u-tabs__wrapper__scroll-view-wrapper">
6
- <scroll-view
7
- :scroll-x="scrollable"
8
- :scroll-left="scrollLeft"
9
- scroll-with-animation
10
- class="u-tabs__wrapper__scroll-view"
11
- :show-scrollbar="false"
12
- ref="u-tabs__wrapper__scroll-view"
13
- >
14
- <view
15
- class="u-tabs__wrapper__nav"
16
- ref="u-tabs__wrapper__nav"
17
- >
18
- <view
19
- class="u-tabs__wrapper__nav__item"
20
- v-for="(item, index) in list"
21
- :key="index"
22
- @tap="clickHandler(item, index)"
23
- @longpress="longPressHandler(item,index)"
6
+ <scroll-view :scroll-x="scrollable" :scroll-left="scrollLeft" scroll-with-animation
7
+ class="u-tabs__wrapper__scroll-view" :show-scrollbar="false" ref="u-tabs__wrapper__scroll-view">
8
+ <view class="u-tabs__wrapper__nav" ref="u-tabs__wrapper__nav">
9
+ <view class="u-tabs__wrapper__nav__item" v-for="(item, index) in tabList" :key="index"
10
+ @tap="clickHandler(item, index)" @longpress="longPressHandler(item,index)"
24
11
  :ref="`u-tabs__wrapper__nav__item-${index}`"
25
- :style="[addStyle(itemStyle), {flex: scrollable ? '' : 1}]"
26
- :class="[`u-tabs__wrapper__nav__item-${index}`,
12
+ :style="[addStyle(itemStyle), {flex: scrollable ? '' : 1}]" :class="[`u-tabs__wrapper__nav__item-${index}`,
27
13
  item.disabled && 'u-tabs__wrapper__nav__item--disabled',
28
- innerCurrent == index ? 'u-tabs__wrapper__nav__item-active' : '']"
29
- >
14
+ innerCurrent == index ? 'u-tabs__wrapper__nav__item-active' : '']">
30
15
  <slot v-if="$slots.icon" name="icon" :item="item" :keyName="keyName" :index="index" />
31
16
  <template v-else>
32
17
  <view class="u-tabs__wrapper__nav__item__prefix-icon" v-if="item.icon">
33
- <up-icon
34
- :name="item.icon"
35
- :customStyle="addStyle(iconStyle)"
36
- ></up-icon>
18
+ <up-icon :name="item.icon" :customStyle="addStyle(iconStyle)"></up-icon>
37
19
  </view>
38
20
  </template>
39
21
  <slot v-if="$slots.content" name="content" :item="item" :keyName="keyName" :index="index" />
40
- <slot v-else-if="!$slots.content && ($slots.default || $slots.$default)"
41
- :item="item" :keyName="keyName" :index="index" />
42
- <text v-else
43
- :class="[item.disabled && 'u-tabs__wrapper__nav__item__text--disabled']"
22
+ <slot v-else-if="!$slots.content && ($slots.default || $slots.$default)" :item="item"
23
+ :keyName="keyName" :index="index" />
24
+ <text v-else :class="[item.disabled && 'u-tabs__wrapper__nav__item__text--disabled']"
44
25
  class="u-tabs__wrapper__nav__item__text"
45
- :style="[textStyle(index)]"
46
- >{{ item[keyName] }}</text>
47
- <u-badge
48
- :show="!!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value))"
26
+ :style="[textStyle(index)]">{{ item[keyName] }}</text>
27
+ <u-badge :show="!!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value))"
49
28
  :isDot="item.badge && item.badge.isDot || propsBadge.isDot"
50
29
  :value="item.badge && item.badge.value || propsBadge.value"
51
30
  :max="item.badge && item.badge.max || propsBadge.max"
@@ -56,35 +35,28 @@
56
35
  :shape="item.badge && item.badge.shape || propsBadge.shape"
57
36
  :numberType="item.badge && item.badge.numberType || propsBadge.numberType"
58
37
  :inverted="item.badge && item.badge.inverted || propsBadge.inverted"
59
- customStyle="margin-left: 4px;"
60
- ></u-badge>
38
+ customStyle="margin-left: 4px;"></u-badge>
61
39
  </view>
62
40
  <!-- #ifdef APP-NVUE -->
63
- <view
64
- class="u-tabs__wrapper__nav__line"
65
- ref="u-tabs__wrapper__nav__line"
66
- :style="[{
41
+ <view class="u-tabs__wrapper__nav__line" ref="u-tabs__wrapper__nav__line" :style="[{
67
42
  width: addUnit(lineWidth),
68
43
  height: addUnit(lineHeight),
69
44
  background: lineColor,
70
45
  backgroundSize: lineBgSize,
71
- }]"
72
- >
46
+ }]">
73
47
  </view>
74
48
  <!-- #endif -->
75
49
  <!-- #ifndef APP-NVUE -->
76
- <view
77
- class="u-tabs__wrapper__nav__line"
78
- ref="u-tabs__wrapper__nav__line"
50
+ <view class="u-tabs__wrapper__nav__line" ref="u-tabs__wrapper__nav__line"
79
51
  :style="[{
80
52
  width: addUnit(lineWidth),
81
53
  transform: `translate(${lineOffsetLeft}px)`,
82
- transitionDuration: `${firstTime ? 0 : duration}ms`,
54
+ transitionDuration: `${duration}ms`,
83
55
  height: addUnit(lineHeight),
84
56
  background: lineColor,
85
57
  backgroundSize: lineBgSize,
86
- }]"
87
- >
58
+ display: lineShow ? 'block': 'none'
59
+ }]">
88
60
  </view>
89
61
  <!-- #endif -->
90
62
  </view>
@@ -100,11 +72,25 @@
100
72
  const animation = uni.requireNativePlugin('animation')
101
73
  const dom = uni.requireNativePlugin('dom')
102
74
  // #endif
103
- import { props } from './props';
104
- import { mpMixin } from '../../libs/mixin/mpMixin';
105
- import { mixin } from '../../libs/mixin/mixin';
75
+ import {
76
+ props
77
+ } from './props';
78
+ import {
79
+ mpMixin
80
+ } from '../../libs/mixin/mpMixin';
81
+ import {
82
+ mixin
83
+ } from '../../libs/mixin/mixin';
106
84
  import defProps from '../../libs/config/props.js'
107
- import { addUnit, addStyle, deepMerge, getPx, sleep, getWindowInfo } from '../../libs/function/index';
85
+ import {
86
+ addUnit,
87
+ addStyle,
88
+ deepMerge,
89
+ deepClone,
90
+ getPx,
91
+ sleep,
92
+ getWindowInfo
93
+ } from '../../libs/function/index';
108
94
  /**
109
95
  * Tabs 标签
110
96
  * @description tabs标签组件,在标签多的时候,可以配置为左右滑动,标签少的时候,可以禁止滑动。 该组件的一个特点是配置为滚动模式时,激活的tab会自动移动到组件的中间位置。
@@ -122,10 +108,11 @@
122
108
  mixins: [mpMixin, mixin, props],
123
109
  data() {
124
110
  return {
125
- firstTime: true,
111
+ tabList: [],
126
112
  scrollLeft: 0,
127
113
  scrollViewWidth: 0,
128
114
  lineOffsetLeft: 0,
115
+ lineShow: false,
129
116
  tabsRect: {
130
117
  left: 0
131
118
  },
@@ -136,7 +123,7 @@
136
123
  watch: {
137
124
  current: {
138
125
  immediate: true,
139
- handler (newValue, oldValue) {
126
+ handler(newValue, oldValue) {
140
127
  // 内外部值不相等时,才尝试移动滑块
141
128
  if (newValue !== this.innerCurrent) {
142
129
  if (typeof newValue == 'string') {
@@ -151,10 +138,16 @@
151
138
  }
152
139
  },
153
140
  // list变化时,重新渲染list各项信息
154
- list() {
155
- this.$nextTick(() => {
156
- this.resize()
157
- })
141
+ list: {
142
+ handler(newValue, oldValue) {
143
+ // 重新拷贝一份list用于增加其他额外信息处理后导致重复监听的死循环
144
+ this.tabList = deepClone(newValue);
145
+ this.$nextTick(() => {
146
+ this.resize()
147
+ })
148
+ },
149
+ immediate: true,
150
+ deep: true,
158
151
  }
159
152
  },
160
153
  computed: {
@@ -162,11 +155,11 @@
162
155
  return index => {
163
156
  const style = {}
164
157
  // 取当期是否激活的样式
165
- const customeStyle = (index == this.innerCurrent)
166
- ? addStyle(this.activeStyle)
167
- : addStyle(this.inactiveStyle)
158
+ const customeStyle = (index == this.innerCurrent) ?
159
+ addStyle(this.activeStyle) :
160
+ addStyle(this.inactiveStyle)
168
161
  // 如果当前菜单被禁用,则加上对应颜色,需要在此做处理,是因为nvue下,无法在style样式中通过!import覆盖标签的内联样式
169
- if (this.list[index].disabled) {
162
+ if (this.tabList[index].disabled) {
170
163
  style.color = '#c8c9cc'
171
164
  }
172
165
  return deepMerge(customeStyle, style)
@@ -178,42 +171,37 @@
178
171
  },
179
172
  async mounted() {
180
173
  this.init()
181
- this.windowResizeCallback = (res) => {
182
- this.init()
183
- }
184
- uni.onWindowResize(this.windowResizeCallback)
174
+ this.windowResizeCallback = (res) => {
175
+ this.init()
176
+ }
177
+ uni.onWindowResize(this.windowResizeCallback)
178
+ },
179
+ beforeUnmount() {
180
+ uni.offWindowResize(this.windowResizeCallback)
185
181
  },
186
- beforeUnmount() {
187
- uni.offWindowResize(this.windowResizeCallback)
188
- },
189
182
  emits: ['click', 'longPress', 'change', 'update:current'],
190
183
  methods: {
191
184
  addStyle,
192
185
  addUnit,
193
186
  setLineLeft() {
194
- const tabItem = this.list[this.innerCurrent];
187
+ const tabItem = this.tabList[this.innerCurrent];
195
188
  if (!tabItem) {
196
189
  return;
197
190
  }
198
191
  // 获取滑块该移动的位置
199
- let lineOffsetLeft = this.list
192
+ let lineOffsetLeft = this.tabList
200
193
  .slice(0, this.innerCurrent)
201
194
  .reduce((total, curr) => total + curr.rect.width, 0);
202
- // 获取下划线的数值px表示法
195
+ // 获取下划线的数值px表示法
203
196
  const lineWidth = getPx(this.lineWidth);
204
197
  this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2
205
198
  // #ifdef APP-NVUE
206
199
  // 第一次移动滑块,无需过渡时间
207
- this.animation(this.lineOffsetLeft, this.firstTime ? 0 : parseInt(this.duration))
200
+ this.animation(this.lineOffsetLeft, parseInt(this.duration))
208
201
  // #endif
209
202
 
210
- // 如果是第一次执行此方法,让滑块在初始化时,瞬间滑动到第一个tab item的中间
211
- // 这里需要一个定时器,因为在非nvue下,是直接通过style绑定过渡时间,需要等其过渡完成后,再设置为false(非第一次移动滑块)
212
- if (this.firstTime) {
213
- setTimeout(() => {
214
- this.firstTime = false
215
- }, 10);
216
- }
203
+ // 如果是第一次执行此方法,滑块默认不显示,在加载完成后进行显示
204
+ if (!this.lineShow) this.lineShow = true;
217
205
  },
218
206
  // nvue下设置滑块的位置
219
207
  animation(x, duration = 0) {
@@ -239,9 +227,9 @@
239
227
  // 如果点击当前不触发change
240
228
  if (this.innerCurrent == index) return
241
229
  this.innerCurrent = index
242
- this.$nextTick(() => {
243
- this.resize()
244
- })
230
+ this.$nextTick(() => {
231
+ this.resize()
232
+ })
245
233
  this.$emit('update:current', index)
246
234
  this.$emit('change', {
247
235
  ...item,
@@ -263,11 +251,11 @@
263
251
  setScrollLeft() {
264
252
  // 当前活动tab的布局信息,有tab菜单的width和left(为元素左边界到父元素左边界的距离)等信息
265
253
  if (this.innerCurrent < 0) {
266
- this.innerCurrent = 0;
267
- }
268
- const tabRect = this.list[this.innerCurrent]
254
+ this.innerCurrent = 0;
255
+ }
256
+ const tabRect = this.tabList[this.innerCurrent]
269
257
  // 累加得到当前item到左边的距离
270
- const offsetLeft = this.list
258
+ const offsetLeft = this.tabList
271
259
  .slice(0, this.innerCurrent)
272
260
  .reduce((total, curr) => {
273
261
  return total + curr.rect.width
@@ -284,13 +272,14 @@
284
272
  // 获取所有标签的尺寸
285
273
  resize() {
286
274
  // 如果不存在list,则不处理
287
- if(this.list.length === 0) {
275
+ if (this.tabList.length === 0) {
288
276
  return
289
277
  }
290
278
  Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
291
279
  // 兼容在swiper组件中使用
292
280
  if (tabsRect.left > tabsRect.width) {
293
- tabsRect.right = tabsRect.right - Math.floor(tabsRect.left / tabsRect.width) * tabsRect.width
281
+ tabsRect.right = tabsRect.right - Math.floor(tabsRect.left / tabsRect.width) * tabsRect
282
+ .width
294
283
  tabsRect.left = tabsRect.left % tabsRect.width
295
284
  }
296
285
  // console.log(tabsRect)
@@ -300,7 +289,7 @@
300
289
  // 计算scroll-view的宽度,这里
301
290
  this.scrollViewWidth += item.width
302
291
  // 另外计算每一个item的中心点X轴坐标
303
- this.list[index].rect = item
292
+ this.tabList[index].rect = item
304
293
  })
305
294
  // 获取了tabs的尺寸之后,设置滑块的位置
306
295
  this.setLineLeft()
@@ -316,9 +305,9 @@
316
305
  // 获取所有标签的尺寸
317
306
  getAllItemRect() {
318
307
  return new Promise(resolve => {
319
- const promiseAllArr = this.list.map((item, index) => this.queryRect(
320
- `u-tabs__wrapper__nav__item-${index}`, true))
321
- Promise.all(promiseAllArr).then(sizes => resolve(sizes))
308
+ const promiseAllArr = this.tabList.map((item, index) => this.queryRect(
309
+ `u-tabs__wrapper__nav__item-${index}`, true));
310
+ Promise.all(promiseAllArr).then(sizes => resolve(sizes));
322
311
  })
323
312
  },
324
313
  // 获取各个标签的尺寸
@@ -348,7 +337,6 @@
348
337
  </script>
349
338
 
350
339
  <style lang="scss" scoped>
351
-
352
340
  .u-tabs {
353
341
 
354
342
  &__wrapper {
@@ -389,7 +377,7 @@
389
377
  &__text {
390
378
  font-size: 15px;
391
379
  color: $u-content-color;
392
- white-space: nowrap !important;
380
+ white-space: nowrap !important;
393
381
 
394
382
  &--disabled {
395
383
  color: $u-disabled-color !important;
@@ -1,11 +1,11 @@
1
1
  /*
2
2
  * @Author : LQ
3
3
  * @Description :
4
- * @version : 1.0
4
+ * @version : 3.0
5
5
  * @Date : 2021-08-20 16:44:21
6
- * @LastAuthor : LQ
7
- * @lastTime : 2021-08-20 17:23:37
8
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/tag.js
6
+ * @LastAuthor : jry
7
+ * @lastTime : 2025-12-19 08:55:21
8
+ * @FilePath : /uview-plus/libs/config/props/tag.js
9
9
  */
10
10
  export default {
11
11
  // tag 组件
@@ -1,11 +1,11 @@
1
1
  /*
2
2
  * @Author : LQ
3
3
  * @Description :
4
- * @version : 1.0
4
+ * @version : 3.0
5
5
  * @Date : 2021-08-20 16:44:21
6
- * @LastAuthor : LQ
7
- * @lastTime : 2021-08-20 17:23:58
8
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/text.js
6
+ * @LastAuthor : jry
7
+ * @lastTime : 2025-12-19 08:55:21
8
+ * @FilePath : /uview-plus/libs/config/props/text.js
9
9
  */
10
10
  export default {
11
11
  // text 组件
@@ -1,11 +1,11 @@
1
1
  /*
2
2
  * @Author : LQ
3
3
  * @Description :
4
- * @version : 1.0
4
+ * @version : 3.0
5
5
  * @Date : 2021-08-20 16:44:21
6
- * @LastAuthor : LQ
7
- * @lastTime : 2021-08-20 17:24:32
8
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/textarea.js
6
+ * @LastAuthor : jry
7
+ * @lastTime : 2025-12-19 08:55:21
8
+ * @FilePath : /uview-plus/libs/config/props/textarea.js
9
9
  */
10
10
  export default {
11
11
  // textarea 组件
@@ -1,11 +1,11 @@
1
1
  /*
2
2
  * @Author : LQ
3
3
  * @Description :
4
- * @version : 1.0
4
+ * @version : 3.0
5
5
  * @Date : 2021-08-20 16:44:21
6
- * @LastAuthor : LQ
7
- * @lastTime : 2021-08-20 17:07:07
8
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/toast.js
6
+ * @LastAuthor : jry
7
+ * @lastTime : 2025-12-19 08:55:21
8
+ * @FilePath : /uview-plus/libs/config/props/toast.js
9
9
  */
10
10
  export default {
11
11
  // toast组件
@@ -1,11 +1,11 @@
1
1
  /*
2
2
  * @Author : LQ
3
3
  * @Description :
4
- * @version : 1.0
4
+ * @version : 3.0
5
5
  * @Date : 2021-08-20 16:44:21
6
- * @LastAuthor : LQ
7
- * @lastTime : 2021-08-20 17:24:55
8
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/toolbar.js
6
+ * @LastAuthor : jry
7
+ * @lastTime : 2025-12-19 08:55:21
8
+ * @FilePath : /uview-plus/libs/config/props/toolbar.js
9
9
  */
10
10
  import { t } from '../../libs/i18n'
11
11
  export default {
@@ -1,11 +1,11 @@
1
1
  /*
2
2
  * @Author : LQ
3
3
  * @Description :
4
- * @version : 1.0
4
+ * @version : 3.0
5
5
  * @Date : 2021-08-20 16:44:21
6
- * @LastAuthor : LQ
7
- * @lastTime : 2021-08-20 17:25:14
8
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/tooltip.js
6
+ * @LastAuthor : jry
7
+ * @lastTime : 2025-12-19 08:55:21
8
+ * @FilePath : /uview-plus/libs/config/props/tooltip.js
9
9
  */
10
10
  export default {
11
11
  // tooltip 组件
@@ -1,11 +1,11 @@
1
1
  /*
2
2
  * @Author : LQ
3
3
  * @Description :
4
- * @version : 1.0
4
+ * @version : 3.0
5
5
  * @Date : 2021-08-20 16:44:21
6
- * @LastAuthor : LQ
7
- * @lastTime : 2021-08-20 16:59:00
8
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/transition.js
6
+ * @LastAuthor : jry
7
+ * @lastTime : 2025-12-19 08:55:21
8
+ * @FilePath : /uview-plus/libs/config/props/transition.js
9
9
  */
10
10
  export default {
11
11
  // transition动画组件的props
@@ -1,11 +1,11 @@
1
1
  /*
2
2
  * @Author : LQ
3
3
  * @Description :
4
- * @version : 1.0
4
+ * @version : 3.0
5
5
  * @Date : 2021-08-20 16:44:21
6
- * @LastAuthor : LQ
7
- * @lastTime : 2021-08-20 17:09:50
8
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/upload.js
6
+ * @LastAuthor : jry
7
+ * @lastTime : 2025-12-19 08:55:21
8
+ * @FilePath : /uview-plus/libs/config/props/upload.js
9
9
  */
10
10
  export default {
11
11
  // upload组件
@@ -250,7 +250,7 @@
250
250
  // 子元素交叉轴终点对齐
251
251
  .u-flex-self-end,
252
252
  .up-flex-self-end {
253
- align-self: flex-en !important;
253
+ align-self: flex-end !important;
254
254
  }
255
255
 
256
256
  // 子元素交叉轴第一行文字基线对齐
@@ -366,3 +366,4 @@
366
366
  }
367
367
  }
368
368
  }
369
+
@@ -157,8 +157,13 @@ export function $parent(name = undefined) {
157
157
  let parent = this.$parent
158
158
  // 通过while历遍,这里主要是为了H5需要多层解析的问题
159
159
  while (parent) {
160
- // 父组件
161
- let name2 = name.replace(/up-([a-zA-Z0-9-_]+)/g, 'u-$1')
160
+ // 父组件
161
+ let name2 = ''
162
+ if (name.startsWith('up-')) {
163
+ name2 = name.replace(/up-([a-zA-Z0-9-_]+)/g, 'u-$1')
164
+ } else if (name.startsWith('u-')) {
165
+ name2 = name.replace(/u-([a-zA-Z0-9-_]+)/g, 'up-$1')
166
+ }
162
167
  if (parent.$options && parent.$options.name !== name && parent.$options.name !== name2) {
163
168
  // 如果组件的name不相等,继续上一级寻找
164
169
  parent = parent.$parent
@@ -645,8 +650,8 @@ export function padZero(value) {
645
650
  * @param {*} event
646
651
  */
647
652
  export function formValidate(instance, event) {
648
- const formItem = $parent.call(instance, 'u-form-item')
649
- const form = $parent.call(instance, 'u-form')
653
+ const formItem = $parent.call(instance, 'up-form-item')
654
+ const form = $parent.call(instance, 'up-form')
650
655
  // 如果发生变化的input或者textarea等,其父组件中有u-form-item或者u-form等,就执行form的validate方法
651
656
  // 同时将form-item的pros传递给form,让其进行精确对象验证
652
657
  if (formItem && form) {
@@ -22,7 +22,6 @@ const logCommand = (function () {
22
22
  }
23
23
  const logCommand = (id, cmds) => {
24
24
  const mId = cmds.split(',')[0];
25
- const mName = queryMethod(mId);
26
25
  console.log(`=== callNative - componentId:${id}; method: ${mName}; cmds: ${cmds}`);
27
26
  }
28
27
  return logCommand;
@@ -214,7 +213,9 @@ const GBridge = {
214
213
  },
215
214
 
216
215
  perloadImage([url, id], callback) {
216
+ console.log('********************asda**********')
217
217
  GCanvasModule.preLoadImage([url, id], function (image) {
218
+ console.log('********************asda2**********')
218
219
  image.url = url;
219
220
  image.id = id;
220
221
  callback(image);
@@ -1,5 +1,6 @@
1
1
  let incId = 1;
2
2
 
3
+ import GBridge from '../bridge/bridge-weex.js'
3
4
  const noop = function () { };
4
5
 
5
6
  class GImage {
@@ -42,22 +43,29 @@ class GImage {
42
43
  }
43
44
 
44
45
  this._src = v;
45
-
46
- GImage.GBridge.perloadImage([this._src, this._id], (data) => {
47
- if (typeof data === 'string') {
48
- data = JSON.parse(data);
49
- }
50
- if (data.error) {
51
- var evt = { type: 'error', target: this };
52
- this.onerror(evt);
53
- } else {
54
- this.complete = true;
55
- this.width = typeof data.width === 'number' ? data.width : 0;
56
- this.height = typeof data.height === 'number' ? data.height : 0;
57
- var evt = { type: 'load', target: this };
58
- this.onload(evt);
59
- }
60
- });
46
+ try {
47
+ GBridge.perloadImage([this._src, this._id], (data) => {
48
+ if (process.env.NODE_ENV === 'development') {
49
+ console.log('****GBridge.perloadImage****')
50
+ }
51
+ if (typeof data === 'string') {
52
+ data = JSON.parse(data);
53
+ }
54
+
55
+ if (data.error) {
56
+ var evt = { type: 'error', target: this };
57
+ this.onerror(evt);
58
+ } else {
59
+ this.complete = true;
60
+ this.width = typeof data.width === 'number' ? data.width : 0;
61
+ this.height = typeof data.height === 'number' ? data.height : 0;
62
+ var evt = { type: 'load', target: this };
63
+ this.onload(evt);
64
+ }
65
+ });
66
+ } catch (error) {
67
+ console.log('perloadImage fail', error)
68
+ }
61
69
  }
62
70
 
63
71
  addEventListener(name, listener) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-plus",
3
3
  "name": "uview-plus",
4
4
  "displayName": "零云®uview-plus3.0重磅发布,全面的Vue3鸿蒙跨端移动组件库,组件丰富维护更新稳定。",
5
- "version": "3.6.29",
5
+ "version": "3.7.13",
6
6
  "description": "零云®uview-plus已兼容vue3支持多语言,120+全面的组件和便捷的工具会让您信手拈来。近期新增拖动排序、条码、图片裁剪、下拉刷新、虚拟列表、签名、Markdown等。",
7
7
  "keywords": [
8
8
  "uview",
@@ -10,7 +10,7 @@
10
10
  "ui",
11
11
  "echarts",
12
12
  "ui",
13
- "可视化设计"
13
+ "可视化"
14
14
  ],
15
15
  "main": "index.js",
16
16
  "repository": "https://github.com/ijry/uview-plus",
@@ -102,8 +102,6 @@
102
102
  }
103
103
  },
104
104
  "dependencies": {
105
- "clipboard": "^2.0.11",
106
- "dayjs": "^1.11.3"
107
105
  },
108
106
  "publishConfig": {
109
107
  "registry": "https://registry.npmjs.org/"
@@ -60,9 +60,13 @@ declare interface RadioProps {
60
60
 
61
61
  declare interface RadioSlots {
62
62
  /**
63
- * 自定义修改label内容
63
+ * 自定义icon内容
64
64
  */
65
- ['default']?: () => any
65
+ ['icon']?: () => any
66
+ /**
67
+ * 自定义label内容
68
+ */
69
+ ['label']?: () => any
66
70
  }
67
71
 
68
72
  declare interface _Radio {