如何使用 VuePress 搭建一个 element-ui 风格的文档网站
{
"devDependencies": {
"vuepress": "1.5.3"
},
"dependencies": {
"async-validator": "1.11.5",
"element-ui": "^2.14.1",
// "vue": "^2.6.12"
}
}
/**
* Client app enhancement file.
*
* https://v1.vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements
*/
// export default ({
// Vue, // the version of Vue being used in the VuePress app
// options, // the options for the root Vue instance
// router, // the router instance for the app
// siteData // site metadata
// }) => {
// // ...apply enhancements for the site.
// }
// import Vue from 'vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
export default ({
Vue, // the version of Vue being used in the VuePress app
options, // the options for the root Vue instance
router, // the router instance for the app
siteData // site metadata
}) => {
// ...apply enhancements for the site.
// 使用 element-ui
Vue.use(ElementUI);
}
垃圾官方文档
https://github.com/vuejs/vuepress/issues?q=element-ui
refs
VuePress 最新教程
https://www.cnblogs.com/xgqfrms/p/14275077.html
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!