|
@@ -3,31 +3,37 @@
|
|
|
This template should help get you started developing mobile applications with Vue3 and Typescript and Vant in Vite.
|
|
|
|
|
|
## Project setup
|
|
|
+
|
|
|
```
|
|
|
-pnpm install
|
|
|
+npm install
|
|
|
```
|
|
|
|
|
|
### Compiles and hot-reloads for development
|
|
|
+
|
|
|
```
|
|
|
-pnpm start
|
|
|
+npm start
|
|
|
```
|
|
|
|
|
|
### Compiles and minifies for production
|
|
|
+
|
|
|
```
|
|
|
-pnpm build
|
|
|
+npm build
|
|
|
```
|
|
|
|
|
|
### Lints and fixes files (eslint + prettier)
|
|
|
+
|
|
|
```
|
|
|
-pnpm lint
|
|
|
+npm lint
|
|
|
```
|
|
|
|
|
|
### Generate component(page) templates for development
|
|
|
+
|
|
|
```
|
|
|
-pnpm generate
|
|
|
+npm generate
|
|
|
```
|
|
|
|
|
|
### Customize configuration
|
|
|
+
|
|
|
See [Configuration Reference](https://vitejs.dev/config/).
|
|
|
|
|
|
## Browser adaptation
|
|
@@ -49,9 +55,9 @@ module.exports = {
|
|
|
plugins: {
|
|
|
'postcss-pxtorem': {
|
|
|
rootValue: 37.5,
|
|
|
- propList: ['*'],
|
|
|
- },
|
|
|
- },
|
|
|
+ propList: ['*']
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
```
|
|
|
|
|
@@ -68,9 +74,9 @@ PostCSS config example:
|
|
|
module.exports = {
|
|
|
plugins: {
|
|
|
'postcss-px-to-viewport': {
|
|
|
- viewportWidth: 375,
|
|
|
- },
|
|
|
- },
|
|
|
+ viewportWidth: 375
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
```
|
|
|
|
|
@@ -87,9 +93,9 @@ module.exports = {
|
|
|
rootValue({ file }) {
|
|
|
return file.indexOf('vant') !== -1 ? 37.5 : 75;
|
|
|
},
|
|
|
- propList: ['*'],
|
|
|
- },
|
|
|
- },
|
|
|
+ propList: ['*']
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
```
|
|
|
|