add: 讨论
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
import '~/layouts/common.styl'
|
||||
import vditor from 'vditor'
|
||||
import 'vditor/dist/index.css'
|
||||
|
||||
const $tags = document.getElementById('tags')
|
||||
const floatTop = $tags.offsetTop + $tags.scrollHeight + 30
|
||||
@ -17,7 +19,7 @@ window.addEvent = addEvent
|
||||
|
||||
window.onload = function () {
|
||||
if (navigator.appName === 'Microsoft Internet Explorer' && parseInt(navigator.appVersion.split(';')[1].replace(/[ ]/g, '').replace('MSIE', '')) <= 9) {
|
||||
alert('您的浏览器版本过低,继续访问将会出现问题,请升级浏览器版本!')
|
||||
alert('您的浏览器版本过低,继续访问将会出现问题,请升级浏览器版本!') // eslint-disable-line
|
||||
}
|
||||
|
||||
// 底部返回顶部按钮
|
||||
@ -54,3 +56,5 @@ window.onload = function () {
|
||||
const s = document.getElementsByTagName('script')[0]
|
||||
s.parentNode.insertBefore(hm, s)
|
||||
}
|
||||
|
||||
window.Vditor = vditor
|
||||
|
4
plugins/vue-js-modal.js
Normal file
4
plugins/vue-js-modal.js
Normal file
@ -0,0 +1,4 @@
|
||||
import Vue from 'vue'
|
||||
import VModal from 'vue-js-modal'
|
||||
|
||||
Vue.use(VModal, { dialog: true })
|
@ -1,14 +1,62 @@
|
||||
import Vue from 'vue'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faGithub, faQq, faWeixin, faWeibo, faTwitter, faFacebook, faGooglePlus, faTelegram } from '@fortawesome/free-brands-svg-icons'
|
||||
import { faEnvelope, faSearch, faThermometerEmpty, faThermometerQuarter, faThermometerHalf, faThermometerThreeQuarters, faThermometerFull, faAngleDoubleUp, faChevronLeft, faChevronRight, faRss } from '@fortawesome/free-solid-svg-icons'
|
||||
import { faClock, faCalendarAlt, faBookmark } from '@fortawesome/free-regular-svg-icons'
|
||||
import {
|
||||
faGithub,
|
||||
faQq,
|
||||
faWeixin,
|
||||
faWeibo,
|
||||
faTwitter,
|
||||
faFacebook,
|
||||
faGooglePlus,
|
||||
faTelegram
|
||||
} from '@fortawesome/free-brands-svg-icons'
|
||||
import {
|
||||
faEnvelope,
|
||||
faSearch,
|
||||
faThermometerEmpty,
|
||||
faThermometerQuarter,
|
||||
faThermometerHalf,
|
||||
faThermometerThreeQuarters,
|
||||
faThermometerFull,
|
||||
faAngleDoubleUp,
|
||||
faChevronLeft,
|
||||
faChevronRight,
|
||||
faRss
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
import {
|
||||
faClock,
|
||||
faCalendarAlt,
|
||||
faBookmark
|
||||
} from '@fortawesome/free-regular-svg-icons'
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
||||
import hljs from 'highlight.js'
|
||||
import Swiper from '../components/Swiper'
|
||||
import Slide from '../components/Slide'
|
||||
|
||||
library.add(faGithub, faQq, faWeixin, faWeibo, faTwitter, faFacebook, faGooglePlus, faTelegram, faEnvelope, faRss, faSearch, faClock, faCalendarAlt, faBookmark, faThermometerEmpty, faThermometerQuarter, faThermometerHalf, faThermometerThreeQuarters, faThermometerFull, faAngleDoubleUp, faChevronLeft, faChevronRight)
|
||||
library.add(
|
||||
faGithub,
|
||||
faQq,
|
||||
faWeixin,
|
||||
faWeibo,
|
||||
faTwitter,
|
||||
faFacebook,
|
||||
faGooglePlus,
|
||||
faTelegram,
|
||||
faEnvelope,
|
||||
faRss,
|
||||
faSearch,
|
||||
faClock,
|
||||
faCalendarAlt,
|
||||
faBookmark,
|
||||
faThermometerEmpty,
|
||||
faThermometerQuarter,
|
||||
faThermometerHalf,
|
||||
faThermometerThreeQuarters,
|
||||
faThermometerFull,
|
||||
faAngleDoubleUp,
|
||||
faChevronLeft,
|
||||
faChevronRight
|
||||
)
|
||||
|
||||
Vue.component('Icon', FontAwesomeIcon)
|
||||
Vue.component('Swiper', Vue.extend(Swiper))
|
||||
@ -34,7 +82,10 @@ export default function (ctx, inject) {
|
||||
})
|
||||
|
||||
inject('finishLoad', () => {
|
||||
Array.prototype.forEach.call(document.querySelectorAll('pre code'), hljs.highlightBlock) // 代码高亮
|
||||
Array.prototype.forEach.call(
|
||||
document.querySelectorAll('pre code'),
|
||||
hljs.highlightBlock
|
||||
) // 代码高亮
|
||||
document.getElementById('loading').style.display = 'none' // 隐藏Loading
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user