diff --git a/README.md b/README.md index 64d22bb..598caf2 100644 --- a/README.md +++ b/README.md @@ -21,18 +21,7 @@ ## Build Setup ``` bash -# install dependencies -cd app -npm install - ---fix-- -修改 app/node_modules/qiniu/node_modules/sync-request/package.json 入口文件为./browser.js -加入一行 -"main": "./browser.js" ---fix-- - -cd .. -cnpm install //electron 需要的文件下载巨慢,经常卡死 这里推荐用cnpm +npm i //electron 需要的文件下载巨慢,经常卡死,耐心,不行就翻墙 # serve with hot reload at localhost:9080 npm run dev @@ -46,18 +35,7 @@ npm run pack More information can be found [here](https://simulatedgreg.gitbooks.io/electron-vue/content/docs/npm_scripts.html). -#### issue -- vue package.json -``` -"main": "dist/vue.common.js", -``` - -- sync-request package.json -``` -"main": "./browser.js" -``` - -##### iView + Electron [独立构建-vs-运行时构建](https://cn.vuejs.org/v2/guide/installation.html#独立构建-vs-运行时构建) +##### tips: iView + Electron [独立构建-vs-运行时构建](https://cn.vuejs.org/v2/guide/installation.html#独立构建-vs-运行时构建) ``` TypeError: _vue2.default.compile is not a function at VueComponent.compile //官网提示可以在webpack添加 diff --git a/app/package.json b/app/package.json index 478c210..d4150a8 100644 --- a/app/package.json +++ b/app/package.json @@ -5,6 +5,7 @@ "main": "./dist/main.js", "dependencies": { "axios": "^0.16.1", + "electron-json-storage": "^3.0.6", "iview": "^2.0.0-rc.18", "moment": "^2.18.1", "qiniu": "^7.0.4", diff --git a/app/src/renderer/components/LandingPageView.vue b/app/src/renderer/components/LandingPageView.vue deleted file mode 100644 index 67cc328..0000000 --- a/app/src/renderer/components/LandingPageView.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - - - diff --git a/app/src/renderer/components/LandingPageView/CurrentPage.vue b/app/src/renderer/components/LandingPageView/CurrentPage.vue deleted file mode 100644 index 0d77dc6..0000000 --- a/app/src/renderer/components/LandingPageView/CurrentPage.vue +++ /dev/null @@ -1,33 +0,0 @@ - - - - - diff --git a/app/src/renderer/components/LandingPageView/Links.vue b/app/src/renderer/components/LandingPageView/Links.vue deleted file mode 100644 index 155e923..0000000 --- a/app/src/renderer/components/LandingPageView/Links.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - diff --git a/app/src/renderer/components/LandingPageView/Versions.vue b/app/src/renderer/components/LandingPageView/Versions.vue deleted file mode 100644 index eb43bfc..0000000 --- a/app/src/renderer/components/LandingPageView/Versions.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/app/src/renderer/components/LandingPageView/assets/logo.png b/app/src/renderer/components/LandingPageView/assets/logo.png deleted file mode 100644 index 63736e2..0000000 Binary files a/app/src/renderer/components/LandingPageView/assets/logo.png and /dev/null differ diff --git a/app/src/renderer/main.js b/app/src/renderer/main.js index 702d391..1bfed6d 100644 --- a/app/src/renderer/main.js +++ b/app/src/renderer/main.js @@ -1,10 +1,9 @@ import Vue from 'vue' + import Router from 'vue-router' import Electron from 'vue-electron' -import App from './App' -import routes from './routes' -import store from './vuex/store' +import axios from 'axios'; import iView from 'iview'; import 'iview/dist/styles/iview.css'; @@ -14,6 +13,8 @@ Vue.use(Router); Vue.use(iView); Vue.config.debug = false; +import routes from './routes' +import store from './vuex/store' const router = new Router({ scrollBehavior: () => ({y: 0}), @@ -21,7 +22,7 @@ const router = new Router({ }); //拦截器 -import axios from 'axios'; + axios.interceptors.response.use((response) => { return response; }, (error) => { @@ -30,7 +31,8 @@ axios.interceptors.response.use((response) => { } }); -/* eslint-disable no-new */ +import App from './App'; +/!* eslint-disable no-new *!/ new Vue({ router, store, diff --git a/app/src/renderer/components/SetToken.vue b/app/src/renderer/pages/Login.vue similarity index 100% rename from app/src/renderer/components/SetToken.vue rename to app/src/renderer/pages/Login.vue diff --git a/app/src/renderer/components/Main.vue b/app/src/renderer/pages/Main.vue similarity index 98% rename from app/src/renderer/components/Main.vue rename to app/src/renderer/pages/Main.vue index f5f1d46..f502736 100644 --- a/app/src/renderer/components/Main.vue +++ b/app/src/renderer/pages/Main.vue @@ -80,7 +80,7 @@ import * as types from '../vuex/mutation-types' import storage from 'electron-json-storage' - import RightContent from './Main/RightContent.vue' + import RightContent from '../components/Main/RightContent.vue' import api from '../api/API' let API = null; diff --git a/app/src/renderer/components/Setup.vue b/app/src/renderer/pages/Setup.vue similarity index 97% rename from app/src/renderer/components/Setup.vue rename to app/src/renderer/pages/Setup.vue index 4df587b..effefed 100644 --- a/app/src/renderer/components/Setup.vue +++ b/app/src/renderer/pages/Setup.vue @@ -36,7 +36,7 @@