You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
2.0 KiB

4 months ago
  1. <template>
  2. <view class="u-calendar-header u-border-bottom">
  3. <text
  4. class="u-calendar-header__title"
  5. v-if="showTitle"
  6. >{{ title }}</text>
  7. <text
  8. class="u-calendar-header__subtitle"
  9. v-if="showSubtitle"
  10. >{{ subtitle }}</text>
  11. <view class="u-calendar-header__weekdays">
  12. <text class="u-calendar-header__weekdays__weekday"></text>
  13. <text class="u-calendar-header__weekdays__weekday"></text>
  14. <text class="u-calendar-header__weekdays__weekday"></text>
  15. <text class="u-calendar-header__weekdays__weekday"></text>
  16. <text class="u-calendar-header__weekdays__weekday"></text>
  17. <text class="u-calendar-header__weekdays__weekday"></text>
  18. <text class="u-calendar-header__weekdays__weekday"></text>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import { mpMixin } from '../../libs/mixin/mpMixin';
  24. import { mixin } from '../../libs/mixin/mixin';
  25. export default {
  26. name: 'u-calendar-header',
  27. mixins: [mpMixin, mixin],
  28. props: {
  29. // 标题
  30. title: {
  31. type: String,
  32. default: ''
  33. },
  34. // 副标题
  35. subtitle: {
  36. type: String,
  37. default: ''
  38. },
  39. // 是否显示标题
  40. showTitle: {
  41. type: Boolean,
  42. default: true
  43. },
  44. // 是否显示副标题
  45. showSubtitle: {
  46. type: Boolean,
  47. default: true
  48. },
  49. },
  50. data() {
  51. return {
  52. }
  53. },
  54. methods: {
  55. name() {
  56. }
  57. },
  58. }
  59. </script>
  60. <style lang="scss" scoped>
  61. @import "../../libs/css/components.scss";
  62. .u-calendar-header {
  63. padding-bottom: 4px;
  64. &__title {
  65. font-size: 16px;
  66. color: $u-main-color;
  67. text-align: center;
  68. height: 42px;
  69. line-height: 42px;
  70. font-weight: bold;
  71. }
  72. &__subtitle {
  73. font-size: 14px;
  74. color: $u-main-color;
  75. height: 40px;
  76. text-align: center;
  77. line-height: 40px;
  78. font-weight: bold;
  79. }
  80. &__weekdays {
  81. @include flex;
  82. justify-content: space-between;
  83. &__weekday {
  84. font-size: 13px;
  85. color: $u-main-color;
  86. line-height: 30px;
  87. flex: 1;
  88. text-align: center;
  89. }
  90. }
  91. }
  92. </style>