Ver código fonte

更新依赖

ZaiZai 11 meses atrás
pai
commit
d484837f71
10 arquivos alterados com 746 adições e 129 exclusões
  1. 2 1
      .eslintrc.cjs
  2. 1 0
      .gitignore
  3. 3 3
      package.json
  4. 0 7
      postcss.config.js
  5. 1 1
      src/main.js
  6. 0 3
      src/styles/app/tailwind.scss
  7. 0 17
      tailwind.config.js
  8. 21 0
      uno.config.js
  9. 3 1
      vite.config.js
  10. 715 96
      yarn.lock

+ 2 - 1
.eslintrc.cjs

@@ -9,7 +9,8 @@ module.exports = {
     parser: "vue-eslint-parser",
     extends: [
         "plugin:vue/vue3-recommended",
-        'eslint:recommended'
+        'eslint:recommended',
+        '@unocss'
     ],
     parserOptions: {
         ecmaVersion: "latest",

+ 1 - 0
.gitignore

@@ -3,6 +3,7 @@ node_modules
 .idea
 .vscode
 .DS_Store
+.fleet
 
 dist
 zip

+ 3 - 3
package.json

@@ -31,16 +31,16 @@
         "vuedraggable": "^4.1.0"
     },
     "devDependencies": {
+        "@unocss/eslint-config": "0.58.9",
         "@vitejs/plugin-vue": "^4.5.2",
         "@vue/compiler-sfc": "^3.4.21",
         "archiver": "^7.0.1",
         "autoprefixer": "^10.4.19",
-        "cssnano": "^6.1.2",
         "eslint": "^8.57.0",
         "eslint-plugin-vue": "^9.24.0",
-        "postcss": "^8.4.38",
         "sass": "^1.72.0",
-        "tailwindcss": "3.4.1",
+        "unocss": "0.58.9",
+        "unocss-preset-extra": "0.5.3",
         "vite": "^4.5.0",
         "z-element-plus": "^1.1.4"
     }

+ 0 - 7
postcss.config.js

@@ -1,7 +0,0 @@
-module.exports = {
-    plugins: {
-        tailwindcss: {},
-        autoprefixer: {},
-        ...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {}),
-    },
-}

+ 1 - 1
src/main.js

@@ -1,4 +1,4 @@
-import './styles/app/tailwind.scss'
+import 'virtual:uno.css'
 //主要
 import { createApp } from 'vue'
 import setupPinia from './store/init'

+ 0 - 3
src/styles/app/tailwind.scss

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

+ 0 - 17
tailwind.config.js

@@ -1,17 +0,0 @@
-module.exports = {
-    content: [
-        './index.html',
-        './src/**/*.{vue,js}',
-    ],
-    theme: {
-        extend: {
-            width: {
-                414: '26rem',
-                606: '38rem',
-                750: '47rem',
-                990: '62rem',
-            },
-        },
-    },
-    plugins: [],
-}

+ 21 - 0
uno.config.js

@@ -0,0 +1,21 @@
+import { defineConfig, presetAttributify, presetIcons, presetUno } from 'unocss'
+import { presetExtra } from 'unocss-preset-extra'
+
+export default defineConfig({
+    shortcuts: {
+        'hc-flex': 'relative flex items-center',
+        'hc-flex-inline': 'relative inline-flex items-center',
+        'hc-flex-center': 'hc-flex justify-center',
+        'hc-flex-inline-center': 'hc-flex-inline justify-center',
+    },
+    presets: [
+        presetUno(),
+        presetIcons(),
+        presetAttributify({
+            prefix: 'hc-', //属性冲突的自定义前缀
+            prefixedOnly: true, //强制使用前缀
+        }),
+        //其它扩展,主要用动画,集成了 animate.css
+        presetExtra(),
+    ],
+})

+ 3 - 1
vite.config.js

@@ -1,5 +1,6 @@
 import { defineConfig } from 'vite'
 import vue from '@vitejs/plugin-vue'
+import UnoCSS from 'unocss/vite'
 import { resolve } from 'path'
 import config from './src/config'
 
@@ -25,12 +26,13 @@ export default defineConfig({
     },
     plugins: [
         vue(),
+        UnoCSS(),
     ],
     build: {
         rollupOptions: {
             output: {
                 manualChunks(id) {
-                    let libStr = '@vue,tailwindcss,element-plus,z-element-plus,echarts,vue-router,pinia,js-web-screen-shot,js-fast-way'
+                    let libStr = '@vue,hc-vue3-ui,element-plus,z-element-plus,echarts,vue-router,pinia,js-web-screen-shot,js-fast-way'
                     const libs = libStr.split(',')
                     if (id.includes('node_modules')) {
                         const arr = id.toString().split('node_modules/')[1].split('/')

Diferenças do arquivo suprimidas por serem muito extensas
+ 715 - 96
yarn.lock


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff