├─pages            业务页面文件存放的目录
│  └─index
│     └─index. vue  index页面
├─static            存放应用引用的本地静态资源的目录 ( 注意:静态资源只能存放于此) 
├─unpackage        非工程代码,一般存放运行或发行的编译结果
├─index. html       H5 端页面
├─main. js          Vue初始化入口文件
├─App. vue          配置App全局样式、监听应用生命周期
├─pages. json       ** 配置页面路由、导航栏、tabBar等页面类信息** 
├─manifest. json    ** 配置appid** 、应用名称、logo、版本等打包信息
└─uni. scss         uni- app内置的常用样式变量
npx degit dcloudio/ uni- preset- vue#vite- ts 项目名称
pnpm install
pnpm dev: mp- weixin
微信开发者工具 左上角-- 项目-- 导入项目-- 项目文件夹-- D : \UniAppWorkSpace\eribbit- client- uniapp\dist\dev\mp- weixin
. vscode
extensions. json
{ 
  
  "recommendations" :  [ 
    "mrmaoddxxaa.create-uniapp-view" ,  
    "uni-helper.uni-helper-vscode" ,  
    "evils.uniapp-vscode" ,  
    "vue.volar" ,  
    "vue.vscode-typescript-vue-plugin" ,  
    "editorconfig.editorconfig" ,  
    "dbaeumer.vscode-eslint" ,  
    "esbenp.prettier-vscode"  
  ] 
} 
pnpm i - D  @types/ wechat- miniprogram @uni- helper/ uni- app- types
pnpm i - D  @uni- helper/ uni- ui- types
{ 
  "extends" :  "@vue/tsconfig/tsconfig.json" , 
  "compilerOptions" :  { 
    "sourceMap" :  true , 
    "baseUrl" :  "." , 
    "paths" :  { 
      "@/*" :  [ "./src/*" ] 
    } , 
    "lib" :  [ "esnext" ,  "dom" ] , 
    "types" :  [ 
      "@dcloudio/types" , 
+       "@types/wechat-miniprogram" , 
+       "@uni-helper/uni-app-types" 
+       "@uni-helper/uni-ui-types"  
    ] 
  } , 
  "include" :  [ "src/**/*.ts" ,  "src/**/*.d.ts" ,  "src/**/*.tsx" ,  "src/**/*.vue" ] 
} 
npm i sass - D 
npm i sass- loader@10.1 .1  - D 
pnpm i @dcloudio/ uni- ui
{ 
  
  "easycom" :  { 
    "autoscan" :  true , 
    "custom" :  { 
      
      "^uni-(.*)" :  "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"  
    } 
  } , 
  "pages" :  [ 
    
  ] 
} 
import  {  fileURLToPath,  URL  }  from  'node:url' 
import  {  defineConfig }  from  'vite' 
import  uni from  '@dcloudio/vite-plugin-uni' 
export  default  defineConfig ( { 
	plugins :  [ uni ( ) ] , 
	resolve :  { 
		extensions :  [ '.ts' ,  '.js' ,  '.json' ,  '.vue' ,  '.less' ,  '.scss' ,  '.css' ] ,  
		alias :  { 
			'@' :  fileURLToPath ( new  URL ( './src' ,  import . meta. url) ) , 
		} , 
	} , 
} ) 
# Editor configuration,  see http: / / editorconfig. org
# 表示是最顶层的 EditorConfig 配置文件
root =  true 
[ * ]  # 表示所有文件适用
charset =  utf- 8  # 设置文件字符集为 utf- 8 
indent_style =  space # 缩进风格(tab |  space)
indent_size =  2  # 缩进大小
end_of_line =  lf # 控制换行类型 ( lf |  cr |  crlf) ,  lf 适配 mac, linix ;  cr 适配window; 
trim_trailing_whitespace =  true  # 去除行首的任意空白字符
insert_final_newline =  true  # 始终在文件末尾插入一个新行
[ * . md]  # 表示仅 md 文件适用以下规则
max_line_length =  off
trim_trailing_whitespace =  false 
require ( "@rushstack/eslint-patch/modern-module-resolution" ) ; 
module. exports =  { 
  root :  true , 
  extends :  [ 
    "plugin:vue/vue3-essential" , 
    "eslint:recommended" , 
    "@vue/eslint-config-typescript" , 
    "@vue/eslint-config-prettier" , 
  ] , 
  
  globals :  { 
    uni :  true , 
    wx :  true , 
    WechatMiniprogram :  true , 
    getCurrentPages :  true , 
    UniHelper :  true , 
  } , 
  parserOptions :  { 
    ecmaVersion :  "latest" , 
  } , 
  rules :  { 
    "prettier/prettier" :  [ 
      "warn" , 
      { 
        singleQuote :  true , 
        semi :  false , 
        printWidth :  80 , 
        trailingComma :  "all" , 
        endOfLine :  "auto" , 
      } , 
    ] , 
    "vue/multi-word-component-names" :  [ "off" ] , 
    "vue/no-setup-props-destructure" :  [ "off" ] , 
    "vue/no-deprecated-html-element-is" :  [ "off" ] , 
    "@typescript-eslint/no-unused-vars" :  [ "off" ] , 
  } , 
} ; 
{ 
	"$schema" :  "https://json.schemastore.org/prettierrc" , 
	"printWidth" :  80 , 
	"tabWidth" :  2 , 
	"useTabs" :  true , 
	"semi" :  false , 
	"singleQuote" :  true , 
	"trailingComma" :  "es5" , 
	"bracketSpacing" :  true , 
	"jsxBracketSameLine" :  true , 
	"arrowParens" :  "avoid" , 
	"endOfLine" :  "auto" 
} 
"files.associations" :  {  "*.json" :  "jsonc"  }