wxc-label

    图片角标

    1. <view class="wrap">
    2. <image class="img" src="https://s10.mogucdn.com/mlcdn/c45406/171025_462jgf26k954504k111664ck0ek5j_640x640.jpg"></image>
    3. <wxc-label class="label" type="corner">抽奖团</wxc-label>
    4. </view>
    5. <view class="wrap">
    6. <image class="img" src="https://s10.mogucdn.com/mlcdn/c45406/171025_83j9gbl58kk4f04e7kjd5l82a6i92_640x640.jpg"></image>
    7. <wxc-label class="label" type="corner">老带新</wxc-label>
    8. </template>
    9. <script>
    10. export default {
    11. config: {
    12. usingComponents: {
    13. 'wxc-label': '@minui/wxc-label',
    14. }
    15. },
    16. data: {},
    17. methods: {}
    18. }
    19. </script>
    20. <style>
    21. .wrap {
    22. display: inline-block;
    23. height: 250rpx;
    24. line-height: 1;
    25. margin-right: 20rpx;
    26. border-radius: 8rpx;
    27. position: relative;
    28. }
    29. .img {
    30. width: 250rpx;
    31. height: 250rpx;
    32. }
    33. .label {
    34. position: absolute;
    35. top: 0;
    36. left: 0;
    37. }
    38. </style>

    自定义色值

    非镂空状态

    标签 label - 图3

    <template>
      <wxc-label class="label" type="fill">双11价</wxc-label>
      <wxc-label class="label" type="fill">限时折扣</wxc-label>
    </template>
    
    <script>
    export default {
      config: {
        usingComponents: {
          'wxc-label': '@minui/wxc-label',
          'wxc-icon': '@minui/wxc-icon'
        }
      },
      data: {},
      methods: {}
    }
    </script>
    
    <style>
      .label {
        margin-right: 20rpx;
      }
    </style>
    

    属性传值

    标签 label - 图5

    <template>
      <wxc-label class="label" text="双11价"></wxc-label>
      <wxc-label class="label" text="限时折扣"></wxc-label>
    </template>
    
    <script>
    export default {
      config: {
        usingComponents: {
          'wxc-label': '@minui/wxc-label',
          'wxc-icon': '@minui/wxc-icon'
        }
      },
      data: {},
      methods: {}
    }
    </script>
    
    <style>
      .label {
        margin-right: 20rpx;
      }
    </style>
    

    Label【props】

    地址
    label 组件文档
    label 组件源码 https://github.com/meili/minui/tree/master/packages/wxc-label
    MinUI 组件库

    v1.0.2(2017.11.02)

    • update .npmignore

    v1.0.1(2017.10.24)