浏览代码

更新依赖

ZaiZai 1 年之前
父节点
当前提交
cf784bbf57
共有 10 个文件被更改,包括 745 次插入130 次删除
  1. 1 0
      .eslintrc.cjs
  2. 1 0
      .gitignore
  3. 3 4
      package.json
  4. 0 7
      postcss.config.js
  5. 1 1
      src/main.js
  6. 0 3
      src/styles/app/tailwind.scss
  7. 0 18
      tailwind.config.js
  8. 21 0
      uno.config.js
  9. 3 1
      vite.config.js
  10. 715 96
      yarn.lock

+ 1 - 0
.eslintrc.cjs

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

+ 1 - 0
.gitignore

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

+ 3 - 4
package.json

@@ -36,18 +36,17 @@
         "vuedraggable": "^4.1.0"
     },
     "devDependencies": {
+        "@unocss/eslint-config": "0.58.9",
         "@vitejs/plugin-vue": "^4.5.2",
         "@vue/compiler-sfc": "^3.4.21",
         "animate.css": "^4.1.1",
         "archiver": "^7.0.1",
         "autoprefixer": "^10.4.19",
-        "cssnano": "^6.1.2",
         "eslint": "^8.57.0",
         "eslint-plugin-vue": "^9.24.0",
-        "mitt": "^3.0.1",
-        "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"
     }
 }

+ 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 'animate.css'
 
 //主要

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

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

+ 0 - 18
tailwind.config.js

@@ -1,18 +0,0 @@
-module.exports = {
-    content: [
-        './index.html',
-        './src/**/*.{vue,js}',
-        '!./dist/**/*',
-    ],
-    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('/')

文件差异内容过多而无法显示
+ 715 - 96
yarn.lock


部分文件因为文件数量过多而无法显示