uview-plus 3.3.40 → 3.3.41
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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<u-transition
|
|
3
3
|
mode="fade"
|
|
4
4
|
:show="show"
|
|
5
|
+
:style="transStyle"
|
|
5
6
|
:duration="fade ? 1000 : 0"
|
|
6
7
|
>
|
|
7
8
|
<view
|
|
@@ -129,6 +130,13 @@
|
|
|
129
130
|
}
|
|
130
131
|
},
|
|
131
132
|
computed: {
|
|
133
|
+
transStyle() {
|
|
134
|
+
let style = {};
|
|
135
|
+
// 通过调用addUnit()方法,如果有单位,如百分比,px单位等,直接返回,如果是纯粹的数值,则加上rpx单位
|
|
136
|
+
style.width = addUnit(this.width);
|
|
137
|
+
style.height = addUnit(this.height);
|
|
138
|
+
return style;
|
|
139
|
+
},
|
|
132
140
|
wrapStyle() {
|
|
133
141
|
let style = {};
|
|
134
142
|
// 通过调用addUnit()方法,如果有单位,如百分比,px单位等,直接返回,如果是纯粹的数值,则加上rpx单位
|
|
@@ -156,8 +164,8 @@
|
|
|
156
164
|
methods: {
|
|
157
165
|
addUnit,
|
|
158
166
|
// 点击图片
|
|
159
|
-
onClick() {
|
|
160
|
-
this.$emit('click')
|
|
167
|
+
onClick(e) {
|
|
168
|
+
this.$emit('click', e)
|
|
161
169
|
},
|
|
162
170
|
// 图片加载失败
|
|
163
171
|
onErrorHandler(err) {
|
|
@@ -192,7 +200,7 @@
|
|
|
192
200
|
removeBgColor() {
|
|
193
201
|
// 淡入动画过渡完成后,将背景设置为透明色,否则png图片会看到灰色的背景
|
|
194
202
|
this.backgroundStyle = {
|
|
195
|
-
backgroundColor: '
|
|
203
|
+
backgroundColor: this.bgColor || '#ffffff'
|
|
196
204
|
};
|
|
197
205
|
}
|
|
198
206
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<view
|
|
3
3
|
class="u-radio-group"
|
|
4
4
|
:class="bemClass"
|
|
5
|
-
|
|
5
|
+
:style="radioGroupStyle"
|
|
6
6
|
>
|
|
7
7
|
<slot></slot>
|
|
8
8
|
</view>
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { props } from './props';
|
|
13
13
|
import { mpMixin } from '../../libs/mixin/mpMixin';
|
|
14
14
|
import { mixin } from '../../libs/mixin/mixin';
|
|
15
|
+
import { addUnit, addStyle, deepMerge } from '../../libs/function/index';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* radioRroup 单选框父组件
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
* @property {Boolean} borderBottom placement为row时,是否显示下边框 (默认 false )
|
|
35
36
|
* @property {String} iconPlacement 图标与文字的对齐方式 (默认 'left' )
|
|
36
37
|
* @property {Object} gap item 之间的间距
|
|
37
|
-
|
|
38
|
+
* @property {Object} customStyle 组件的样式,对象形式
|
|
38
39
|
* @event {Function} change 任一个radio状态发生变化时触发
|
|
39
40
|
* @example <u-radio-group v-model="value"></u-radio-group>
|
|
40
41
|
*/
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="u-view" :class="class" :style="{
|
|
4
|
+
backgroundColor: backgroundColor,
|
|
5
|
+
color: color,
|
|
6
|
+
flexDirection: flexDirection,
|
|
7
|
+
justifyContent: justifyContent,
|
|
8
|
+
alignItems: alignItems,
|
|
9
|
+
flex1: flex1,
|
|
10
|
+
width: width,
|
|
11
|
+
height: height,
|
|
12
|
+
padding: padding,
|
|
13
|
+
margin: margin,
|
|
14
|
+
borderColor: borderColor,
|
|
15
|
+
}">
|
|
16
|
+
</view>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
import { mpMixin } from '../../libs/mixin/mpMixin';
|
|
21
|
+
import { mixin } from '../../libs/mixin/mixin';
|
|
22
|
+
import { addStyle, addUnit, deepMerge } from '../../libs/function/index';
|
|
23
|
+
/**
|
|
24
|
+
* View 视图
|
|
25
|
+
* @description 对View默认标签的封装
|
|
26
|
+
* @tutorial https://ijry.github.io/uview-plus/components/view.html
|
|
27
|
+
* @property {String} bgColor 背景颜色
|
|
28
|
+
* @event {Function} click 点击触发事件
|
|
29
|
+
* @example <up-view></up-view>
|
|
30
|
+
*/
|
|
31
|
+
export default {
|
|
32
|
+
name: 'up-view',
|
|
33
|
+
// #ifdef MP
|
|
34
|
+
mixins: [mpMixin, mixin],
|
|
35
|
+
// #endif
|
|
36
|
+
// #ifndef MP
|
|
37
|
+
mixins: [mpMixin, mixin],
|
|
38
|
+
// #endif
|
|
39
|
+
emits: ['click'],
|
|
40
|
+
computed: {
|
|
41
|
+
valueStyle() {}
|
|
42
|
+
},
|
|
43
|
+
props: {
|
|
44
|
+
backgroundColor: '',
|
|
45
|
+
color: '',
|
|
46
|
+
flexDirection: '',
|
|
47
|
+
justifyContent: '',
|
|
48
|
+
alignItems: '',
|
|
49
|
+
flex1: '',
|
|
50
|
+
width: '',
|
|
51
|
+
height: '',
|
|
52
|
+
padding: '',
|
|
53
|
+
margin: '',
|
|
54
|
+
borderColor: ''
|
|
55
|
+
},
|
|
56
|
+
data() {
|
|
57
|
+
return {}
|
|
58
|
+
},
|
|
59
|
+
methods: {
|
|
60
|
+
addStyle,
|
|
61
|
+
clickHandler() {
|
|
62
|
+
this.$emit('click')
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<style lang="scss" scoped>
|
|
69
|
+
@import '../../libs/css/components.scss';
|
|
70
|
+
|
|
71
|
+
.u-view {
|
|
72
|
+
}
|
|
73
|
+
</style>
|