cm-floor-title.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <view class="floor-title">
  3. <view class="row">
  4. <text class="title" v-text="title"></text>
  5. <view class="more" @click="$emit('click')">
  6. <text v-text="moreText"></text>
  7. <text class="iconfont icon-chakangengduo"></text>
  8. </view>
  9. </view>
  10. <view class="sub-title" v-if="subTitle"><text v-text="subTitle"></text></view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. name: 'cm-floor-title',
  16. props: {
  17. title: {
  18. type: String,
  19. default: '标题'
  20. },
  21. subTitle: {
  22. type: String,
  23. default: ''
  24. },
  25. moreText: {
  26. type: String,
  27. default: '查看更多'
  28. }
  29. }
  30. }
  31. </script>
  32. <style lang="scss" scoped>
  33. // 楼层标题
  34. .floor-title {
  35. padding: 24rpx;
  36. .row {
  37. @extend .cm-flex-between;
  38. .title {
  39. @include ellipsis(1);
  40. max-width: 600rpx;
  41. font-size: 34rpx;
  42. font-weight: 600;
  43. color: #333333;
  44. }
  45. .more {
  46. font-size: 26rpx;
  47. color: #999999;
  48. .iconfont {
  49. font-size: 24rpx;
  50. }
  51. }
  52. }
  53. .sub-title {
  54. font-size: 26rpx;
  55. color: #999999;
  56. margin-top: 8rpx;
  57. }
  58. }
  59. </style>