uni-grade.vue 586 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <view class="grade" :style="{marginTop:margin+'rpx'}">
  3. <image :src="path + 'icon-grade'+grade+'.png'" mode=""></image>
  4. </view>
  5. </template>
  6. <script>
  7. export default{
  8. name:"grade",
  9. props:{
  10. grade:{ //等级
  11. type: Number,
  12. },
  13. margin:{
  14. type:Number,
  15. default:12
  16. }
  17. },
  18. data() {
  19. return {
  20. path:'http://static-b.caimei365.com/app/img/icon/'
  21. };
  22. },
  23. methods:{
  24. }
  25. }
  26. </script>
  27. <style lang="scss">
  28. .grade{
  29. width: 114rpx;
  30. height: 33rpx;
  31. float: left;
  32. image{
  33. width: 110rpx;
  34. height: 29rpx;
  35. display: block;
  36. }
  37. }
  38. </style>