uview-plus 3.3.38 → 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 +8 -0
- package/components/u-album/u-album.vue +2 -2
- package/components/u-code/u-code.vue +1 -1
- package/components/u-radio-group/props.js +6 -1
- package/components/u-radio-group/radioGroup.js +4 -3
- package/components/u-radio-group/u-radio-group.vue +8 -0
- package/index.js +2 -2
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
v-for="(item, index1) in arr"
|
|
14
14
|
:key="index1"
|
|
15
15
|
:style="[imageStyle(index + 1, index1 + 1)]"
|
|
16
|
-
@tap="previewFullImage ? onPreviewTap(getSrc(item)) : ''"
|
|
16
|
+
@tap="previewFullImage ? onPreviewTap($event, getSrc(item)) : ''"
|
|
17
17
|
>
|
|
18
18
|
<image
|
|
19
19
|
:src="getSrc(item)"
|
|
@@ -189,7 +189,7 @@ export default {
|
|
|
189
189
|
methods: {
|
|
190
190
|
addUnit,
|
|
191
191
|
// 预览图片
|
|
192
|
-
onPreviewTap(url) {
|
|
192
|
+
onPreviewTap(e, url) {
|
|
193
193
|
const urls = this.urls.map((item) => {
|
|
194
194
|
return this.getSrc(item)
|
|
195
195
|
})
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
if(!this.keepRunning || !this.timer) return
|
|
108
108
|
// 记录当前的时间戳,为了下次进入页面,如果还在倒计时内的话,继续倒计时
|
|
109
109
|
// 倒计时尚未结束,结果大于0;倒计时已经开始,就会小于初始值,如果等于初始值,说明没有开始倒计时,无需处理
|
|
110
|
-
if(this.secNum > 0 && this.secNum
|
|
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
|
// 将本该结束时候的时间戳保存起来 => 当前时间戳 + 剩余的秒数
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @Description :
|
|
4
4
|
* @version : 1.0
|
|
5
5
|
* @Date : 2021-08-20 16:44:21
|
|
6
|
-
* @LastAuthor :
|
|
7
|
-
* @lastTime :
|
|
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
|
-
|
|
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
|
|