Pārlūkot izejas kodu

build: tailwindcss回滚版本3.修复html2canvas各种报错问题.

peter 1 nedēļu atpakaļ
vecāks
revīzija
72d27883a4

+ 0 - 1
index.html

@@ -7,7 +7,6 @@
     <meta name="keywords" content="zoho crm extend">
     <script src="/crm.sdk.js"></script>
    <title>crm_extend</title>
-   <link href="/src/assets/tailwind.css" rel="stylesheet">
   </head>
   <body>
     <div id="app"></div>

+ 4 - 4
package.json

@@ -11,7 +11,6 @@
   },
   "dependencies": {
     "@element-plus/icons-vue": "^2.1.0",
-    "@tailwindcss/vite": "^4.0.17",
     "axios": "~0.27.2",
     "dayjs": "^1.11.13",
     "element-plus": "2.9.7",
@@ -30,7 +29,6 @@
   },
   "devDependencies": {
     "@nabla/vite-plugin-eslint": "^2.0.5",
-    "@tailwindcss/vite": "^4.1.3",
     "@types/js-cookie": "^3.0.6",
     "@types/lodash.clonedeep": "^4.5.9",
     "@types/lodash.debounce": "^4.0.9",
@@ -39,14 +37,16 @@
     "@typescript-eslint/parser": "^7.18.0",
     "@vitejs/plugin-vue": "^5.2.3",
     "@vue/eslint-config-prettier": "^9.0.0",
+    "autoprefixer": "^10.4.20",
     "eslint": "^8.57.1",
     "eslint-config-prettier": "^9.1.0",
     "eslint-plugin-vue": "^9.32.0",
+    "postcss": "^8.5.3",
     "prettier": "^3.5.3",
     "sass": "^1.85.1",
-    "tailwindcss": "^4.1.3",
+    "tailwindcss": "^3.4.17",
     "typescript": "^5.8.3",
-    "vite": "^6.2.5",
+    "vite": "^6.2.6",
     "vue-tsc": "^2.2.8"
   }
 }

+ 9 - 0
postcss.config.cjs

@@ -0,0 +1,9 @@
+// https://github.com/michael-ciniawsky/postcss-load-config
+
+module.exports = {
+  'plugins': {
+    tailwindcss: {},
+    // to edit target browsers: use "browserslist" field in package.json
+    'autoprefixer': {}
+  }
+}

+ 1 - 0
src/App.vue

@@ -19,6 +19,7 @@ const locale = ref(zhCn)
 </script>
 
 <style lang="scss">
+@use '@/assets/css/tailwind.scss';
 body {
   position: relative;
   margin: 0;

+ 3 - 0
src/assets/css/tailwind.scss

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

+ 0 - 4
src/assets/tailwind.css

@@ -1,4 +0,0 @@
-/* @import "tailwindcss"; */
-@layer theme, base, components, utilities;
-@import 'tailwindcss/theme.css' layer(theme);
-@import 'tailwindcss/utilities.css' layer(utilities);

+ 1 - 1
src/pages/indent-manage/indent/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="page-indent-list py-4 px-2 shadow-sm max-w-[1800px] mx-auto">
+  <div class="page-indent-list py-4 px-2 shadow max-w-[1800px] mx-auto">
     <el-form
       ref="searchForm"
       v-loading="loading"

+ 1 - 1
src/pages/indent-manage/login.vue

@@ -4,7 +4,7 @@
     class="flex items-center justify-center"
   >
     <div
-      class="w-[400px] px-4 py-6 border border-solid border-gray-200 rounded-sm shadow-sm"
+      class="w-[400px] px-4 py-6 border border-solid border-gray-200 rounded shadow"
     >
       <div class="text-center text-gray-800 text-xl font-bold mt-2 mb-8">
         Indent APP Login

+ 1 - 1
src/pages/indent-manage/product/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="page-indent-list py-4 px-2 shadow-sm max-w-[1800px] mx-auto">
+  <div class="page-indent-list py-4 px-2 shadow max-w-[1800px] mx-auto">
     <el-form
       ref="searchForm"
       :inline="true"

+ 1 - 1
src/pages/indent-manage/supplier/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="page-indent-list py-4 px-2 shadow-sm max-w-[1800px] mx-auto">
+  <div class="page-indent-list py-4 px-2 shadow max-w-[1800px] mx-auto">
     <el-form
       ref="searchForm"
       :inline="true"

+ 3 - 0
tailwind.config.cjs

@@ -3,4 +3,7 @@ module.exports = {
   content: ['./index.html', './src/**/*.{vue,js}'],
   theme: {},
   plugins: [],
+  corePlugins: {
+    preflight: false,
+  },
 }

+ 0 - 2
vite.config.ts

@@ -1,7 +1,6 @@
 import { defineConfig } from 'vite'
 import vue from '@vitejs/plugin-vue'
 import eslintPlugin from '@nabla/vite-plugin-eslint'
-import tailwindcss from '@tailwindcss/vite'
 
 // https://vitejs.dev/config/
 export default defineConfig(({ mode }) => {
@@ -40,7 +39,6 @@ export default defineConfig(({ mode }) => {
     },
     plugins: [
       vue({ template: { compilerOptions: { hoistStatic: false } } }),
-      tailwindcss(),
       eslintPlugin(),
     ],
     build: {