Pārlūkot izejas kodu

chore: 调整系统组件的设置

王家程 10 mēneši atpakaļ
vecāks
revīzija
3f24b8229d

+ 1 - 1
build/vite-plugin-uni-provider.ts

@@ -22,7 +22,7 @@ export interface Options {
 export default function (options: Partial<Options> = {}) {
   let {
     pagesRE = /src[\/\\]pages[\/\\]((?!.+(component(s)?|static).+).)*\.vue$/,
-    name = 'sys',
+    name = 'MSys',
     pluginName = 'uni-provider',
     DEBUG = process.env.DEBUG,
   } = options

+ 3 - 8
src/sys.vue → src/components/MSys/index.vue

@@ -1,10 +1,3 @@
-<!--
- * @Author: wjc
- * @Date: 2024-07-10 10:35:44
- * @LastEditors: wjc
- * @LastEditTime: 2024-07-10 17:56:50
- * @Description: 每个页面都会插入该组件,用于同步全局设置,比如主题
--->
 <template>
   <page-meta>
     <navigation-bar v-bind="originNavBarStyle" />
@@ -16,7 +9,7 @@
   import { onLaunch, onShow } from '@dcloudio/uni-app'
   import { useAppStore } from '@/stores/modules/appStore'
 
-  defineOptions({ name: 'Sys' })
+  defineOptions({ name: 'MSys' })
 
   const appStore = useAppStore()
 
@@ -50,8 +43,10 @@
 
   onLaunch(() => {
     setBarStyle()
+    uni.hideTabBar()
   })
   onShow(() => {
     setBarStyle()
+    uni.hideTabBar()
   })
 </script>

+ 0 - 1
src/pages.json

@@ -2,7 +2,6 @@
 	"easycom": {
 		"autoscan": true,
 		"custom": {
-			"^sys$": "@/sys.vue",
 			"^u--(.*)": "uview-plus/components/u-$1/u-$1.vue",
 			"^up-(.*)": "uview-plus/components/u-$1/u-$1.vue",
 			"^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue",

+ 1 - 0
types/components.d.ts

@@ -13,6 +13,7 @@ declare module 'vue' {
     MIcon: typeof import('./../src/components/MIcon/index.vue')['default']
     MNavBar: typeof import('./../src/components/MNavBar/index.vue')['default']
     MPage: typeof import('./../src/components/MPage/index.vue')['default']
+    MSys: typeof import('./../src/components/MSys/index.vue')['default']
     MTabBar: typeof import('./../src/components/MTabBar/index.vue')['default']
     RouterLink: typeof import('vue-router')['RouterLink']
     RouterView: typeof import('vue-router')['RouterView']