desc: 修改代码
This commit is contained in:
parent
9c0ad7adb8
commit
2266f6d823
@ -30,11 +30,8 @@
|
||||
"stompjs": "^2.3.3",
|
||||
"storejs": "^1.0.25",
|
||||
"three": "^0.107.0",
|
||||
"vue": "2.6.10",
|
||||
"vue-i18n": "^8.12.0",
|
||||
"vue-router": "3.0.6",
|
||||
"vuedraggable": "^2.20.0",
|
||||
"vuex": "3.1.0",
|
||||
"xlsx": "^0.14.2",
|
||||
"zrender": "^4.0.4"
|
||||
},
|
||||
@ -54,6 +51,7 @@
|
||||
"babel-preset-env": "1.6.1",
|
||||
"babel-preset-stage-2": "6.24.1",
|
||||
"chalk": "2.4.2",
|
||||
"compression-webpack-plugin": "^3.0.0",
|
||||
"connect": "3.6.6",
|
||||
"copy-webpack-plugin": "^4.5.2",
|
||||
"eslint": "5.15.3",
|
||||
|
@ -6,10 +6,17 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.png">
|
||||
<!-- <link rel="stylesheet" href="https://cdn.bootcss.com/element-ui/2.12.0/theme-chalk/index.css"> -->
|
||||
<!-- <link href="https://cdn.bootcss.com/nprogress/0.2.0/nprogress.min.css" rel="stylesheet"> -->
|
||||
<title><%= webpackConfig.name %></title>
|
||||
<script src="/static/inflate.min.js"></script>
|
||||
<script src="/static/three.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/echarts/4.4.0-rc.1/echarts-en.common.js"></script>
|
||||
|
||||
<script src="https://cdn.bootcss.com/vue/2.6.10/vue.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/vuex/3.1.1/vuex.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/vue-router/3.1.3/vue-router.min.js"></script>
|
||||
<!-- <script src="https://cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js"></script> -->
|
||||
|
||||
<!-- <script src="https://cdn.bootcss.com/element-ui/2.12.0/index.js"></script>
|
||||
<script src="https://cdn.bootcss.com/element-ui/2.12.0/locale/en.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/element-ui/2.12.0/locale/zh-CN.min.js"></script> -->
|
||||
|
@ -1,5 +1,5 @@
|
||||
import zrender from 'zrender';
|
||||
import * as zrUtil from 'zrender/src/core/util';
|
||||
// import * as zrUtil from 'zrender/src/core/util';
|
||||
import localStore from 'storejs';
|
||||
import Options from './options';
|
||||
import MouseController from './mouseController';
|
||||
|
@ -3,24 +3,21 @@ import Vue from 'vue';
|
||||
import 'normalize.css/normalize.css'; // A modern alternative to CSS resets
|
||||
|
||||
import ElementUI from 'element-ui';
|
||||
// import ELEMENT from 'element-ui';
|
||||
import ElementLocale from 'element-ui/lib/locale';
|
||||
import 'element-ui/lib/theme-chalk/index.css';
|
||||
|
||||
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
|
||||
|
||||
import '@/styles/index.scss'; // global css
|
||||
|
||||
import LangStorage from '@/utils/lang';
|
||||
import App from './App';
|
||||
import VueI18n from 'vue-i18n';
|
||||
|
||||
import store from './store';
|
||||
import router from './router';
|
||||
|
||||
import '@/icons'; // icon
|
||||
import '@/permission'; // permission control
|
||||
import '@/scripts/GlobalPlugin';
|
||||
// import '@/directives';
|
||||
import '@/directive/dialogDrag/index.js';
|
||||
import '@/directive/dialogDragWidth/index.js';
|
||||
import '@/directive/drag/index.js';
|
||||
|
@ -1,7 +1,8 @@
|
||||
import Vue from 'vue';
|
||||
// import Vue from 'vue';
|
||||
import Router from 'vue-router';
|
||||
// import VueRouter from 'vue-router';
|
||||
|
||||
Vue.use(Router);
|
||||
// Vue.use(Router);
|
||||
|
||||
/* Layout */
|
||||
const Layout = () => import('@/layout');
|
||||
|
@ -1,16 +1,16 @@
|
||||
module.exports = {
|
||||
|
||||
title: '',
|
||||
title: '',
|
||||
|
||||
/**
|
||||
/**
|
||||
* @type {boolean} true | false
|
||||
* @description Whether fix the header
|
||||
*/
|
||||
fixedHeader: false,
|
||||
fixedHeader: false,
|
||||
|
||||
/**
|
||||
/**
|
||||
* @type {boolean} true | false
|
||||
* @description Whether show the logo in sidebar
|
||||
*/
|
||||
sidebarLogo: false
|
||||
sidebarLogo: false
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Vue from 'vue';
|
||||
// import Vue from 'vue';
|
||||
import Vuex from 'vuex';
|
||||
import app from './modules/app';
|
||||
import settings from './modules/settings';
|
||||
@ -17,7 +17,7 @@ import ibp from './modules/ibp';
|
||||
|
||||
import getters from './getters';
|
||||
|
||||
Vue.use(Vuex);
|
||||
// Vue.use(Vuex);
|
||||
|
||||
const store = new Vuex.Store({
|
||||
modules: {
|
||||
|
@ -6,6 +6,10 @@ const defaultSettings = require('./src/settings.js');
|
||||
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
|
||||
// const CompressionWebpackPlugin = require('compression-webpack-plugin');
|
||||
// const productionGzipExtensions = ['js', 'css'];
|
||||
// const isProduction = process.env.NODE_ENV === 'production';
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir);
|
||||
}
|
||||
@ -47,30 +51,69 @@ module.exports = {
|
||||
// },
|
||||
// after: require('./mock/mock-server.js')
|
||||
},
|
||||
configureWebpack: {
|
||||
// provide the app's title in webpack's name field, so that
|
||||
// it can be accessed in index.html to inject the correct title.
|
||||
name: name,
|
||||
resolve: {
|
||||
configureWebpack: config => {
|
||||
config.name = name;
|
||||
config.resolve = {
|
||||
extensions: ['.js', '.vue', '.json'],
|
||||
alias: {
|
||||
'@': resolve('src')
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new CopyWebpackPlugin([
|
||||
{
|
||||
from: path.resolve(__dirname, './static'),
|
||||
to: 'static',
|
||||
ignore: ['.*']
|
||||
}
|
||||
])
|
||||
],
|
||||
externals: {
|
||||
'echarts': 'echarts' // 配置使用CDN
|
||||
// 'element-ui': 'ELEMENT'
|
||||
}
|
||||
};
|
||||
config.plugins.push(new CopyWebpackPlugin([
|
||||
{
|
||||
from: path.resolve(__dirname, './static'),
|
||||
to: 'static',
|
||||
ignore: ['.*']
|
||||
}
|
||||
]));
|
||||
|
||||
// if (isProduction) {
|
||||
// config.plugins.push(new CompressionWebpackPlugin({
|
||||
// algorithm: 'gzip',
|
||||
// test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
|
||||
// threshold: 10240,
|
||||
// minRatio: 0.8
|
||||
// }));
|
||||
// }
|
||||
|
||||
config.externals = { // 配置使用CDN
|
||||
'vue': 'Vue',
|
||||
'vuex': 'Vuex',
|
||||
'vue-router': 'VueRouter',
|
||||
// 'nprogress': 'NProgress',
|
||||
'echarts': 'echarts'
|
||||
};
|
||||
|
||||
},
|
||||
// {
|
||||
// // provide the app's title in webpack's name field, so that
|
||||
// // it can be accessed in index.html to inject the correct title.
|
||||
// name: name,
|
||||
// resolve: {
|
||||
// extensions: ['.js', '.vue', '.json'],
|
||||
// alias: {
|
||||
// '@': resolve('src')
|
||||
// }
|
||||
// },
|
||||
// plugins: [
|
||||
// new CopyWebpackPlugin([
|
||||
// {
|
||||
// from: path.resolve(__dirname, './static'),
|
||||
// to: 'static',
|
||||
// ignore: ['.*']
|
||||
// }
|
||||
// ]),
|
||||
// new CompressionWebpackPlugin({
|
||||
// algorithm: 'gzip',
|
||||
// test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
|
||||
// threshold: 10240,
|
||||
// minRatio: 0.8
|
||||
// })
|
||||
// ],
|
||||
// externals: {
|
||||
// 'echarts': 'echarts' // 配置使用CDN
|
||||
// }
|
||||
// },
|
||||
chainWebpack(config) {
|
||||
config.plugins.delete('preload'); // TODO: need test
|
||||
config.plugins.delete('prefetch'); // TODO: need test
|
||||
|
Loading…
Reference in New Issue
Block a user