Commit 744eea64 authored by ljd's avatar ljd

初始化代码

parent b99bf594
......@@ -3,3 +3,9 @@ indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
This diff is collapsed.
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
presets: [
'@vue/cli-plugin-babel/preset'
// '@vue/app',
// ['es2015', { 'modules': false }]
],
plugins: [["component",
{
"libraryName": "mint-ui",
"style": true
}
]]
],
plugins: [['component',
{
libraryName: 'mint-ui',
style: true
}
]]
}
......@@ -17,7 +17,7 @@
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.3.0",
"@vue/cli-plugin-eslint": "~4.3.0",
"@vue/cli-plugin-eslint": "^4.3.1",
"@vue/cli-plugin-pwa": "~4.3.0",
"@vue/cli-plugin-router": "~4.3.0",
"@vue/cli-plugin-vuex": "~4.3.0",
......
......@@ -4,12 +4,12 @@ import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
},
mutations: {
},
actions: {
},
modules: {
}
state: {
},
mutations: {
},
actions: {
},
modules: {
}
})
<template>
<div class="home">
<img alt="Vue logo" src="../assets/logo.png">
<img alt="Vue logo" src="../assets/logo.png" />
<HelloWorld msg="Welcome to Your Vue.js App" />
</div>
</template>
......
......@@ -15,5 +15,4 @@ export default {
</script>
<style scoped lang="less">
</style>
<template>
<div class="page flex flex-column flex-xc">
<div class="cnt">
<img src="../../assets/img/app404.png">
<img src="../../assets/img/app404.png" />
<p>您访问的页面不存在或链接错误</p>
<!-- <a href="/" class="back-home">回首页</a> -->
</div>
......@@ -15,35 +15,35 @@ export default {
</script>
<style scoped lang="less">
@import '../../assets/css/func.less';
.page {
width: 100%;
height: 100%;
text-align: center;
background-color: #fff;
}
.cnt {
align-items: center;
}
.cnt img {
width: px2rem(370);
}
.cnt p {
font-size: px2rem(30);
color: #999;
margin-top: px2rem(30);
}
.cnt a.back-home {
display: inline-block;
height: px2rem(66);
line-height: px2rem(66);
padding: 0 px2rem(60);
font-size: px2rem(30);
background-color: #3b81ff;
color: #fff;
border-radius: px2rem(60);
margin-top: px2rem(80);
margin-bottom: px2rem(180);
box-shadow: 0 px2rem(8) px2rem(40) 0 rgba(59,129,255,.3);
}
@import "../../assets/css/func.less";
.page {
width: 100%;
height: 100%;
text-align: center;
background-color: #fff;
}
.cnt {
align-items: center;
}
.cnt img {
width: px2rem(370);
}
.cnt p {
font-size: px2rem(30);
color: #999;
margin-top: px2rem(30);
}
.cnt a.back-home {
display: inline-block;
height: px2rem(66);
line-height: px2rem(66);
padding: 0 px2rem(60);
font-size: px2rem(30);
background-color: #3b81ff;
color: #fff;
border-radius: px2rem(60);
margin-top: px2rem(80);
margin-bottom: px2rem(180);
box-shadow: 0 px2rem(8) px2rem(40) 0 rgba(59, 129, 255, 0.3);
}
</style>
<template>
<div class="about">
<h1>This is an about page</h1>
</div>
<div class="about">
<h1>This is an about page</h1>
</div>
</template>
This diff is collapsed.
......@@ -17,13 +17,9 @@ export default {
'mt-button': Button
},
data() {
return {
}
return {}
},
mounted() {},
methods: {
}
methods: {}
}
</script>
const path = require('path');//引入path模块
function resolve(dir){
return path.join(__dirname,dir)//path.join(__dirname)设置绝对路径
const path = require('path')// 引入path模块
function resolve(dir) {
return path.join(__dirname, dir)// path.join(__dirname)设置绝对路径
}
module.exports = {
devServer: {
......@@ -10,23 +10,21 @@ module.exports = {
},
proxy: 'http://localhost:8080'
},
lintOnSave: process.env.NODE_ENV !== 'production',
chainWebpack:(config)=>{
// lintOnSave: process.env.NODE_ENV !== 'production',
lintOnSave: true,
chainWebpack: (config) => {
// 设置别名
config.resolve.alias
.set('@',resolve('./src'))
.set('components',resolve('./src/components'))
//set第一个参数:设置的别名,第二个参数:设置的路径
},
chainWebpack: config => {
.set('@', resolve('./src'))
.set('components', resolve('./src/components'))
config.module
.rule('eslint')
.use('eslint-loader')
.loader('eslint-loader')
.tap(options => {
options.fix = true
return options
})
.rule('eslint')
.use('eslint-loader')
.loader('eslint-loader')
.tap(options => {
options.fix = true
return options
})
// set第一个参数:设置的别名,第二个参数:设置的路径
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment