描述:引入varnt, 配置gitignore, 编写README

This commit is contained in:
SelfRidicule 2024-02-22 11:07:12 +08:00
parent 6f178aedbf
commit 946d891fc6
7 changed files with 69 additions and 4 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
node_modules/
miniprogram/miniprogram_npm

32
README.md Normal file
View File

@ -0,0 +1,32 @@
## 开发
# 框架采用 Vant Weapp https://youzan.github.io/vant-weapp
# 开发环境初始化
```
1. npm install
2. 打开微信开发者工具,点击 工具 -> 构建 npm并勾选 使用 npm 模块 选项,构建完成后,即可引入组件。
```
# 引入组件-全局引入
```
// app.json 文件里配置 usingComponents 选项
"usingComponents": {
"van-button": "@vant/weapp/button/index"
}
```
# 引入组件-局部引入
```
// 在页面的 json 文件里配置 usingComponents 选项
"usingComponents": {
"van-button": "@vant/weapp/button/index"
}
```
# 使用组件
```
// 引入组件后,可以在 wxml 中直接使用组件
<van-button type="primary">按钮</van-button>
```

View File

@ -86,7 +86,6 @@
}
]
},
"style": "v2",
"sitemapLocation": "sitemap.json",
"permission": {
"scope.userLocation": {

View File

@ -1,3 +1,6 @@
{
"navigationBarTitleText": "登录"
"navigationBarTitleText": "登录",
"usingComponents": {
}
}

17
package-lock.json generated Normal file
View File

@ -0,0 +1,17 @@
{
"name": "dbd-meeting-wx-small",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"@vant/weapp": "^1.11.4"
}
},
"node_modules/@vant/weapp": {
"version": "1.11.4",
"resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.11.4.tgz",
"integrity": "sha512-egOsWO4hVMP1SQSqQ46jy8UD3WysvlnUecRzPM21Y3ovkOFZ6wlaO7oHQmTXRpwr+V41Qri1qEbtNjhVxFqdyw=="
}
}
}

5
package.json Normal file
View File

@ -0,0 +1,5 @@
{
"dependencies": {
"@vant/weapp": "^1.11.4"
}
}

View File

@ -36,8 +36,13 @@
"enableEngineNative": false,
"useIsolateContext": true,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"packNpmManually": true,
"packNpmRelationList": [
{
"packageJsonPath": "./package.json",
"miniprogramNpmDistDir": "./miniprogram/"
}
],
"minifyWXSS": true,
"disableUseStrict": false,
"minifyWXML": true,