<template>
    <view :style="getStyle">{{ value }}</view>
</template>

<script setup>
import { computed } from 'vue'

const ps = defineProps({
    // OPEN/CLOSE/跟踪
    value: {
        type: String,
        default: ''
    },
    size: {
        type: [String, Number],
        default: 34
    }
})
const getStyle = computed(() => {
    const _style = {}
    if (ps.value == 'OPEN') {
        _style.color = '#F53F3F'
    }
    if (ps.value == 'CLOSE') {
        _style.color = '#F53F3F'
    }
    if (ps.value == '跟踪') {
        _style.color = '#00B42A'
    }
    return {
        ..._style,
        fontSize: ps.size + 'rpx',
        display: 'inline-block'
    }
})
</script>
<style lang="scss" scoped></style>
