-
zhangwei
2025-03-05 16213c0f85aa3ac8317797bf4a05fd12940e16d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<template>
    <view
        class="u-view" :class="class" :style="{
            backgroundColor: backgroundColor,
            color: color,
            flexDirection: flexDirection,
            justifyContent: justifyContent,
            alignItems: alignItems,
            flex1: flex1,
            width: width,
            height: height,
            padding: padding,
            margin: margin,
            borderColor: borderColor,
        }">
    </view>
</template>
 
<script>
import { mpMixin } from '../../libs/mixin/mpMixin';
import { mixin } from '../../libs/mixin/mixin';
import { addStyle, addUnit, deepMerge } from '../../libs/function/index';
/**
 * View 视图
 * @description 对View默认标签的封装
 * @tutorial https://ijry.github.io/uview-plus/components/view.html
 * @property {String}                     bgColor        背景颜色
 * @event {Function} click  点击触发事件
 * @example <up-view></up-view>
 */
export default {
    name: 'up-view',
    // #ifdef MP
    mixins: [mpMixin, mixin],
    // #endif
    // #ifndef MP
    mixins: [mpMixin, mixin],
    // #endif
    emits: ['click'],
    computed: {
        valueStyle() {}
    },
    props: {
        backgroundColor: '',
        color: '',
        flexDirection: '',
        justifyContent: '',
        alignItems: '',
        flex1: '',
        width: '',
        height: '',
        padding: '',
        margin: '',
        borderColor: ''
    },
    data() {
        return {}
    },
    methods: {
        addStyle,
        clickHandler() {
            this.$emit('click')
        }
    }
}
</script>
 
<style lang="scss" scoped>
@import '../../libs/css/components.scss';
 
.u-view {
}
</style>