健康同学微信公众号h5项目
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1 рік тому
1 рік тому
1 рік тому
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <!-- -->
  2. <template>
  3. <div class="pageContent insight">
  4. <div class="periodNav">
  5. <div class="periodItem week" :class="{ active: active == 0 }" @click="active = 0">周</div>
  6. <div class="periodItem month" :class="{ active: active == 1 }" @click="active = 1">月</div>
  7. </div>
  8. <!-- 带有前后箭头的切换器 -->
  9. <div class="periodSwitch">
  10. <div class="arrow arrowLeft" @click="active = active == 0 ? 1 : 0">
  11. <van-icon name="arrow-left"></van-icon>
  12. </div>
  13. <div class="timearea">kdfdfkjhsojldkfho</div>
  14. <div class="arrow arrowRight" @click="active = active == 1 ? 0 : 1">
  15. <van-icon name="arrow"></van-icon>
  16. </div>
  17. </div>
  18. </div>
  19. </template>
  20. <script>
  21. export default {
  22. data() {
  23. return {
  24. active: 0
  25. };
  26. },
  27. created() {},
  28. mounted() {},
  29. methods: {}
  30. };
  31. </script>
  32. <style scoped lang="scss">
  33. @import './include.scss';
  34. .insight {
  35. padding-top: 20px;
  36. .periodNav {
  37. display: flex;
  38. justify-content: space-around;
  39. align-items: center;
  40. .periodItem {
  41. width: 48%;
  42. font-size: 28px;
  43. color: black;
  44. text-align: center;
  45. padding: 12px;
  46. border-radius: 30px;
  47. background: #E6E6E6;
  48. &.active {
  49. color: white;
  50. background: #179B3B;
  51. }
  52. }
  53. }
  54. .periodSwitch {
  55. display: flex;
  56. width: 100%;
  57. justify-content: space-between;
  58. align-items: center;
  59. padding: 40px 10px;
  60. .timearea {
  61. font-size: 28px;
  62. justify-self: center;
  63. }
  64. .arrow {
  65. font-size: 45px;
  66. }
  67. }
  68. }
  69. </style>