浏览代码

update project

lex 2 年之前
父节点
当前提交
1e35bd0602
共有 5 个文件被更改,包括 3 次插入84 次删除
  1. 0 9
      .postcssrc.js
  2. 1 72
      README.md
  3. 1 1
      src/router/index.ts
  4. 1 1
      src/views/login/index.tsx
  5. 0 1
      vite.config.ts

+ 0 - 9
.postcssrc.js

@@ -1,9 +0,0 @@
-module.exports = {
-  plugins: {
-    autoprefixer: {},
-    'postcss-pxtorem': {
-      rootValue: 37.5,
-      propList: ['*'],
-    },
-  }
-}

+ 1 - 72
README.md

@@ -1,4 +1,4 @@
-# vue-vite-h5
+# classroom-instruments
 
 This template should help get you started developing mobile applications with Vue3 and Typescript and Vant in Vite.
 
@@ -32,21 +32,6 @@ npm lint
 npm generate
 ```
 
-### postMessage API 方法
-
-```
-goBack
-back
-getNavHeight
-getToken
-chooseFile
-login
-joinChatGroup
-openWebView
-callPhone
-shareTripartite
-savePicture
-```
 
 ### Customize configuration
 
@@ -54,66 +39,10 @@ See [Configuration Reference](https://vitejs.dev/config/).
 
 ## Browser adaptation
 
-### Rem Unit (default)
-
-Vant uses `px` unit by default,You can use tools such as `postcss-pxtorem` to transform `px` unit to `rem` unit.
-
-- [postcss-pxtorem](https://github.com/cuth/postcss-pxtorem)
-- [lib-flexible](https://github.com/amfe/lib-flexible)
-
-#### PostCSS Config
-
-PostCSS config example:
-
-```js
-// .postcssrc.js
-module.exports = {
-  plugins: {
-    'postcss-pxtorem': {
-      rootValue: 37.5,
-      propList: ['*']
-    }
-  }
-};
-```
-
 ### Viewport Units
 
 you can use tools such as [postcss--px-to-viewport](https://github.com/evrone/postcss-px-to-viewport) to transform `px` unit to viewport units (vw, vh, vmin, vmax).
 
-#### PostCSS Config
-
-PostCSS config example:
-
-```js
-// .postcssrc.js
-module.exports = {
-  plugins: {
-    'postcss-px-to-viewport': {
-      viewportWidth: 375
-    }
-  }
-};
-```
-
-### Custom rootValue
-
-If the size of the design draft is 750 or other sizes, you can adjust the `rootValue` to:
-
-```js
-// .postcssrc.js
-module.exports = {
-  plugins: {
-    // postcss-pxtorem version >= 5.0.0
-    'postcss-pxtorem': {
-      rootValue({ file }) {
-        return file.indexOf('vant') !== -1 ? 37.5 : 75;
-      },
-      propList: ['*']
-    }
-  }
-};
-```
 
 ## Recommended IDE Setup
 

+ 1 - 1
src/router/index.ts

@@ -8,7 +8,7 @@ import {
 export const LoginRoute: RouteRecordRaw = {
   path: '/login',
   name: 'Login',
-  component: () => import('@/views/login/index.vue'),
+  component: () => import('@/views/login/index'),
   meta: {
     title: '登录'
   }

+ 1 - 1
src/views/login/index.tsx

@@ -4,7 +4,7 @@ import { NButton } from 'naive-ui';
 export default defineComponent({
   name: 'login-page',
   setup() {
-    return (
+    return () => (
       <>
         <NButton>测试</NButton>
       </>

+ 0 - 1
vite.config.ts

@@ -4,7 +4,6 @@ import vueJsx from '@vitejs/plugin-vue-jsx';
 import Components from 'unplugin-vue-components/vite';
 import { VantResolver } from 'unplugin-vue-components/resolvers';
 import viteESLint from 'vite-plugin-eslint';
-// import mkcert from 'vite-plugin-mkcert';
 // eslint-disable-next-line @typescript-eslint/no-var-requires
 const path = require('path');