diff --git a/babel.config.js b/babel.config.js index 162a3ea..d640f04 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,9 @@ module.exports = { presets: ["@vue/cli-plugin-babel/preset"], + plugins: [ + [ + "import", + { libraryName: "ant-design-vue", libraryDirectory: "es", style: "css" }, + ], // `style: true` 会加载 less 文件 + ], }; diff --git a/package.json b/package.json index e1b640f..057a849 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubick", - "version": "2.0.1-beta.11", + "version": "2.0.1-beta.12", "private": true, "scripts": { "serve": "vue-cli-service serve", @@ -45,7 +45,9 @@ "@vue/compiler-sfc": "^3.0.0", "@vue/eslint-config-prettier": "^6.0.0", "@vue/eslint-config-typescript": "^7.0.0", + "babel-plugin-import": "^1.13.3", "electron": "^13.0.0", + "electron-builder": "22.13.1", "electron-devtools-installer": "^3.1.0", "eslint": "^6.7.2", "eslint-plugin-prettier": "^3.3.1", @@ -55,8 +57,7 @@ "prettier": "^2.2.1", "typescript": "~4.1.5", "vue-cli-plugin-electron-builder": "~2.1.1", - "worker-plugin": "^5.0.1", - "electron-builder": "22.13.1" + "worker-plugin": "^5.0.1" }, "__npminstall_done": false } diff --git a/public/index.html b/public/index.html index 3e5a139..0877d24 100644 --- a/public/index.html +++ b/public/index.html @@ -1,17 +1,48 @@ - - - - - - <%= htmlWebpackPlugin.options.title %> - - - -
- - + + + + + + <%= htmlWebpackPlugin.options.title %> + + + + + + +
+
+
+
+ + + + +
+ + + + +
+
+
+
+
+
+
+ + diff --git a/public/logo.png b/public/logo.png new file mode 100644 index 0000000..65efaa3 Binary files /dev/null and b/public/logo.png differ diff --git a/src/renderer/main.ts b/src/renderer/main.ts index 8fa876f..3a986b0 100644 --- a/src/renderer/main.ts +++ b/src/renderer/main.ts @@ -1,6 +1,11 @@ import { createApp } from "vue"; -import Antd from "ant-design-vue"; +import { Button, List, Spin, Input, Avatar } from "ant-design-vue"; import App from "./App.vue"; -import "ant-design-vue/dist/antd.css"; -createApp(App).use(Antd).mount("#app"); +createApp(App) + .use(Button) + .use(List) + .use(Spin) + .use(Input) + .use(Avatar) + .mount("#app"); diff --git a/vue.config.js b/vue.config.js index df5ed3c..88cb027 100644 --- a/vue.config.js +++ b/vue.config.js @@ -15,6 +15,7 @@ module.exports = { entry: "src/renderer/main.ts", }, }, + productionSourceMap: false, pluginOptions: { electronBuilder: { nodeIntegration: true,