From d157fbaf027bc8ee3cd3084f45b603ef8a28ce23 Mon Sep 17 00:00:00 2001 From: li-xiaoqing <15010263998@163.com> Date: Tue, 6 Aug 2019 19:51:22 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8C=87=E4=BB=A4?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 2 +- src/main.js | 6 ------ src/views/editor.vue | 7 +++++++ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 37278a5..a121058 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "perfect-markdown", - "version": "1.0.15", + "version": "1.0.16", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/main.js b/src/main.js index 223c004..446ab12 100644 --- a/src/main.js +++ b/src/main.js @@ -3,17 +3,11 @@ import App from './App.vue' import router from './router' import store from '@/store' import md from '@/utils/md' -import { VTooltip, VPopover, VClosePopover } from 'v-tooltip' - import './assets/less/reset.less' import './assets/less/github-markdown.css' // fork github-markdown import './assets/fonts/iconfont.css' import './assets/less/tooltip.less' -Vue.directive('tooltip', VTooltip) -Vue.directive('close-popover', VClosePopover) -Vue.component('v-popover', VPopover) - Vue.use({ install(Vue, options) { Vue.prototype.$md = md diff --git a/src/views/editor.vue b/src/views/editor.vue index de559cf..3a8983d 100644 --- a/src/views/editor.vue +++ b/src/views/editor.vue @@ -83,6 +83,13 @@ import loader from '../utils/loader' import external from '../config/external' import md from '../utils/md' import { scrollLink } from '../utils/scroll' +// 注册指令和组件 +import { VTooltip, VPopover, VClosePopover } from 'v-tooltip' +import Vue from 'vue' +Vue.directive('tooltip', VTooltip) +Vue.directive('close-popover', VClosePopover) +Vue.component('v-popover', VPopover) + export default { name: 'editor', data() { From 4897074ade4c66a011952fd2a8574c20ef8f23b2 Mon Sep 17 00:00:00 2001 From: li-xiaoqing <15010263998@163.com> Date: Wed, 7 Aug 2019 11:01:45 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=89=93=E5=8C=85?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/main.js | 5 ----- src/views/editor.vue | 5 ++++- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 3951de6..d3476ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "perfect-markdown", - "version": "1.0.15", + "version": "1.0.16", "main": "src/index.js", "files": [ "lib", diff --git a/src/main.js b/src/main.js index 446ab12..714110f 100644 --- a/src/main.js +++ b/src/main.js @@ -3,11 +3,6 @@ import App from './App.vue' import router from './router' import store from '@/store' import md from '@/utils/md' -import './assets/less/reset.less' -import './assets/less/github-markdown.css' // fork github-markdown -import './assets/fonts/iconfont.css' -import './assets/less/tooltip.less' - Vue.use({ install(Vue, options) { Vue.prototype.$md = md diff --git a/src/views/editor.vue b/src/views/editor.vue index 3a8983d..d336239 100644 --- a/src/views/editor.vue +++ b/src/views/editor.vue @@ -72,7 +72,10 @@