IndexManageItem.vue 940 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <view @click="onclick()" class="div item">
  3. <image mode="aspectFit" class="img item-icon" :src="src" />
  4. <text class="span item-title">{{title}}</text>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. props: {
  10. title: {
  11. type: String
  12. },
  13. src: {
  14. type: String
  15. }
  16. },
  17. methods: {
  18. onclick () {
  19. this.$emit('onclick')
  20. }
  21. }
  22. }
  23. </script>
  24. <style lang="scss" scoped>
  25. .item {
  26. padding:.5rem 0;
  27. text-align: center;
  28. box-sizing: border-box;
  29. float: left;
  30. width: 25%;
  31. position: relative;
  32. }
  33. .item-icon {
  34. display: block;
  35. margin: 0 auto;
  36. width:1.4rem;
  37. height:1.4rem;
  38. font-weight:500;
  39. }
  40. .item-title {
  41. display:block;
  42. font-size:$fontSize;
  43. color: #666;
  44. height:1rem;
  45. line-height:1rem;
  46. margin-top:0.3rem;
  47. }
  48. </style>