Tag 标签

Scan me!

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

引入

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

代码演示

半圆

  1. <template>
  2. <div class="md-example-child md-example-child-tag md-example-child-tag-0">
  3. <tag size="tiny" shape="circle" type="fill" fill-color="#FC7353" font-color="#000"></tag>
  4. <tag size="small" shape="circle" type="fill" fill-color="#FC7353" font-color="#fff">特惠</tag>
  5. <tag size="large" shape="circle" type="fill" fill-color="#FC7353" font-color="#fff">返5000</tag>
  6. <tag size="small" shape="circle" type="ghost" font-color="#FC7353">特惠</tag>
  7. </div>
  8. </template>
  9. <script>
  10. import {Tag} from 'mand-mobile'
  11. export default {
  12. name: 'tag-demo',
  13. components: {
  14. Tag,
  15. },
  16. }
  17. </script>

线框

  1. <template>
  2. <div class="md-example-child md-example-child-tag md-example-child-tag-2">
  3. <tag size="large" shape="square" font-color="#3CA0E6" type="ghost">运营车</tag>
  4. <tag size="small" shape="square" font-color="#3CA0E6" type="ghost">运营车</tag>
  5. </div>
  6. </template>
  7. <script>
  8. import {Tag} from 'mand-mobile'
  9. export default {
  10. name: 'tag-demo',
  11. components: {
  12. Tag,
  13. },
  14. }
  15. </script>

圆角

  1. <template>
  2. <div class="md-example-child md-example-child-tag md-example-child-tag-1">
  3. <tag size="large" shape="fillet" type="fill" fill-color="#FC9153" font-weight="normal" font-color="#fff"></tag>
  4. <tag size="large" shape="fillet" type="fill" fill-color="#50A050" font-weight="bold" font-color="#fff"></tag>
  5. <tag size="large" shape="fillet" type="fill" fill-color="#91C6EF" font-weight="bolder" font-color="#fff"></tag>
  6. </div>
  7. </template>
  8. <script>
  9. import {Tag} from 'mand-mobile'
  10. export default {
  11. name: 'tag-demo',
  12. components: {
  13. Tag,
  14. },
  15. }
  16. </script>

阳文

  1. <template>
  2. <div class="md-example-child md-example-child-tag md-example-child-tag-3">
  3. <tag size="large" shape="square" fill-color="rgba(0,0,0,0)" type="fill" font-weight="bolder" font-color="#333">¥3600</tag>
  4. <tag size="small" shape="square" fill-color="rgba(0,0,0,0)" type="fill" font-weight="bolder" font-color="#333">¥300</tag>
  5. </div>
  6. </template>
  7. <script>
  8. import {Tag} from 'mand-mobile'
  9. export default {
  10. name: 'tag-demo',
  11. components: {
  12. Tag,
  13. },
  14. }
  15. </script>
  16.  

API

Tag Props

属性说明类型默认值可选值
size标签大小Stringlargetiny, small, large
shape标签形状Stringsquaresquare, circle, fillet
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-