Commit 42b80d5b authored by 周远喜's avatar 周远喜

iview4,less,初始化成功

parent 0a4b5149
Pipeline #49 failed with stages
const path = require('path')
const resolve = dir => {
return path.join(__dirname, dir)
}
export default { export default {
mode: 'spa', mode: 'spa',
/* /*
...@@ -28,6 +32,7 @@ export default { ...@@ -28,6 +32,7 @@ export default {
** Plugins to load before mounting the App ** Plugins to load before mounting the App
*/ */
plugins: [ plugins: [
'@/plugins/iview'
], ],
/* /*
** Nuxt.js dev-modules ** Nuxt.js dev-modules
...@@ -54,7 +59,13 @@ export default { ...@@ -54,7 +59,13 @@ export default {
/* /*
** You can extend webpack config here ** You can extend webpack config here
*/ */
loaders:{
less:{
javascriptEnabled:true
}
},
extend (config, ctx) { extend (config, ctx) {
config.resolve.alias['_c']=path.resolve(__dirname, 'components')
} }
} }
} }
...@@ -11,8 +11,12 @@ ...@@ -11,8 +11,12 @@
"generate": "nuxt generate" "generate": "nuxt generate"
}, },
"dependencies": { "dependencies": {
"@nuxtjs/axios": "^5.3.6",
"nuxt": "^2.0.0", "nuxt": "^2.0.0",
"@nuxtjs/axios": "^5.3.6" "view-design": "^4.0.2",
"js-cookie": "^2.2.1",
"less": "^3.10.3",
"less-loader": "^5.0.0"
}, },
"devDependencies": {} "devDependencies": {}
} }
\ No newline at end of file
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
> >
GitHub GitHub
</a> </a>
<Button type="primary">hello</Button>
</div> </div>
</div> </div>
</div> </div>
...@@ -37,8 +38,7 @@ export default { ...@@ -37,8 +38,7 @@ export default {
} }
} }
</script> </script>
<style lang="less">
<style>
.container { .container {
margin: 0 auto; margin: 0 auto;
min-height: 100vh; min-height: 100vh;
...@@ -46,6 +46,9 @@ export default { ...@@ -46,6 +46,9 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
text-align: center; text-align: center;
.title{
color: red;
}
} }
.title { .title {
......
import Vue from 'vue'
import ViewUI from 'view-design';
import 'view-design/dist/styles/iview.css';
Vue.use(ViewUI);
This diff is collapsed.
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