浏览代码

feat: 优化页面展示效果

菲鸽 2 年之前
父节点
当前提交
2fc5477655
共有 2 个文件被更改,包括 3 次插入24 次删除
  1. 1 1
      src/layouts/default.vue
  2. 2 23
      src/pages/index/index.vue

+ 1 - 1
src/layouts/default.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="default-layout">
     <slot />
-    <view class="text-gray-400 m-auto mt-8">[default layout]</view>
+    <view class="text-gray-400 m-auto mt-20">[default layout]</view>
   </view>
 </template>
 

+ 2 - 23
src/pages/index/index.vue

@@ -12,7 +12,7 @@
     class="bg-white h-full overflow-hidden pt-2 px-4"
     :style="{ marginTop: safeAreaInsets?.top + 'px' }"
   >
-    <view class="mt-20">
+    <view class="mt-12">
       <image src="/static/logo.svg" alt="" class="w-40 h-40 block mx-auto" />
     </view>
     <view class="text-center text-4xl main-title-color mt-8">unibest</view>
@@ -22,35 +22,14 @@
       开发,具有代码提示、自动格式化、统一配置、代码片段等功能,同时内置了大量平时开发常用的基本组件,开箱即用,让你编写
       uniapp 拥有 best 体验。</view
     >
-    <view class="text-blue mt-8 text-center"> 详细示例 参考 hello-unibest </view>
+    <view class="text-blue mt-8 text-center"> 详细示例 参考 hello-unibest 项目 </view>
     <view class="my-2 text-center">https://github.com/codercup/hello-unibest</view>
-    <!-- #ifndef MP-WEIXIN -->
-    <!-- 微信使用复制按钮需要申请权限,先去掉 -->
-    <button @click="onCopy" class="max-w-100 m-auto">复制 hello-unibest github地址</button>
-    <!-- #endif -->
   </view>
 </template>
 
 <script lang="ts" setup>
 // 获取屏幕边界到安全区域距离
 const { safeAreaInsets } = uni.getSystemInfoSync()
-
-const author = ref('菲鸽')
-console.log(author)
-
-// #ifndef MP-WEIXIN
-const onCopy = () => {
-  uni.setClipboardData({
-    data: 'https://github.com/codercup/hello-unibest',
-    fail: (fail) => {
-      console.error('fail', fail)
-    },
-    success: (success) => {
-      console.log('success', success)
-    },
-  })
-}
-// #endif
 </script>
 
 <style>