Tag 标签

Scan me!

用于表示区域的状态的标签

引入

  1. import { Tag } from 'mand-mobile'
  2. Vue.component(Tag.name, Tag)

代码演示

半圆

Tag 标签 - 图2

  1. <template>
  2. <div class="md-example-child md-example-child-tag md-example-child-tag-0">
  3. <md-tag size="tiny" shape="circle" type="fill" fill-color="#FC7353" font-color="#000"></md-tag>
  4. <md-tag size="small" shape="circle" type="fill" fill-color="#FC7353" font-color="#fff">特惠</md-tag>
  5. <md-tag size="large" shape="circle" type="fill" fill-color="#FC7353" font-color="#fff">返5000</md-tag>
  6. <md-tag size="small" shape="circle" type="ghost" font-color="#FC7353">特惠</md-tag>
  7. <md-tag
  8. size="small"
  9. shape="circle"
  10. sharp="bottom-left"
  11. type="fill"
  12. fill-color="linear-gradient(90deg, #FC7353 0%, #FC9153 100%)"
  13. font-color="#fff"
  14. >续保3折起</md-tag>
  15. </div>
  16. </template>
  17. <script>
  18. import {Tag} from 'mand-mobile'
  19. export default {
  20. name: 'tag-demo',
  21. components: {
  22. [Tag.name]: Tag,
  23. },
  24. }
  25. </script>

线框

Tag 标签 - 图3

        <template>
  <div class="md-example-child md-example-child-tag md-example-child-tag-2">
    <tag size="large" shape="square" font-color="#FF8843" type="ghost">可选</tag>
    <tag size="small" shape="square" font-color="#28AA91" type="ghost">可选</tag>
  </div>
</template>

<script>
import {Tag} from 'mand-mobile'

export default {
  name: 'tag-demo',
  components: {
    Tag,
  },
}

</script>

      

特殊标签

Tag 标签 - 图4

        <template>
  <div class="md-example-child md-example-child-tag md-example-child-tag-3">
    <md-tag
      size="large"
      shape="coupon"
      fill-color="#FC9153"
      type="fill"
      font-color="#fff"
      style="margin-right:20px;"
    >免息券70.1</md-tag>
    <md-tag
      size="large"
      shape="quarter"
      fill-color="#FC9153"
      type="fill"
      font-color="#fff"
      style="margin-right:20px;"
    >
      <md-icon name="right"></md-icon>
    </md-tag>
    <md-tag
      size="large"
      shape="bubble"
      fill-color="linear-gradient(90deg, #FF5B60 0%, #F98472 100%)"
      type="fill"
    >99</md-tag>
  </div>
</template>

<script>
import {Tag, Icon} from 'mand-mobile'

export default {
  name: 'tag-demo',
  components: {
    [Tag.name]: Tag,
    [Icon.name]: Icon,
  },
}

</script>

      

圆角

Tag 标签 - 图5

        <template>
  <div class="md-example-child md-example-child-tag md-example-child-tag-1">
    <md-tag
      size="large"
      shape="fillet"
      type="fill"
      fill-color="rgba(255, 91, 96, .1)"
      font-weight="normal"
      font-color="#FF5B60"
    >逾期23天</md-tag>
  </div>
</template>

<script>
import {Tag} from 'mand-mobile'

export default {
  name: 'tag-demo',
  components: {
    [Tag.name]: Tag,
  },
}

</script>
      

阳文

Tag 标签 - 图6

        <template>
  <div class="md-example-child md-example-child-tag md-example-child-tag-3">
    <tag size="large" shape="square" fill-color="rgba(0,0,0,0)" type="fill" font-weight="bolder" font-color="#333">¥3600</tag>
    <tag size="small" shape="square" fill-color="rgba(0,0,0,0)" type="fill" font-weight="bolder" font-color="#333">¥300</tag>
  </div>
</template>

<script>
import {Tag} from 'mand-mobile'

export default {
  name: 'tag-demo',
  components: {
    Tag,
  },
}

</script>

      

API

Tag Props

属性说明类型默认值可选值
size标签大小Stringlargetiny, small, large
shape标签形状Stringsquaresquare, circle, fillet, quarter, coupon
sharp标签尖角String-top-left, top-right, bottom-left, bottom-right
type标签样式Stringghostfill(填充), ghost(线框)
fill-color标签颜色rgba or hex numberStringrgba(0,0,0,0)-
font-weight字体粗细Stringnormalnormal, bold, bolder
font-color字体颜色rgba or hex numberString#fc9153-