From 6a82e9bcb1c531bc832a9ca353f555c5fff3e106 Mon Sep 17 00:00:00 2001 From: zilong Date: Thu, 3 Feb 2022 13:56:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0tailwind=EF=BC=8C.env?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=EF=BC=8C=E4=BC=98=E5=8C=96=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 3 + .env.development | 3 + package.json | 8 +- postcss.config.js | 6 + src/App.vue | 7 + src/main.js | 1 + src/network/request.js | 4 +- src/tailwind.css | 3 + src/views/common/Search.vue | 2 +- src/views/common/SongCtrl.vue | 16 +- src/views/common/SongDetail.vue | 2 +- src/views/common/SongInfo.vue | 4 + src/views/discover/Recommend.vue | 2 + src/views/videos/V.vue | 10 +- tailwind.config.js | 17 ++ yarn.lock | 413 +++++++++++++++++++++++++++---- 16 files changed, 436 insertions(+), 65 deletions(-) create mode 100644 .env create mode 100644 .env.development create mode 100644 postcss.config.js create mode 100644 src/tailwind.css create mode 100644 tailwind.config.js diff --git a/.env b/.env new file mode 100644 index 0000000..fc35bad --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +# 网易云音乐API地址 +VITE_NETEASECLOUD_API = http://localhost:3300 + \ No newline at end of file diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..646aab0 --- /dev/null +++ b/.env.development @@ -0,0 +1,3 @@ +# 网易云音乐API地址 +VITE_NETEASECLOUD_API = http://localhost:3300 + diff --git a/package.json b/package.json index 8031ca6..9e7266b 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,12 @@ "author": "zlyum", "main": "electron/electron.js", "scripts": { - "dev": "yarn svr & vite --port 3301", + "dev": "vite --port 3301", "build": "vite build", "serve": "vite preview", "vite-tauri": "vite-tauri", "svr": "node ../NMApi/app.js", + "svr:dev": "yarn svr & yarn dev", "electron": "wait-on tcp:3301 && cross-env IS_DEV=true electron .", "electron:pack": "electron-builder --dir", "electron:dev": "concurrently -k \"cross-env BROWSER=none yarn dev\" \"yarn electron\"", @@ -45,6 +46,7 @@ "@vue/cli-service": "~4.5.0", "@vue/compiler-sfc": "^3.0.0", "@vue/eslint-config-prettier": "^6.0.0", + "autoprefixer": "^10.4.2", "babel-eslint": "^10.1.0", "concurrently": "^6.3.0", "cross-env": "^7.0.3", @@ -56,9 +58,11 @@ "eslint-plugin-vue": "^7.0.0", "less": "^3.0.4", "less-loader": "^5.0.0", - "naive-ui": "^2.19.3", + "naive-ui": "^2.24.5", + "postcss": "^8.4.5", "prettier": "^2.2.1", "svg-sprite-loader": "^6.0.11", + "tailwindcss": "^3.0.16", "vite": "^2.6.4", "vite-plugin-tauri": "^0.1.3", "vite-svg-loader": "^2.2.0", diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..33ad091 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/src/App.vue b/src/App.vue index 209c7e0..fc63912 100644 --- a/src/App.vue +++ b/src/App.vue @@ -246,6 +246,13 @@ body { max-width: 800px; } } + +// button, [type='button'], [type='reset'], [type='submit']{ +// background-color: inherit; +// } +button.n-button{ + background-color: var(--n-color); +}