uni-grade.vue 567 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <view class="grade" :style="{marginTop:margin+'rpx'}">
  3. <image :src="staticUrl + 'icon-grade'+grade+'@2x.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. };
  21. },
  22. created() {
  23. },
  24. methods:{
  25. }
  26. }
  27. </script>
  28. <style lang="scss">
  29. .grade{
  30. width: 118rpx;
  31. height: 36rpx;
  32. float: left;
  33. image{
  34. width: 118rpx;
  35. height: 36rpx;
  36. display: block;
  37. }
  38. }
  39. </style>