hugo/content/post/029.内置代码样式升级/内置代码样式升级.md
2021-12-12 17:46:25 +00:00

42 lines
1014 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "内置代码样式升级"
categories: [ "前端技术" ]
tags: [ ]
draft: false
slug: "code-highlight-plugin"
date: "2020-11-18 18:04:00"
---
刚刚做了一些博客的调整,包括友链,各位可以申请友链了。
新增了[代码高亮插件][1]感谢作者。我也进行了一些CSS的调整比如适配了各种移动设备并且能够根据移动设备是否开启夜间模式进行自适应各位可以切换一下手机的夜间模式看一下主题的变化。
**随便引一段JS代码**
```js
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ViewUI from 'view-design'
import 'view-design/dist/styles/iview.css';
Vue.use(ViewUI);
Vue.config.productionTip = false
router.beforeEach((to, from, next) => {
if (to.meta.title) {
document.title = to.meta.title
}
next()
})
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
```
[1]: https://www.xcnte.com/archives/523/