diff --git a/src/components/markdown/DesignMarkdown.vue b/src/components/markdown/DesignMarkdown.vue index fbc284e78c800188a3f56d68b82a1ed0e0f78742..414dbfb09c1576487c99d4615505350e7a013158 100644 --- a/src/components/markdown/DesignMarkdown.vue +++ b/src/components/markdown/DesignMarkdown.vue @@ -1,7 +1,9 @@ diff --git a/src/components/markdown/MarkDirTree.vue b/src/components/markdown/MarkDirTree.vue new file mode 100644 index 0000000000000000000000000000000000000000..e77af61709c7032b0a1a2f682f5f25e0062f07a7 --- /dev/null +++ b/src/components/markdown/MarkDirTree.vue @@ -0,0 +1,75 @@ + + + diff --git a/src/main.js b/src/main.js index b7f79b17db800f36b451ff02cee722e8524a4dbc..ed84864c08a984a3c0d0a8a154021fe608248e57 100644 --- a/src/main.js +++ b/src/main.js @@ -4,7 +4,6 @@ import Vue from 'vue' import axios from 'axios' import hljs from 'highlight.js' -import * as echarts from 'echarts' import importElementComponents from './importElement' import importEchartsComponents from './importEchartsComponents' // 样式cnd @@ -18,31 +17,32 @@ import App from './App' import 'highlight.js/styles/github.css' const env = process.env.NODE_ENV && false + +// 公共的部分 + +Vue.use(cookies) + +Vue.use(hljs) +Vue.directive('highlight', function (el) { + const blocks = el.querySelectorAll('pre code') + blocks.forEach((block) => { + hljs.highlightBlock(block) + }) +}) +// cookie +Vue.prototype.$cookies = cookies +// axios +// Vue.use(axios) +Vue.prototype.$axios = axios +window.$axios_w = axios +Vue.prototype.$cookies.set('user_session', 'null') +// 路由 +const router = useRouter(Vue, VueRouter) // 生产环境 if (env === 'production') { try { - // 路由 - const router = useRouter(Vue, VueRouter) - + // 全局引入 Vue.config.productionTip = false - Vue.use(cookies) - Vue.use(hljs) - Vue.directive('highlight', function (el) { - const blocks = el.querySelectorAll('pre code') - blocks.forEach((block) => { - hljs.highlightBlock(block) - }) - }) - // cookie - Vue.prototype.$cookies = cookies - // axios - // Vue.use(axios) - Vue.prototype.$axios = axios - window.$axios_w = axios - Vue.prototype.$echarts = echarts - window.$echarts_w = echarts - - Vue.prototype.$cookies.set('user_session', 'null') new Vue({ el: '#app', @@ -54,32 +54,13 @@ if (env === 'production') { throw Error(e) } } else { - // 路由 - const router = useRouter(Vue, VueRouter) - // 按需引入elementui importElementComponents(Vue) // 按需引入echarts importEchartsComponents(Vue) - Vue.config.productionTip = false - Vue.use(cookies) - Vue.use(hljs) - Vue.directive('highlight', function (el) { - const blocks = el.querySelectorAll('pre code') - blocks.forEach((block) => { - hljs.highlightBlock(block) - }) - }) - // cookie - Vue.prototype.$cookies = cookies - // axios - // Vue.use(axios) - Vue.prototype.$axios = axios - window.$axios_w = axios - Vue.prototype.$cookies.set('user_session', 'null') new Vue({ el: '#app', router,