Funny 3 سال پیش
والد
کامیت
419d722ee2
8فایلهای تغییر یافته به همراه267 افزوده شده و 275 حذف شده
  1. 244 260
      package-lock.json
  2. 3 2
      package.json
  3. 8 4
      src/background.js
  4. 6 6
      src/common/sider.vue
  5. 1 1
      src/views/login.vue
  6. BIN
      static/image/desk-logo.ico
  7. BIN
      static/image/desk-logo@2X.ico
  8. 5 2
      vue.config.js

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 244 - 260
package-lock.json


+ 3 - 2
package.json

@@ -1,5 +1,5 @@
 {
-  "name": "electron-vue-demo",
+  "name": "liebao-web",
   "version": "0.1.0",
   "private": true,
   "scripts": {
@@ -55,7 +55,8 @@
       "parser": "babel-eslint"
     },
     "rules": {
-      "no-unused-vars": "off"
+      "no-unused-vars": "off",
+      "no-unused-components": "off"
     }
   },
   "browserslist": [

+ 8 - 4
src/background.js

@@ -1,6 +1,6 @@
 'use strict'
 
-import { app, protocol, BrowserWindow } from 'electron'
+import { app, protocol, BrowserWindow, Menu } from 'electron'
 import { createProtocol } from 'vue-cli-plugin-electron-builder/lib'
 import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
 const isDevelopment = process.env.NODE_ENV !== 'production'
@@ -11,12 +11,16 @@ protocol.registerSchemesAsPrivileged([
 ])
 
 async function createWindow() {
+  // 隐藏菜单栏
+  Menu.setApplicationMenu(null)
   // Create the browser window.
   const win = new BrowserWindow({
-    width: 800,
-    height: 600,
+    width: 1200,
+    height: 800,
+    title: '猎豹AI',
+    icon: '../static/image/desk-logo.ico',
     webPreferences: {
-      
+
       // Use pluginOptions.nodeIntegration, leave this alone
       // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
       nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION,

+ 6 - 6
src/common/sider.vue

@@ -2,7 +2,7 @@
   <el-aside style="width: 254px;">
     <div class="sidebar">
       <div class="side-logo">
-        <img @click="$router.push({path:'/'})" src="static/image/logo.png" class="logo" />
+        <img @click="$router.push({path:'/'})" src="../../static/image/logo.png" class="logo" />
       </div>
       <el-menu class="sidebar-el-menu" :default-active="$route.path" :collapse="collapse" background-color="#00152A" text-color="#bfcbd9" active-text-color="#20a0ff" router>
         <template v-for="item in items">
@@ -49,7 +49,7 @@ export default {
           path: "/",
           name: "home",
           title: "一键发单",
-          icon: "/static/image/order-icon.png",
+          icon: require("../../static/image/order-icon.png"),
           children: [
             {
               path: "/",
@@ -72,7 +72,7 @@ export default {
           path: "/shopInfo",
           name: "shopInfo",
           title: "商户信息",
-          icon: "/static/image/shop-icon.png",
+          icon: require("../../static/image/shop-icon.png"),
           children: [
             {
               path: "/shopInfo/shopInfos",
@@ -90,7 +90,7 @@ export default {
           path: "/setUp",
           name: "setUp",
           title: "设置",
-          icon: "/static/image/setting-icon.png",
+          icon: require("../../static/image/setting-icon.png"),
           children: [
             {
               path: "/setUp/set",
@@ -113,13 +113,13 @@ export default {
           path: "/help",
           name: "help",
           title: "帮助中心",
-          icon: "/static/image/help-icon.png",
+          icon: require("../../static/image/help-icon.png"),
         },
         {
           path: "/about",
           name: "about",
           title: "关于我们",
-          icon: "/static/image/about-icon.png",
+          icon: require("../../static/image/about-icon.png"),
         },
       ],
     };

+ 1 - 1
src/views/login.vue

@@ -255,7 +255,7 @@ export default {
     width: 100%;
     background-size: cover;
     background-attachment: fixed;
-    background: url("/static/image/login-bg.png") no-repeat #010836;
+    background: url("../../static/image/login-bg.png") no-repeat #010836;
   }
 
   .login-logo {

BIN
static/image/desk-logo.ico


BIN
static/image/desk-logo@2X.ico


+ 5 - 2
vue.config.js

@@ -1,11 +1,14 @@
 const { resolve } = require('path')
 const path = require('path')
 module.exports = {
+  publicPath: "/",
+  outputDir: "dist",
+  lintOnSave: false, // 关闭eslint
   runtimeCompiler: true,
   chainWebpack: config => {
     config.resolve.alias
       .set('@', resolve('src'))
-      .set('static',resolve('static'))
+      .set('#', resolve('static'))
   },
   pluginOptions: {
     'style-resources-loader': {
@@ -13,6 +16,6 @@ module.exports = {
       patterns: [
         path.resolve(__dirname, './src/assets/styles/*.scss')      //你的.scss文件所在目录
       ]
-    }
+    },
   }
 }