uview-plus 3.3.48 → 3.3.49
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/components/u-album/u-album.vue +0 -1
- package/components/u-image/u-image.vue +32 -4
- package/components/u-picker/picker.js +2 -1
- package/components/u-picker/props.js +5 -0
- package/components/u-picker/u-picker.vue +1 -0
- package/components/u-text/props.js +6 -1
- package/components/u-text/text.js +2 -1
- package/components/u-text/u-text.vue +15 -8
- package/package.json +1 -1
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
:lazy-load="lazyLoad"
|
|
21
21
|
class="u-image__image"
|
|
22
22
|
:style="{
|
|
23
|
+
width: addUnit(width),
|
|
24
|
+
height: addUnit(height),
|
|
23
25
|
borderRadius: shape == 'circle' ? '10000px' : addUnit(radius)
|
|
24
26
|
}"
|
|
25
27
|
></image>
|
|
@@ -125,17 +127,43 @@
|
|
|
125
127
|
transStyle() {
|
|
126
128
|
let style = {};
|
|
127
129
|
// 通过调用addUnit()方法,如果有单位,如百分比,px单位等,直接返回,如果是纯粹的数值,则加上rpx单位
|
|
130
|
+
// #ifdef APP-NVUE
|
|
128
131
|
style.width = addUnit(this.width);
|
|
129
132
|
style.height = addUnit(this.height);
|
|
133
|
+
// #endif
|
|
134
|
+
// #ifndef APP-NVUE
|
|
135
|
+
if (this.width == '100%') {
|
|
136
|
+
style.width = this.width;
|
|
137
|
+
} else {
|
|
138
|
+
style.width = 'fit-content';
|
|
139
|
+
}
|
|
140
|
+
if (this.height == '100%') {
|
|
141
|
+
style.height = this.height;
|
|
142
|
+
} else {
|
|
143
|
+
style.height = 'fit-content';
|
|
144
|
+
}
|
|
145
|
+
// #endif
|
|
130
146
|
return style;
|
|
131
147
|
},
|
|
132
148
|
wrapStyle() {
|
|
133
149
|
let style = {};
|
|
134
150
|
// 通过调用addUnit()方法,如果有单位,如百分比,px单位等,直接返回,如果是纯粹的数值,则加上rpx单位
|
|
135
|
-
//
|
|
136
|
-
|
|
137
|
-
style.
|
|
138
|
-
|
|
151
|
+
// #ifdef APP-NVUE
|
|
152
|
+
style.width = addUnit(this.width);
|
|
153
|
+
style.height = addUnit(this.height);
|
|
154
|
+
// #endif
|
|
155
|
+
// #ifndef APP-NVUE
|
|
156
|
+
if (this.width == '100%') {
|
|
157
|
+
style.width = this.width;
|
|
158
|
+
} else {
|
|
159
|
+
style.width = 'fit-content';
|
|
160
|
+
}
|
|
161
|
+
if (this.height == '100%') {
|
|
162
|
+
style.height = this.height;
|
|
163
|
+
} else {
|
|
164
|
+
style.height = 'fit-content';
|
|
165
|
+
}
|
|
166
|
+
// #endif
|
|
139
167
|
// 如果是显示圆形,设置一个很多的半径值即可
|
|
140
168
|
style.borderRadius = this.shape == 'circle' ? '10000px' : addUnit(this.radius)
|
|
141
169
|
// 如果设置圆角,必须要有hidden,否则可能圆角无效
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
class="u-text"
|
|
4
4
|
:class="[customClass]"
|
|
5
5
|
v-if="show"
|
|
6
|
-
:style="
|
|
7
|
-
margin: margin,
|
|
8
|
-
justifyContent: align === 'left' ? 'flex-start' : align === 'center' ? 'center' : 'flex-end'
|
|
9
|
-
}"
|
|
6
|
+
:style="wrapStyle"
|
|
10
7
|
@tap="clickHandler"
|
|
11
8
|
>
|
|
12
9
|
<text
|
|
@@ -116,6 +113,20 @@ export default {
|
|
|
116
113
|
// #endif
|
|
117
114
|
emits: ['click'],
|
|
118
115
|
computed: {
|
|
116
|
+
wrapStyle() {
|
|
117
|
+
let style = {
|
|
118
|
+
margin: this.margin,
|
|
119
|
+
justifyContent: this.align === 'left' ? 'flex-start' : this.align === 'center' ? 'center' : 'flex-end'
|
|
120
|
+
}
|
|
121
|
+
// 占满剩余空间
|
|
122
|
+
if (this.flex1) {
|
|
123
|
+
style.flex = 1;
|
|
124
|
+
// #ifndef APP-NVUE
|
|
125
|
+
style.width = '100%';
|
|
126
|
+
// #endif
|
|
127
|
+
}
|
|
128
|
+
return style;
|
|
129
|
+
},
|
|
119
130
|
valueStyle() {
|
|
120
131
|
const style = {
|
|
121
132
|
textDecoration: this.decoration,
|
|
@@ -170,10 +181,6 @@ export default {
|
|
|
170
181
|
@include flex(row);
|
|
171
182
|
align-items: center;
|
|
172
183
|
flex-wrap: nowrap;
|
|
173
|
-
flex: 1;
|
|
174
|
-
/* #ifndef APP-NVUE */
|
|
175
|
-
width: 100%;
|
|
176
|
-
/* #endif */
|
|
177
184
|
|
|
178
185
|
&__price {
|
|
179
186
|
font-size: 14px;
|