This commit is contained in:
菠萝战士2018 2018-08-16 08:32:53 +08:00
parent 838e843fc3
commit 911779100e
2 changed files with 47 additions and 5 deletions

View File

@ -3,14 +3,18 @@
<el-form class="login-form" autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left">
<h3 class="title">Randy</h3>
<el-form-item prop="username">
<span class="iconfont icon-yonghu"></span>
<span class="fontcontainer">
<span class="iconfont icon-yonghu"></span>
</span>
<!-- <span class="svg-container svg-container_login">
<svg-icon icon-class="user" />
</span> -->
<el-input name="username" type="text" v-model="loginForm.username" autoComplete="on" placeholder="username" />
</el-form-item>
<el-form-item prop="password">
<span class="iconfont icon-mima"></span>
<span class="fontcontainer">
<span class="iconfont icon-mima"></span>
</span>
<!-- <span class="svg-container">
<svg-icon icon-class="password"></svg-icon>
</span> -->
@ -191,5 +195,9 @@ $light_gray: #eee;
cursor: pointer;
user-select: none;
}
.fontcontainer{
color:#889aa4;
padding-left:10px;
}
}
</style>

View File

@ -14,7 +14,8 @@ module.exports = {
// 指定子路径。比如,如果你的应用部署在
// https://www.foobar.com/my-app/
// 那么将这个值改为 `/my-app/`
baseUrl: '/',
// baseUrl: '/',
baseUrl: process.env.NODE_ENV === 'production' ? 'http://pbdg8wija.bkt.clouddn.com/build/js/' : '/',
// 将构建好的文件输出到哪里
outputDir: 'dist',
@ -78,13 +79,37 @@ module.exports = {
hotOnly: false,
open:true,
// 查阅 https://github.com/vuejs/vue-docs-zh-cn/blob/master/vue-cli/cli-service.md#配置代理
proxy: 'http://193.112.153.155:3001', // string | Object
proxy: 'http://localhost:3001', // string | Object
before: app => { }
},
configureWebpack: config => {
// console.log(config)
// config.module.rules.push({
// test: /\.svg$/,
// loader: 'svg-sprite-loader',
// include: [resolve('src/icons')],
// // include: path.resolve(__dirname, './src/icons'),
// options: {
// symbolId: 'icon-[name]'
// }}
// );
// config.module.rules.push({
// test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
// loader: 'url-loader',
// exclude: [resolve('src/icons')]
// // exclude: path.resolve(__dirname, './src/icons')
// })
if (process.env.NODE_ENV === 'production') {
// 为生产环境修改配置...
config.plugins.push(
new QiniuPlugin({
ACCESS_KEY: 'p87szI2jFSfB_qgln5eYV2ojKHMXtzKVKO4QFmMX',
SECRET_KEY: '1TwlGTzlSeMuwBF_EaExc0z0VtpAvrtTiQ1OlyHF',
bucket: 'stable',
path: 'build/js/'
})
);
if(process.env.npm_lifecycle_event === 'analyze'){
config.plugins.push(
new BundleAnalyzerPlugin()
@ -101,4 +126,13 @@ module.exports = {
pluginOptions: {
}
}
}
// module.exports = {
// chainWebpack: config => {
// config.module
// .rule('svg')
// .use('file-loader')
// .loader('svg-sprite-loader')
// }
// }