浏览代码

feat: #update

wei.k.li 2 月之前
父节点
当前提交
035bb72232
共有 14 个文件被更改,包括 924 次插入315 次删除
  1. 2 0
      README.md
  2. 0 0
      dist/assets/index-Btspm7_H.css
  3. 0 4
      dist/assets/index-malWbV8K.js
  4. 0 13
      dist/index.html
  5. 2 1
      index.html
  6. 815 224
      package-lock.json
  7. 6 5
      package.json
  8. 6 0
      postcss.config.js
  9. 0 20
      src/App.vue
  10. 78 3
      src/assets/common.css
  11. 1 2
      src/main.js
  12. 1 8
      src/views/HomeView.vue
  13. 10 0
      tailwind.config.js
  14. 3 35
      vite.config.js

+ 2 - 0
README.md

@@ -14,6 +14,8 @@ src
 │   └── index.js    路由导航配置文件
 └── views   页面视图目录
 vite.config.js  构建时配置文件
+postcss.config.js postcss 配置文件
+tailwind.config tailwind 配置文件
 ```
 
 ## Using Guide

文件差异内容过多而无法显示
+ 0 - 0
dist/assets/index-Btspm7_H.css


文件差异内容过多而无法显示
+ 0 - 4
dist/assets/index-malWbV8K.js


+ 0 - 13
dist/index.html

@@ -1,13 +0,0 @@
-<!doctype html>
-<html lang="en">
-  <head>
-    <meta charset="UTF-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>Prototype Design</title>
-    <script type="module" crossorigin src="/prototype/3000/assets/index-malWbV8K.js"></script>
-    <link rel="stylesheet" crossorigin href="/prototype/3000/assets/index-Btspm7_H.css">
-  </head>
-  <body>
-    <div id="app"></div>
-  </body>
-</html>

+ 2 - 1
index.html

@@ -2,8 +2,9 @@
 <html lang="en">
   <head>
     <meta charset="UTF-8" />
+    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>Prototype Design</title>
+    <title>Vite + Vue</title>
   </head>
   <body>
     <div id="app"></div>

文件差异内容过多而无法显示
+ 815 - 224
package-lock.json


+ 6 - 5
package.json

@@ -1,22 +1,23 @@
 {
-  "name": "prototype-design",
-  "version": "0.1.0",
+  "name": "prototype-demo-tailwing",
   "private": true,
+  "version": "0.0.0",
   "type": "module",
   "scripts": {
     "dev": "vite",
     "build": "vite build",
-    "watch": "vite build --watch",
     "preview": "vite preview"
   },
   "dependencies": {
-    "ant-design-vue": "^4.2.6",
+    "lucide-vue-next": "^0.475.0",
     "vue": "^3.5.13",
     "vue-router": "^4.5.0"
   },
   "devDependencies": {
     "@vitejs/plugin-vue": "^5.2.1",
-    "unplugin-vue-components": "^28.4.0",
+    "autoprefixer": "^10.4.20",
+    "postcss": "^8.5.3",
+    "tailwindcss": "^3.4.17",
     "vite": "^6.1.0"
   }
 }

+ 6 - 0
postcss.config.js

@@ -0,0 +1,6 @@
+export default {
+  plugins: {
+    tailwindcss: {},
+    autoprefixer: {},
+  },
+}

+ 0 - 20
src/App.vue

@@ -3,24 +3,4 @@
 </template>
 
 <style>
-#app {
-  font-family: Avenir, Helvetica, Arial, sans-serif;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-  text-align: center;
-  color: #2c3e50;
-}
-
-nav {
-  padding: 30px;
-}
-
-nav a {
-  font-weight: bold;
-  color: #2c3e50;
-}
-
-nav a.router-link-exact-active {
-  color: #42b983;
-}
 </style>

+ 78 - 3
src/assets/common.css

@@ -1,3 +1,78 @@
-body {
-    
-}
+
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
+:root {
+    font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
+    line-height: 1.5;
+    font-weight: 400;
+  
+    color-scheme: light dark;
+    color: rgba(255, 255, 255, 0.87);
+    background-color: #242424;
+  
+    font-synthesis: none;
+    text-rendering: optimizeLegibility;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+  }
+  
+  a {
+    font-weight: 500;
+    color: #646cff;
+    text-decoration: inherit;
+  }
+  a:hover {
+    color: #535bf2;
+  }
+  
+  body {
+    margin: 0;
+    display: flex;
+    place-items: center;
+    min-width: 320px;
+    min-height: 100vh;
+  }
+  
+  h1 {
+    font-size: 3.2em;
+    line-height: 1.1;
+  }
+  
+  button {
+    border-radius: 8px;
+    border: 1px solid transparent;
+    padding: 0.6em 1.2em;
+    font-size: 1em;
+    font-weight: 500;
+    font-family: inherit;
+    background-color: #1a1a1a;
+    cursor: pointer;
+    transition: border-color 0.25s;
+  }
+  button:hover {
+    border-color: #646cff;
+  }
+  button:focus,
+  button:focus-visible {
+    outline: 4px auto -webkit-focus-ring-color;
+  }
+  
+  .card {
+    padding: 2em;
+  }
+  
+  
+  @media (prefers-color-scheme: light) {
+    :root {
+      color: #213547;
+      background-color: #ffffff;
+    }
+    a:hover {
+      color: #747bff;
+    }
+    button {
+      background-color: #f9f9f9;
+    }
+  }
+  

+ 1 - 2
src/main.js

@@ -1,6 +1,5 @@
-import 'ant-design-vue/dist/reset.css';
-import './assets/common.css'
 import { createApp } from 'vue'
+import './assets/common.css'
 import App from './App.vue'
 import router from './router'
 

+ 1 - 8
src/views/HomeView.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="home">
+  <div class="h-screen w-screen flex justify-center items-center">
     <h2>欢迎使用Prototype Design, 请您根据您的需要设计您的Prototype</h2>
   </div>
 </template>
@@ -9,11 +9,4 @@
 export default {}
 </script>
 <style>
-.home {
-  height: 100vh;
-  width: 100vw;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
 </style>

+ 10 - 0
tailwind.config.js

@@ -0,0 +1,10 @@
+/** @type {import('tailwindcss').Config} */
+export default {
+  purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
+  content: [],
+  theme: {
+    extend: {},
+  },
+  plugins: [],
+}
+

+ 3 - 35
vite.config.js

@@ -1,40 +1,8 @@
 import { defineConfig } from 'vite'
-import { resolve } from 'path'
 import vue from '@vitejs/plugin-vue'
-import Components from "unplugin-vue-components/vite";
-import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
-
-const port = process.env.PORT ? parseInt(process.env.PORT) : 3000;
-
+// https://vite.dev/config/
 export default defineConfig({
   plugins: [
-    vue(),
-    Components({
-      resolvers: [AntDesignVueResolver({ importStyle: false })],
-    }),
+    vue()
   ],
-  base: `/ide/proxy/${port}/`,
-  resolve: {
-    alias: {
-      '@': resolve(__dirname, 'src')
-    },
-  },
-  server: {
-    host: '0.0.0.0', // 监听所有网络
-    port, // 确保端口匹配
-    strictPort: true, // 保证端口不会被其他程序占用
-    watch: {
-      usePolling: true
-    },
-    hmr: {
-      clientPort: 443, // 让 HMR 使用 443 端口
-      protocol: 'wss', // 强制 WebSocket 使用 wss
-      host: 'genlitex-test-01.cn',
-    },
-    allowedHosts: [
-      'localhost',
-      '127.0.0.1',
-      'genlitex-test-01.cn'
-    ]
-  }
-});
+})

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