index.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <!-- 使用 type="home" 属性设置首页,其他页面不需要设置,默认为page;推荐使用json5,更强大,且允许注释 -->
  2. <route lang="json5" type="home">
  3. {
  4. style: {
  5. navigationStyle: 'custom',
  6. navigationBarTitleText: '首页',
  7. },
  8. }
  9. </route>
  10. <template>
  11. <view
  12. class="bg-white h-full overflow-hidden pt-2 px-4"
  13. :style="{ marginTop: safeAreaInsets?.top + 'px' }"
  14. >
  15. <view class="mt-12">
  16. <image src="/static/logo.svg" alt="" class="w-40 h-40 block mx-auto" />
  17. </view>
  18. <view class="text-center text-4xl main-title-color mt-8">unibest</view>
  19. <view class="text-center text-2xl mt-2 mb-8">最好用的 uniapp 开发模板</view>
  20. <view class="text-justify max-w-100 m-auto">
  21. unibest 是由 uniapp + Vue3 + Ts + Vite4 + UnoCss + UniUI 驱动的跨端快速启动模板,使用 VS Code
  22. 开发,具有代码提示、自动格式化、统一配置、代码片段等功能,同时内置了大量平时开发常用的基本组件,开箱即用,让你编写
  23. uniapp 拥有 best 体验。</view
  24. >
  25. <view class="text-blue mt-8 text-center"> 详细示例 参考 hello-unibest 项目 </view>
  26. <!-- #ifdef H5 -->
  27. <view class="my-2 text-center">
  28. <a class="my-2 text-center" href="https://github.com/codercup/hello-unibest" target="_blank">
  29. https://github.com/codercup/hello-unibest
  30. </a>
  31. </view>
  32. <!-- #endif -->
  33. <!-- #ifndef H5 -->
  34. <view class="my-2 text-center">https://github.com/codercup/hello-unibest</view>
  35. <!-- #endif -->
  36. </view>
  37. </template>
  38. <script lang="ts" setup>
  39. // 获取屏幕边界到安全区域距离
  40. const { safeAreaInsets } = uni.getSystemInfoSync()
  41. </script>
  42. <style>
  43. .main-title-color {
  44. /* color: #2c8d39; */
  45. color: #d14328;
  46. }
  47. </style>