uview-plus 3.3.39 → 3.3.40

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.
package/changelog.md CHANGED
@@ -1,5 +1,11 @@
1
+ ## 3.3.40(2024-11-11)
2
+ add: 组件radioGroup增加gap属性用于设置item间隔
3
+
4
+ fix: 修复H5全局导入
5
+
1
6
  ## 3.3.39(2024-11-04)
2
7
  fix: 修复相册组件
8
+
3
9
  ## 3.3.38(2024-11-04)
4
10
  fix: 修复视频预览报错 #510
5
11
 
@@ -107,7 +107,7 @@
107
107
  if(!this.keepRunning || !this.timer) return
108
108
  // 记录当前的时间戳,为了下次进入页面,如果还在倒计时内的话,继续倒计时
109
109
  // 倒计时尚未结束,结果大于0;倒计时已经开始,就会小于初始值,如果等于初始值,说明没有开始倒计时,无需处理
110
- if(this.secNum > 0 && this.secNum < this.seconds) {
110
+ if(this.secNum > 0 && this.secNum <= this.seconds) {
111
111
  // 获取当前时间戳(+ new Date()为特殊写法),除以1000变成秒,再去除小数部分
112
112
  let nowTimestamp = Math.floor((+ new Date()) / 1000)
113
113
  // 将本该结束时候的时间戳保存起来 => 当前时间戳 + 剩余的秒数
@@ -90,6 +90,11 @@ export const props = defineMixin({
90
90
  iconPlacement: {
91
91
  type: String,
92
92
  default: () => defProps.radio.iconPlacement
93
- }
93
+ },
94
+ // item 之间的间距
95
+ gap: {
96
+ type: [String, Number],
97
+ default: () => defProps.radioGroup.gap
98
+ }
94
99
  }
95
100
  })
@@ -3,8 +3,8 @@
3
3
  * @Description :
4
4
  * @version : 1.0
5
5
  * @Date : 2021-08-20 16:44:21
6
- * @LastAuthor : LQ
7
- * @lastTime : 2021-08-20 17:03:12
6
+ * @LastAuthor : CPS
7
+ * @lastTime : 2024-11-05 16:01:12
8
8
  * @FilePath : /u-view2.0/uview-ui/libs/config/props/radioGroup.js
9
9
  */
10
10
  export default {
@@ -25,6 +25,7 @@ export default {
25
25
  iconColor: '#ffffff',
26
26
  iconSize: 12,
27
27
  borderBottom: false,
28
- iconPlacement: 'left'
28
+ iconPlacement: 'left',
29
+ gap: "10px"
29
30
  }
30
31
  }
@@ -2,6 +2,7 @@
2
2
  <view
3
3
  class="u-radio-group"
4
4
  :class="bemClass"
5
+ :style="radioGroupStyle"
5
6
  >
6
7
  <slot></slot>
7
8
  </view>
@@ -32,6 +33,7 @@
32
33
  * @property {String | Number} iconSize 图标的大小,单位px (默认 12 )
33
34
  * @property {Boolean} borderBottom placement为row时,是否显示下边框 (默认 false )
34
35
  * @property {String} iconPlacement 图标与文字的对齐方式 (默认 'left' )
36
+ * @property {Object} gap item 之间的间距
35
37
  * @property {Object} customStyle 组件的样式,对象形式
36
38
  * @event {Function} change 任一个radio状态发生变化时触发
37
39
  * @example <u-radio-group v-model="value"></u-radio-group>
@@ -60,6 +62,12 @@
60
62
  // this.bem为一个computed变量,在mixin中
61
63
  return this.bem('radio-group', ['placement'])
62
64
  },
65
+ radioGroupStyle() {
66
+ const style = {
67
+ gap: addUnit(this.gap)
68
+ };
69
+ return deepMerge(style, addStyle(this.customStyle));
70
+ }
63
71
  },
64
72
  watch: {
65
73
  // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
package/index.js CHANGED
@@ -89,7 +89,6 @@ let components = [];
89
89
  for (const key in importFn) {
90
90
  let component = importFn[key].default;
91
91
  if (component.name && component.name.indexOf('u--') !== 0) {
92
- const name = component.name.replace(/u-([a-zA-Z0-9-_]+)/g, 'up-$1');
93
92
  component.install = function (Vue) {
94
93
  Vue.component(name, component);
95
94
  };
@@ -111,7 +110,8 @@ function toCamelCase(str) {
111
110
  const install = (Vue) => {
112
111
  // #ifdef H5
113
112
  components.forEach(function(component) {
114
- Vue.component(component.name, component);
113
+ const name = component.name.replace(/u-([a-zA-Z0-9-_]+)/g, 'up-$1');
114
+ Vue.component(name, component);
115
115
  });
116
116
  // #endif
117
117
 
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.3.39",
5
+ "version": "3.3.40",
6
6
  "description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",