<template>
    <view
        :class="'custom-class ' + utils.bem('tag', [type, size, { mark, plain, round }]) + ' ' + (plain ? 'van-hairline--surround' : '')"
        :style="(color && !plain ? 'background-color: ' + color + ';' : '') + (textColor || (color && plain) ? 'color: ' + (textColor || color) : '')"
    >
        <slot />
        <van-icon v-if="closeable" name="cross" custom-class="van-tag__close" @click="onClose" />
    </view>
</template>
<script module="utils" lang="wxs" src="@/node_modules/@vant/weapp/lib/wxs/utils.wxs"></script>
<script>
'use strict';
Object.defineProperty(exports, '__esModule', {
    value: true
});
var component_1 = require('../common/component');
component_1.VantComponent({
    props: {
        size: String,
        mark: Boolean,
        color: String,
        plain: Boolean,
        round: Boolean,
        textColor: String,
        type: {
            type: String,
            value: 'default'
        },
        closeable: Boolean
    },
    methods: {
        onClose: function () {
            this.$emit('close');
        }
    }
});
</script>
<style>
@import './index.css';
</style>
