v2.1 version is released. For details, please see: https://github.com/elunez/eladmin-qd/releases/tag/v2.1
This commit is contained in:
@@ -3,7 +3,10 @@ const path = require('path')
|
|||||||
const utils = require('./utils')
|
const utils = require('./utils')
|
||||||
const config = require('../config')
|
const config = require('../config')
|
||||||
const { VueLoaderPlugin } = require('vue-loader')
|
const { VueLoaderPlugin } = require('vue-loader')
|
||||||
const vueLoaderConfig = require('./vue-loader.conf')
|
|
||||||
|
const os = require('os');
|
||||||
|
const HappyPack = require('happypack');
|
||||||
|
const happThreadPool = HappyPack.ThreadPool({size: os.cpus().length});
|
||||||
|
|
||||||
function resolve(dir) {
|
function resolve(dir) {
|
||||||
return path.join(__dirname, '..', dir)
|
return path.join(__dirname, '..', dir)
|
||||||
@@ -21,6 +24,7 @@ const createLintingRule = () => ({
|
|||||||
})
|
})
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
cache: true,
|
||||||
context: path.resolve(__dirname, '../'),
|
context: path.resolve(__dirname, '../'),
|
||||||
entry:["babel-polyfill","./src/main.js"],
|
entry:["babel-polyfill","./src/main.js"],
|
||||||
output: {
|
output: {
|
||||||
@@ -32,9 +36,11 @@ module.exports = {
|
|||||||
: config.dev.assetsPublicPath
|
: config.dev.assetsPublicPath
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
|
modules: [path.resolve(__dirname, '../node_modules')],
|
||||||
extensions: ['.js', '.vue', '.json'],
|
extensions: ['.js', '.vue', '.json'],
|
||||||
alias: {
|
alias: {
|
||||||
'@': resolve('src')
|
'@': resolve('src'),
|
||||||
|
api: path.resolve(__dirname, '../src/api')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
@@ -43,16 +49,19 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
test: /\.vue$/,
|
test: /\.vue$/,
|
||||||
loader: 'vue-loader',
|
loader: 'vue-loader',
|
||||||
options: vueLoaderConfig
|
options: {
|
||||||
|
loaders: {
|
||||||
|
js: 'happypack/loader?id=js' // 将loader换成happypack
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
loader: 'babel-loader?cacheDirectory',
|
loader: ['happypack/loader?id=js'], // 将loader换成happypack
|
||||||
include: [
|
include: [
|
||||||
resolve('src'),
|
resolve('src')
|
||||||
resolve('test'),
|
], // src是项目开发的目录
|
||||||
resolve('node_modules/webpack-dev-server/client')
|
exclude: [path.resolve('../node_modules')] // 不需要编译node_modules下的js
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.svg$/,
|
test: /\.svg$/,
|
||||||
@@ -89,7 +98,15 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
plugins: [new VueLoaderPlugin()],
|
plugins: [
|
||||||
|
new VueLoaderPlugin(),
|
||||||
|
new HappyPack({
|
||||||
|
id: 'js',
|
||||||
|
cache: true,
|
||||||
|
loaders: ['babel-loader?cacheDirectory=true'],
|
||||||
|
threadPool: happThreadPool
|
||||||
|
})
|
||||||
|
],
|
||||||
node: {
|
node: {
|
||||||
// prevent webpack from injecting useless setImmediate polyfill because Vue
|
// prevent webpack from injecting useless setImmediate polyfill because Vue
|
||||||
// source contains it (although only uses it if it's native).
|
// source contains it (although only uses it if it's native).
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "eladmin",
|
"name": "eladmin",
|
||||||
"version": "2.0.0",
|
"version": "2.1.0",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"description": "eladmin 前端代码",
|
"description": "eladmin 前端代码",
|
||||||
"author": "jie <elunez@qq.com>",
|
"author": "jie <elunez@qq.com>",
|
||||||
@@ -50,12 +50,12 @@
|
|||||||
"babel-plugin-syntax-jsx": "6.18.0",
|
"babel-plugin-syntax-jsx": "6.18.0",
|
||||||
"babel-plugin-transform-runtime": "6.23.0",
|
"babel-plugin-transform-runtime": "6.23.0",
|
||||||
"babel-plugin-transform-vue-jsx": "3.7.0",
|
"babel-plugin-transform-vue-jsx": "3.7.0",
|
||||||
|
"babel-polyfill": "^6.26.0",
|
||||||
"babel-preset-env": "1.7.0",
|
"babel-preset-env": "1.7.0",
|
||||||
"babel-preset-stage-2": "6.24.1",
|
"babel-preset-stage-2": "6.24.1",
|
||||||
"babel-polyfill": "^6.26.0",
|
|
||||||
"cross-env": "5.2.0",
|
|
||||||
"chalk": "2.4.1",
|
"chalk": "2.4.1",
|
||||||
"copy-webpack-plugin": "4.5.2",
|
"copy-webpack-plugin": "4.5.2",
|
||||||
|
"cross-env": "5.2.0",
|
||||||
"css-loader": "1.0.0",
|
"css-loader": "1.0.0",
|
||||||
"eslint": "4.19.1",
|
"eslint": "4.19.1",
|
||||||
"eslint-friendly-formatter": "4.0.1",
|
"eslint-friendly-formatter": "4.0.1",
|
||||||
@@ -64,6 +64,7 @@
|
|||||||
"eventsource-polyfill": "0.9.6",
|
"eventsource-polyfill": "0.9.6",
|
||||||
"file-loader": "1.1.11",
|
"file-loader": "1.1.11",
|
||||||
"friendly-errors-webpack-plugin": "1.7.0",
|
"friendly-errors-webpack-plugin": "1.7.0",
|
||||||
|
"happypack": "^5.0.1",
|
||||||
"html-webpack-plugin": "4.0.0-alpha",
|
"html-webpack-plugin": "4.0.0-alpha",
|
||||||
"mini-css-extract-plugin": "0.4.1",
|
"mini-css-extract-plugin": "0.4.1",
|
||||||
"node-notifier": "5.2.1",
|
"node-notifier": "5.2.1",
|
||||||
@@ -76,8 +77,8 @@
|
|||||||
"postcss-url": "7.3.2",
|
"postcss-url": "7.3.2",
|
||||||
"rimraf": "2.6.2",
|
"rimraf": "2.6.2",
|
||||||
"sass-loader": "7.0.3",
|
"sass-loader": "7.0.3",
|
||||||
"script-loader": "0.7.2",
|
|
||||||
"script-ext-html-webpack-plugin": "2.0.1",
|
"script-ext-html-webpack-plugin": "2.0.1",
|
||||||
|
"script-loader": "0.7.2",
|
||||||
"semver": "5.5.0",
|
"semver": "5.5.0",
|
||||||
"shelljs": "^0.8.3",
|
"shelljs": "^0.8.3",
|
||||||
"svg-sprite-loader": "3.8.0",
|
"svg-sprite-loader": "3.8.0",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<section class="app-main">
|
<section class="app-main">
|
||||||
|
<!--<CodeFund />-->
|
||||||
<transition name="fade-transform" mode="out-in">
|
<transition name="fade-transform" mode="out-in">
|
||||||
<keep-alive :include="cachedViews">
|
<keep-alive :include="cachedViews">
|
||||||
<router-view :key="key"/>
|
<router-view :key="key"/>
|
||||||
@@ -16,8 +17,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
// import CodeFund from '@/components/CodeFund'
|
||||||
export default {
|
export default {
|
||||||
name: 'AppMain',
|
name: 'AppMain',
|
||||||
|
// components: { CodeFund },
|
||||||
computed: {
|
computed: {
|
||||||
cachedViews() {
|
cachedViews() {
|
||||||
return this.$store.state.tagsView.cachedViews
|
return this.$store.state.tagsView.cachedViews
|
||||||
|
|||||||
@@ -106,11 +106,9 @@ export default {
|
|||||||
code: this.loginForm.code,
|
code: this.loginForm.code,
|
||||||
uuid: this.loginForm.uuid
|
uuid: this.loginForm.uuid
|
||||||
}
|
}
|
||||||
console.log(this.cookiePass)
|
|
||||||
if (user.password !== this.cookiePass) {
|
if (user.password !== this.cookiePass) {
|
||||||
user.password = encrypt(user.password)
|
user.password = encrypt(user.password)
|
||||||
}
|
}
|
||||||
console.log(user.password)
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
if (user.rememberMe) {
|
if (user.rememberMe) {
|
||||||
|
|||||||
Reference in New Issue
Block a user