about.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <route lang="jsonc" type="page">
  2. {
  3. "layout": "tabbar",
  4. "style": {
  5. "navigationBarTitleText": "关于"
  6. }
  7. }
  8. </route>
  9. <script lang="ts" setup>
  10. import RequestComp from './components/request.vue'
  11. // 奇怪:同样的代码放在 vue 里面不会校验到错误,放在 .ts 文件里面会校验到错误
  12. // const testOxlint = (name: string) => {
  13. // console.log('oxlint')
  14. // }
  15. // testOxlint('oxlint')
  16. console.log('about')
  17. function gotoAlova() {
  18. uni.navigateTo({
  19. url: '/pages/about/alova',
  20. })
  21. }
  22. function gotoVueQuery() {
  23. uni.navigateTo({
  24. url: '/pages/about/vue-query',
  25. })
  26. }
  27. </script>
  28. <template>
  29. <view>
  30. <view class="mt-8 text-center text-xl text-gray-400">
  31. 组件使用、请求调用、unocss
  32. </view>
  33. <RequestComp />
  34. <view class="text-center">
  35. <button type="primary" size="mini" class="w-160px" @click="gotoAlova">
  36. 前往 alova 示例页面
  37. </button>
  38. </view>
  39. <view class="text-center">
  40. <button type="primary" size="mini" class="w-160px" @click="gotoVueQuery">
  41. vue-query 示例页面
  42. </button>
  43. </view>
  44. </view>
  45. </template>
  46. <style lang="scss" scoped>
  47. .test-css {
  48. // 16rpx=>0.5rem
  49. padding-bottom: 16rpx;
  50. // mt-4=>1rem=>16px;
  51. margin-top: 16px;
  52. text-align: center;
  53. }
  54. </style>