uview-plus 3.4.25 → 3.4.26
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 +11 -0
- package/components/u-calendar/month.vue +1 -0
- package/components/u-card/card.js +40 -0
- package/components/u-card/props.js +26 -32
- package/components/u-image/u-image.vue +4 -4
- package/components/u-picker/picker.js +1 -1
- package/components/u-picker-data/u-picker-data.vue +7 -2
- package/components/u-upload/u-upload.vue +1 -1
- package/components/u-upload/utils.js +14 -13
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author : jry
|
|
3
|
+
* @Description :
|
|
4
|
+
* @version : 3.0
|
|
5
|
+
* @Date : 2025-04-26 16:37:21
|
|
6
|
+
* @LastAuthor : jry
|
|
7
|
+
* @lastTime : 2025-04-26 16:37:21
|
|
8
|
+
* @FilePath : /uview-plus/libs/config/props/card.js
|
|
9
|
+
*/
|
|
10
|
+
export default {
|
|
11
|
+
// cell组件的props
|
|
12
|
+
cell: {
|
|
13
|
+
full: false,
|
|
14
|
+
title: '',
|
|
15
|
+
titleColor: '#303133',
|
|
16
|
+
titleSize: '15px',
|
|
17
|
+
subTitle: '',
|
|
18
|
+
subTitleColor: '#909399',
|
|
19
|
+
subTitleSize: '13px',
|
|
20
|
+
border: true,
|
|
21
|
+
index: '',
|
|
22
|
+
margin: '15px',
|
|
23
|
+
borderRadius: '8px',
|
|
24
|
+
headStyle: {},
|
|
25
|
+
bodyStyle: {},
|
|
26
|
+
footStyle: {},
|
|
27
|
+
headBorderBottom: true,
|
|
28
|
+
footBorderTop: true,
|
|
29
|
+
thumb: '',
|
|
30
|
+
thumbWidth: '30px',
|
|
31
|
+
thumbCircle: false,
|
|
32
|
+
padding: '15px',
|
|
33
|
+
paddingHead: '',
|
|
34
|
+
paddingBody: '',
|
|
35
|
+
paddingFoot: '',
|
|
36
|
+
showHead: true,
|
|
37
|
+
showFoot: true,
|
|
38
|
+
boxShadow: 'none'
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -6,135 +6,129 @@ export const propsCard = defineMixin({
|
|
|
6
6
|
// 与屏幕两侧是否留空隙
|
|
7
7
|
full: {
|
|
8
8
|
type: Boolean,
|
|
9
|
-
default:
|
|
9
|
+
default: () => defProps.card.full
|
|
10
10
|
},
|
|
11
11
|
// 标题
|
|
12
12
|
title: {
|
|
13
13
|
type: String,
|
|
14
|
-
default:
|
|
14
|
+
default: () => defProps.card.title
|
|
15
15
|
},
|
|
16
16
|
// 标题颜色
|
|
17
17
|
titleColor: {
|
|
18
18
|
type: String,
|
|
19
|
-
default:
|
|
19
|
+
default: () => defProps.card.titleColor
|
|
20
20
|
},
|
|
21
21
|
// 标题字体大小
|
|
22
22
|
titleSize: {
|
|
23
23
|
type: [Number, String],
|
|
24
|
-
default:
|
|
24
|
+
default: () => defProps.card.titleSize
|
|
25
25
|
},
|
|
26
26
|
// 副标题
|
|
27
27
|
subTitle: {
|
|
28
28
|
type: String,
|
|
29
|
-
default:
|
|
29
|
+
default: () => defProps.card.subTitle
|
|
30
30
|
},
|
|
31
31
|
// 副标题颜色
|
|
32
32
|
subTitleColor: {
|
|
33
33
|
type: String,
|
|
34
|
-
default:
|
|
34
|
+
default: () => defProps.card.subTitleColor
|
|
35
35
|
},
|
|
36
36
|
// 副标题字体大小
|
|
37
37
|
subTitleSize: {
|
|
38
38
|
type: [Number, String],
|
|
39
|
-
default:
|
|
39
|
+
default: () => defProps.card.subTitleSize
|
|
40
40
|
},
|
|
41
41
|
// 是否显示外部边框,只对full=false时有效(卡片与边框有空隙时)
|
|
42
42
|
border: {
|
|
43
43
|
type: Boolean,
|
|
44
|
-
default:
|
|
44
|
+
default: () => defProps.card.border
|
|
45
45
|
},
|
|
46
46
|
// 用于标识点击了第几个
|
|
47
47
|
index: {
|
|
48
48
|
type: [Number, String, Object],
|
|
49
|
-
default:
|
|
49
|
+
default: () => defProps.card.index
|
|
50
50
|
},
|
|
51
51
|
// 用于隔开上下左右的边距,带单位的写法,如:"30px 30px","20px 20px 30px 30px"
|
|
52
52
|
margin: {
|
|
53
53
|
type: String,
|
|
54
|
-
default:
|
|
54
|
+
default: () => defProps.card.margin
|
|
55
55
|
},
|
|
56
56
|
// card卡片的圆角
|
|
57
57
|
borderRadius: {
|
|
58
58
|
type: [Number, String],
|
|
59
|
-
default:
|
|
59
|
+
default: () => defProps.card.borderRadius
|
|
60
60
|
},
|
|
61
61
|
// 头部自定义样式,对象形式
|
|
62
62
|
headStyle: {
|
|
63
63
|
type: Object,
|
|
64
|
-
default()
|
|
65
|
-
return {};
|
|
66
|
-
}
|
|
64
|
+
default: () => defProps.card.headStyle
|
|
67
65
|
},
|
|
68
66
|
// 主体自定义样式,对象形式
|
|
69
67
|
bodyStyle: {
|
|
70
68
|
type: Object,
|
|
71
|
-
default()
|
|
72
|
-
return {};
|
|
73
|
-
}
|
|
69
|
+
default: () => defProps.card.bodyStyle
|
|
74
70
|
},
|
|
75
71
|
// 底部自定义样式,对象形式
|
|
76
72
|
footStyle: {
|
|
77
73
|
type: Object,
|
|
78
|
-
default()
|
|
79
|
-
return {};
|
|
80
|
-
}
|
|
74
|
+
default: () => defProps.card.footStyle
|
|
81
75
|
},
|
|
82
76
|
// 头部是否下边框
|
|
83
77
|
headBorderBottom: {
|
|
84
78
|
type: Boolean,
|
|
85
|
-
default:
|
|
79
|
+
default: () => defProps.card.headBorderBottom
|
|
86
80
|
},
|
|
87
81
|
// 底部是否有上边框
|
|
88
82
|
footBorderTop: {
|
|
89
83
|
type: Boolean,
|
|
90
|
-
default:
|
|
84
|
+
default: () => defProps.card.footBorderTop
|
|
91
85
|
},
|
|
92
86
|
// 标题左边的缩略图
|
|
93
87
|
thumb: {
|
|
94
88
|
type: String,
|
|
95
|
-
default:
|
|
89
|
+
default: () => defProps.card.thumb
|
|
96
90
|
},
|
|
97
91
|
// 缩略图宽高
|
|
98
92
|
thumbWidth: {
|
|
99
93
|
type: [String, Number],
|
|
100
|
-
default:
|
|
94
|
+
default: () => defProps.card.thumbWidth
|
|
101
95
|
},
|
|
102
96
|
// 缩略图是否为圆形
|
|
103
97
|
thumbCircle: {
|
|
104
98
|
type: Boolean,
|
|
105
|
-
default:
|
|
99
|
+
default: () => defProps.card.thumbCircle
|
|
106
100
|
},
|
|
107
101
|
// 给head,body,foot的内边距
|
|
108
102
|
padding: {
|
|
109
103
|
type: [String, Number],
|
|
110
|
-
default:
|
|
104
|
+
default: () => defProps.card.padding
|
|
111
105
|
},
|
|
112
106
|
paddingHead: {
|
|
113
107
|
type: [String, Number],
|
|
114
|
-
default:
|
|
108
|
+
default: () => defProps.card.paddingHead
|
|
115
109
|
},
|
|
116
110
|
paddingBody: {
|
|
117
111
|
type: [String, Number],
|
|
118
|
-
default:
|
|
112
|
+
default: () => defProps.card.paddingBody
|
|
119
113
|
},
|
|
120
114
|
paddingFoot: {
|
|
121
115
|
type: [String, Number],
|
|
122
|
-
default:
|
|
116
|
+
default: () => defProps.card.paddingFoot
|
|
123
117
|
},
|
|
124
118
|
// 是否显示头部
|
|
125
119
|
showHead: {
|
|
126
120
|
type: Boolean,
|
|
127
|
-
default:
|
|
121
|
+
default: () => defProps.card.showHead
|
|
128
122
|
},
|
|
129
123
|
// 是否显示尾部
|
|
130
124
|
showFoot: {
|
|
131
125
|
type: Boolean,
|
|
132
|
-
default:
|
|
126
|
+
default: () => defProps.card.showFoot
|
|
133
127
|
},
|
|
134
128
|
// 卡片外围阴影,字符串形式
|
|
135
129
|
boxShadow: {
|
|
136
130
|
type: String,
|
|
137
|
-
default:
|
|
131
|
+
default: () => defProps.card.boxShadow
|
|
138
132
|
}
|
|
139
133
|
}
|
|
140
134
|
})
|
|
@@ -132,12 +132,12 @@
|
|
|
132
132
|
// #endif
|
|
133
133
|
// #ifndef APP-NVUE
|
|
134
134
|
if (this.loading || this.isError || this.width == '100%' || this.mode != 'heightFix') {
|
|
135
|
-
style.width = this.width;
|
|
135
|
+
style.width = addUnit(this.width);
|
|
136
136
|
} else {
|
|
137
137
|
style.width = 'fit-content';
|
|
138
138
|
}
|
|
139
139
|
if (this.loading || this.isError || this.height == '100%' || this.mode != 'widthFix') {
|
|
140
|
-
style.height = this.height;
|
|
140
|
+
style.height = addUnit(this.height);
|
|
141
141
|
} else {
|
|
142
142
|
style.height = 'fit-content';
|
|
143
143
|
}
|
|
@@ -153,12 +153,12 @@
|
|
|
153
153
|
// #endif
|
|
154
154
|
// #ifndef APP-NVUE
|
|
155
155
|
if (this.loading || this.isError || this.width == '100%' || this.mode != 'heightFix') {
|
|
156
|
-
style.width = this.width;
|
|
156
|
+
style.width = addUnit(this.width);
|
|
157
157
|
} else {
|
|
158
158
|
style.width = 'fit-content';
|
|
159
159
|
}
|
|
160
160
|
if (this.loading || this.isError || this.height == '100%' || this.mode != 'widthFix') {
|
|
161
|
-
style.height = this.height;
|
|
161
|
+
style.height = addUnit(this.height);
|
|
162
162
|
} else {
|
|
163
163
|
style.height = 'fit-content';
|
|
164
164
|
}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
:show="show"
|
|
18
18
|
:columns="optionsInner"
|
|
19
19
|
:keyName="labelKey"
|
|
20
|
+
:defaultIndex="defaultIndex"
|
|
20
21
|
@confirm="select"
|
|
21
22
|
@cancel="cancel">
|
|
22
23
|
</up-picker>
|
|
@@ -57,13 +58,15 @@ export default {
|
|
|
57
58
|
return {
|
|
58
59
|
show: false,
|
|
59
60
|
current: '',
|
|
61
|
+
defaultIndex: [],
|
|
60
62
|
}
|
|
61
63
|
},
|
|
62
64
|
created() {
|
|
63
65
|
if (this.modelValue) {
|
|
64
|
-
this.options.forEach((ele) => {
|
|
66
|
+
this.options.forEach((ele, index) => {
|
|
65
67
|
if (ele[this.valueKey] == this.modelValue) {
|
|
66
68
|
this.current = ele[this.labelKey]
|
|
69
|
+
this.defaultIndex = [index]
|
|
67
70
|
}
|
|
68
71
|
})
|
|
69
72
|
}
|
|
@@ -74,6 +77,7 @@ export default {
|
|
|
74
77
|
this.options.forEach((ele) => {
|
|
75
78
|
if (ele[this.valueKey] == this.modelValue) {
|
|
76
79
|
this.current = ele[this.labelKey]
|
|
80
|
+
this.defaultIndex = [index]
|
|
77
81
|
}
|
|
78
82
|
})
|
|
79
83
|
}
|
|
@@ -101,8 +105,9 @@ export default {
|
|
|
101
105
|
this.show = false;
|
|
102
106
|
// console.log(value);
|
|
103
107
|
this.$emit('update:modelValue', value[0][this.valueKey]);
|
|
108
|
+
this.defaultIndex = columnIndex;
|
|
104
109
|
this.current = value[0][this.labelKey];
|
|
105
|
-
}
|
|
110
|
+
}
|
|
106
111
|
}
|
|
107
112
|
}
|
|
108
113
|
</script>
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
<up-popup
|
|
172
172
|
mode="center"
|
|
173
173
|
v-model:show="popupShow">
|
|
174
|
-
<video id="myVideo"
|
|
174
|
+
<video id="myVideo" v-if="popupShow"
|
|
175
175
|
:src="currentItemIndex >= 0 ? lists[currentItemIndex].url : ''"
|
|
176
176
|
@error="videoErrorCallback" show-center-play-btn
|
|
177
177
|
object-fit='cover' show-fullscreen-btn='true'
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import test from '../../libs/function/test'
|
|
1
2
|
function pickExclude(obj, keys) {
|
|
2
3
|
// 某些情况下,type可能会为
|
|
3
4
|
if (!['[object Object]', '[object File]'].includes(Object.prototype.toString.call(obj))) {
|
|
@@ -21,30 +22,30 @@ function formatImage(res) {
|
|
|
21
22
|
// #ifdef H5
|
|
22
23
|
name: item.name,
|
|
23
24
|
file: item
|
|
24
|
-
// #endif
|
|
25
|
-
// #ifndef H5
|
|
26
|
-
name: item.path.split('/').pop() + '.png',
|
|
25
|
+
// #endif
|
|
26
|
+
// #ifndef H5
|
|
27
|
+
name: item.path.split('/').pop() + '.png',
|
|
27
28
|
// #endif
|
|
28
29
|
}))
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
function formatVideo(res) {
|
|
32
|
-
// console.log(res)
|
|
32
|
+
function formatVideo(res) {
|
|
33
|
+
// console.log(res)
|
|
33
34
|
return [
|
|
34
35
|
{
|
|
35
36
|
...pickExclude(res, ['tempFilePath', 'thumbTempFilePath', 'errMsg']),
|
|
36
37
|
type: 'video',
|
|
37
38
|
url: res.tempFilePath,
|
|
38
39
|
thumb: res.thumbTempFilePath,
|
|
39
|
-
size: res.size,
|
|
40
|
-
width: res.width || 0, // APP 2.1.0+、H5、微信小程序、京东小程序
|
|
40
|
+
size: res.size,
|
|
41
|
+
width: res.width || 0, // APP 2.1.0+、H5、微信小程序、京东小程序
|
|
41
42
|
height: res.height || 0, // APP 2.1.0+、H5、微信小程序、京东小程序
|
|
42
43
|
// #ifdef H5
|
|
43
44
|
name: res.name,
|
|
44
45
|
file: res
|
|
45
|
-
// #endif
|
|
46
|
-
// #ifndef H5
|
|
47
|
-
name: res.tempFilePath.split('/').pop() + '.mp4',
|
|
46
|
+
// #endif
|
|
47
|
+
// #ifndef H5
|
|
48
|
+
name: res.tempFilePath.split('/').pop() + '.mp4',
|
|
48
49
|
// #endif
|
|
49
50
|
}
|
|
50
51
|
]
|
|
@@ -59,9 +60,9 @@ function formatMedia(res) {
|
|
|
59
60
|
size: item.size,
|
|
60
61
|
// #ifdef H5
|
|
61
62
|
file: item
|
|
62
|
-
// #endif
|
|
63
|
-
// #ifndef H5
|
|
64
|
-
name: item.tempFilePath.split('/').pop() + (res.type === 'video' ? '.mp4': '.png'),
|
|
63
|
+
// #endif
|
|
64
|
+
// #ifndef H5
|
|
65
|
+
name: item.tempFilePath.split('/').pop() + (res.type === 'video' ? '.mp4': '.png'),
|
|
65
66
|
// #endif
|
|
66
67
|
}))
|
|
67
68
|
}
|
package/package.json
CHANGED