tabbar.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <script setup lang="ts">
  2. import TabbarEvo from '@/components/tabbar-evo.vue'
  3. import { iconCamera, iconWallet } from '@/core/libs/pngs'
  4. import type { ConfigProviderThemeVars } from 'wot-design-uni'
  5. const themeVars: ConfigProviderThemeVars = {
  6. // colorTheme: 'red',
  7. buttonPrimaryBgColor: '#000',
  8. // buttonPrimaryColor: '#07c160',
  9. }
  10. const publishState = ref(false)
  11. const items = [
  12. { title: '首页', icon: 'home', iconPath: '/static/tabbar/home.svg', path: '/pages/home/index' },
  13. {
  14. title: '材料',
  15. icon: 'home',
  16. iconPath: '/static/tabbar/material.svg',
  17. path: '/pages/material/index',
  18. },
  19. {
  20. title: '发布',
  21. icon: 'home',
  22. iconPath: '/static/tabbar/publish.svg',
  23. path: '/pages/publish/index',
  24. hiddenTitle: true,
  25. },
  26. {
  27. title: '消息',
  28. icon: 'home',
  29. iconPath: '/static/tabbar/message.svg',
  30. path: '/pages/messages/index',
  31. },
  32. { title: '我的', icon: 'home', iconPath: '/static/tabbar/mine.svg', path: '/pages/mine/index' },
  33. ]
  34. const handleTabbarItemClick = (path: string) => {
  35. if (path === '/pages/publish/index') {
  36. publishState.value = true
  37. return
  38. }
  39. uni.switchTab({ url: path })
  40. }
  41. </script>
  42. <template>
  43. <wd-config-provider :themeVars="themeVars">
  44. <view class="bg-[#f6f6f6] pb-20">
  45. <slot />
  46. </view>
  47. <TabbarEvo :items="items" fixed safeAreaInsetBottom @click="handleTabbarItemClick" />
  48. <div
  49. v-if="publishState"
  50. class="bg-white/80 backdrop-blur-[100px] fixed top-0 left-0 right-0 bottom-0 z-1"
  51. >
  52. <div class="w-full h-full flex flex-col justify-around px-7 box-border">
  53. <div class="text-black/40 text-3xl font-normal font-['PingFang SC'] leading-[45px]">
  54. 发布记录,
  55. <br />
  56. 成为更好的自己!
  57. </div>
  58. <div class="flex flex-col">
  59. <div class="flex justify-around">
  60. <div class="flex flex-col items-center">
  61. <wd-img :src="iconCamera" width="66" mode="widthFix"></wd-img>
  62. <div class="text-black text-sm font-normal font-['PingFang SC'] leading-[21px]">
  63. 个人动态
  64. </div>
  65. </div>
  66. <div class="flex flex-col items-center">
  67. <wd-img :src="iconWallet" width="66" mode="widthFix"></wd-img>
  68. <div class="text-black text-sm font-normal font-['PingFang SC'] leading-[21px]">
  69. 设计案例
  70. </div>
  71. </div>
  72. </div>
  73. <wd-button
  74. custom-class="mt-15"
  75. type="icon"
  76. icon="close"
  77. @click="publishState = false"
  78. ></wd-button>
  79. </div>
  80. </div>
  81. </div>
  82. <wd-toast />
  83. <wd-message-box />
  84. </wd-config-provider>
  85. </template>
  86. <style lang="scss"></style>