my-card.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <view>
  3. <view class="d-flex py2 border-bottom a-center" @tap='handleLubrication'>
  4. <view class="iconfont mr-3 icon main-color-text" :class="icon" :style="colorStyle"></view>
  5. <view class="f-size-32 text-color-3">{{title}}</view>
  6. <view class="d-flex a-center ml-auto">
  7. <view v-if="tipNum" class="f-size-24 text-color-white" style="background-color: red;border-radius: 50%;padding: 0rpx 10rpx;">{{tipNum}}</view>
  8. <view class="ml-2 text-color-9"> <u-icon name="arrow-right"></u-icon> </view>
  9. </view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. };
  18. },
  19. computed:{
  20. colorStyle(){
  21. return `color:${this.iColor}`
  22. }
  23. },
  24. props:{
  25. title:{
  26. type:String,
  27. default:''
  28. },
  29. tipNum:{
  30. type:Number,
  31. default:0
  32. },
  33. icon:{
  34. type:String,
  35. default:'icon-icon_jishiben-'
  36. },
  37. iColor:{
  38. type:String,
  39. default:''
  40. }
  41. },
  42. methods:{
  43. handleLubrication(){
  44. this.$emit('handleLubrication',this.title)
  45. }
  46. }
  47. }
  48. </script>
  49. <style scoped>
  50. .icon{
  51. font-size: 50rpx;
  52. }
  53. </style>