wxc-tag

Weex 通用标签组件,支持实心标签、空心标签、特殊标签、图片标签

Demo

    

使用方法

<template>
  <div class="wrapper">
   <wxc-tag type="solid"
            tag-color="#ff5000"
            font-color="#ffffff"
            value="实心标签"></wxc-tag>
  </div>
</template>
<script>
  import { WxcTag } from 'weex-ui';
  export default {
    components: { WxcTag }
  };
</script>

可配置参数

PropTypeRequiredDefaultDescription
typeStringNsolid标签的类型(注1)
valueStringY-文字标签的文案
tag-colorStringN#ff5000标签颜色
font-colorStringN#ffffff文字颜色
special-iconStringN-特殊标签的小icon(注2)
imgStringN-图片类型tag的图片地址(注3)
  • 注1: type的类型有如下四种solid、hollow、special、image,默认是solid(实心)
  • 注2: specialIcon本应该为iconfont的,但是考虑的Weex,直接使用png会更方便
  • 注3: type为image时,img字段为必传