uni-grade.vue 608 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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:'https://static.caimei365.com/app/img/icon/'
  21. };
  22. },
  23. created() {
  24. },
  25. methods:{
  26. }
  27. }
  28. </script>
  29. <style lang="scss">
  30. .grade{
  31. width: 114rpx;
  32. height: 33rpx;
  33. float: left;
  34. image{
  35. width: 110rpx;
  36. height: 29rpx;
  37. display: block;
  38. }
  39. }
  40. </style>