فهرست منبع

remove windicss

Michael Wang 3 سال پیش
والد
کامیت
f838dd6f09
10فایلهای تغییر یافته به همراه451 افزوده شده و 227 حذف شده
  1. 0 2
      components.d.ts
  2. 1 1
      index.html
  3. 2 3
      package.json
  4. 1 0
      postcss.config.js
  5. 0 1
      src/main.ts
  6. 1 0
      src/styles/global.css
  7. 3 0
      src/styles/tailwind.css
  8. 12 0
      tailwind.config.js
  9. 0 2
      vite.config.ts
  10. 431 218
      yarn.lock

+ 0 - 2
components.d.ts

@@ -6,10 +6,8 @@ declare module 'vue' {
   export interface GlobalComponents {
     404: typeof import('./src/components/404.vue')['default']
     AButton: typeof import('ant-design-vue/es')['Button']
-    AForm: typeof import('ant-design-vue/es')['Form']
     AFormItem: typeof import('ant-design-vue/es')['FormItem']
     AInput: typeof import('ant-design-vue/es')['Input']
-    AInputNumber: typeof import('ant-design-vue/es')['InputNumber']
     AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
     AMenu: typeof import('ant-design-vue/es')['Menu']
     AMenuItem: typeof import('ant-design-vue/es')['MenuItem']

+ 1 - 1
index.html

@@ -4,7 +4,7 @@
     <meta charset="UTF-8" />
     <link rel="icon" href="/favicon.ico" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>Vite App</title>
+    <title>成绩分析</title>
   </head>
   <body>
     <div id="app"></div>

+ 2 - 3
package.json

@@ -24,10 +24,10 @@
     "mitt": "^3.0.0",
     "moment": "^2.29.1",
     "pinia": "^2.0.0-rc.9",
+    "tailwindcss": "^2.2.10",
     "ua-parser-js": "^0.7.28",
     "vue": "^3.2.14",
-    "vue-router": "4.0.10",
-    "windicss": "^3.1.8"
+    "vue-router": "4.0.10"
   },
   "devDependencies": {
     "@types/crypto-js": "^4.0.2",
@@ -44,7 +44,6 @@
     "unplugin-auto-import": "^0.4.8",
     "unplugin-vue-components": "^0.15.2",
     "vite": "^2.5.10",
-    "vite-plugin-windicss": "^1.4.8",
     "vue-tsc": "^0.3.0"
   }
 }

+ 1 - 0
postcss.config.js

@@ -1,5 +1,6 @@
 module.exports = {
   plugins: {
+    tailwindcss: {},
     autoprefixer: {},
   },
 };

+ 0 - 1
src/main.ts

@@ -8,7 +8,6 @@ if (!validUA) {
 // vite-plugin-components 不能引入message的style
 import "ant-design-vue/es/message/style/css.js";
 
-import "virtual:windi.css";
 import "./styles/global.css";
 import { createApp } from "vue";
 import App from "./App.vue";

+ 1 - 0
src/styles/global.css

@@ -1,3 +1,4 @@
+@import "./tailwind.css";
 @import "./nprogress.css";
 
 :root {

+ 3 - 0
src/styles/tailwind.css

@@ -0,0 +1,3 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;

+ 12 - 0
tailwind.config.js

@@ -0,0 +1,12 @@
+module.exports = {
+  purge: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"],
+  prefix: "tw-",
+  darkMode: false, // or 'media' or 'class'
+  theme: {
+    extend: {},
+  },
+  variants: {
+    extend: {},
+  },
+  plugins: [],
+};

+ 0 - 2
vite.config.ts

@@ -3,7 +3,6 @@ import vue from "@vitejs/plugin-vue";
 import ViteComponents from "unplugin-vue-components/vite";
 import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
 import AutoImport from "unplugin-auto-import/vite";
-import WindiCSS from "vite-plugin-windicss";
 
 const SERVER_URL = "http://192.168.10.39:8081";
 const path = require("path");
@@ -29,7 +28,6 @@ export default defineConfig({
         "vue-router",
       ],
     }),
-    WindiCSS(),
   ],
   server: {
     port: 9000,

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 431 - 218
yarn.lock


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است