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