Carlos Aguni

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice.


Antd Vue

31 May 2020 » frontend

https://www.antdv.com/docs/vue/introduce-cn/

npm i --save ant-design-vue

# kickstart
#https://www.npmjs.com/package/vue-axios
npm install --save axios vue-axios

main.js

import Vue from 'vue'
import Antd from 'ant-design-vue';
import App from './App.vue'
import router from './router'
import 'ant-design-vue/dist/antd.css';

Vue.use(Antd)

import axios from 'axios'
import VueAxios from 'vue-axios'
 
Vue.use(VueAxios, axios)

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')    

Caveats

ENOSPC: System limit for number of file watchers reached

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

new vue.js project preview yields “Invalid Host header”

cat > vue.config.js <<EOF
module.exports = {
    // options...
    devServer: {
        disableHostCheck: true
    }
}
EOF
#vue.config.js
module.exports = { runtimeCompiler: true, }