about.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <route lang="json5">
  2. {
  3. layout: 'tabbar',
  4. style: {
  5. navigationBarTitleText: '关于',
  6. navigationStyle: 'custom', // 开启自定义导航栏
  7. },
  8. }
  9. </route>
  10. <template>
  11. <view>
  12. <fg-navbar>关于</fg-navbar>
  13. <view
  14. class="bg-white overflow-hidden pt-2 px-4"
  15. :style="{ marginTop: safeAreaInsets?.top + 'px' }"
  16. >
  17. <view class="text-center text-3xl mt-8">
  18. 鸽友们好,我是
  19. <text class="text-red-500">菲鸽</text>
  20. </view>
  21. <!-- <button @click="toSubPage()">去分包</button> -->
  22. <view class="test-css">测试 scss 样式</view>
  23. <RequestComp />
  24. <UploadComp />
  25. </view>
  26. </view>
  27. </template>
  28. <script lang="ts" setup>
  29. import RequestComp from './components/request.vue'
  30. import UploadComp from './components/upload.vue'
  31. // 获取屏幕边界到安全区域距离
  32. const { safeAreaInsets } = uni.getSystemInfoSync()
  33. const toSubPage = () => {
  34. uni.navigateTo({
  35. url: '/pages-sub/demo/index',
  36. })
  37. }
  38. // 奇怪:同样的代码放在 vue 里面不会校验到错误,放在 .ts 文件里面会校验到错误
  39. // const testOxlint = (name: string) => {
  40. // console.log('oxlint')
  41. // }
  42. // testOxlint('oxlint')
  43. </script>
  44. <style lang="scss" scoped>
  45. .test-css {
  46. // 16rpx=>0.5rem
  47. padding-bottom: 16rpx;
  48. // mt-4=>1rem=>16px;
  49. margin-top: 16px;
  50. text-align: center;
  51. }
  52. </style>