Funny 3 роки тому
батько
коміт
419d722ee2

Різницю між файлами не показано, бо вона завелика
+ 244 - 260
package-lock.json


+ 3 - 2
package.json

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

+ 8 - 4
src/background.js

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

+ 6 - 6
src/common/sider.vue

@@ -2,7 +2,7 @@
   <el-aside style="width: 254px;">
   <el-aside style="width: 254px;">
     <div class="sidebar">
     <div class="sidebar">
       <div class="side-logo">
       <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>
       </div>
       <el-menu class="sidebar-el-menu" :default-active="$route.path" :collapse="collapse" background-color="#00152A" text-color="#bfcbd9" active-text-color="#20a0ff" router>
       <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">
         <template v-for="item in items">
@@ -49,7 +49,7 @@ export default {
           path: "/",
           path: "/",
           name: "home",
           name: "home",
           title: "一键发单",
           title: "一键发单",
-          icon: "/static/image/order-icon.png",
+          icon: require("../../static/image/order-icon.png"),
           children: [
           children: [
             {
             {
               path: "/",
               path: "/",
@@ -72,7 +72,7 @@ export default {
           path: "/shopInfo",
           path: "/shopInfo",
           name: "shopInfo",
           name: "shopInfo",
           title: "商户信息",
           title: "商户信息",
-          icon: "/static/image/shop-icon.png",
+          icon: require("../../static/image/shop-icon.png"),
           children: [
           children: [
             {
             {
               path: "/shopInfo/shopInfos",
               path: "/shopInfo/shopInfos",
@@ -90,7 +90,7 @@ export default {
           path: "/setUp",
           path: "/setUp",
           name: "setUp",
           name: "setUp",
           title: "设置",
           title: "设置",
-          icon: "/static/image/setting-icon.png",
+          icon: require("../../static/image/setting-icon.png"),
           children: [
           children: [
             {
             {
               path: "/setUp/set",
               path: "/setUp/set",
@@ -113,13 +113,13 @@ export default {
           path: "/help",
           path: "/help",
           name: "help",
           name: "help",
           title: "帮助中心",
           title: "帮助中心",
-          icon: "/static/image/help-icon.png",
+          icon: require("../../static/image/help-icon.png"),
         },
         },
         {
         {
           path: "/about",
           path: "/about",
           name: "about",
           name: "about",
           title: "关于我们",
           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%;
     width: 100%;
     background-size: cover;
     background-size: cover;
     background-attachment: fixed;
     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 {
   .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 { resolve } = require('path')
 const path = require('path')
 const path = require('path')
 module.exports = {
 module.exports = {
+  publicPath: "/",
+  outputDir: "dist",
+  lintOnSave: false, // 关闭eslint
   runtimeCompiler: true,
   runtimeCompiler: true,
   chainWebpack: config => {
   chainWebpack: config => {
     config.resolve.alias
     config.resolve.alias
       .set('@', resolve('src'))
       .set('@', resolve('src'))
-      .set('static',resolve('static'))
+      .set('#', resolve('static'))
   },
   },
   pluginOptions: {
   pluginOptions: {
     'style-resources-loader': {
     'style-resources-loader': {
@@ -13,6 +16,6 @@ module.exports = {
       patterns: [
       patterns: [
         path.resolve(__dirname, './src/assets/styles/*.scss')      //你的.scss文件所在目录
         path.resolve(__dirname, './src/assets/styles/*.scss')      //你的.scss文件所在目录
       ]
       ]
-    }
+    },
   }
   }
 }
 }