diff --git a/src/components/Tinymce/index.vue b/src/components/Tinymce/index.vue index c0f486f01d68d94822a1fe7bf524fd228c5dd55a..b3538c253d1904b9edb6627057c37c8f71d390ec 100644 --- a/src/components/Tinymce/index.vue +++ b/src/components/Tinymce/index.vue @@ -148,9 +148,9 @@ export default { _this.fullscreen = e.state }) }, - //it will try to keep these URLs intact - //https://www.tiny.cloud/docs-3x/reference/configuration/Configuration3x@convert_urls/ - //https://stackoverflow.com/questions/5196205/disable-tinymce-absolute-to-relative-url-conversions + // it will try to keep these URLs intact + // https://www.tiny.cloud/docs-3x/reference/configuration/Configuration3x@convert_urls/ + // https://stackoverflow.com/questions/5196205/disable-tinymce-absolute-to-relative-url-conversions convert_urls: false // 整合七牛上传 // images_dataimg_filter(img) { diff --git a/src/layout/components/Sidebar/Link.vue b/src/layout/components/Sidebar/Link.vue index eb4dd1079bc22f5e2dcad0c9eb71d5f3e7735126..530b3d5b3749538745ffbf2fcb32547a4de3bfa3 100644 --- a/src/layout/components/Sidebar/Link.vue +++ b/src/layout/components/Sidebar/Link.vue @@ -1,7 +1,5 @@ - @@ -16,19 +14,28 @@ export default { required: true } }, + computed: { + isExternal() { + return isExternal(this.to) + }, + type() { + if (this.isExternal) { + return 'a' + } + return 'router-link' + } + }, methods: { - linkProps(url) { - if (isExternal(url)) { + linkProps(to) { + if (this.isExternal) { return { - is: 'a', - href: url, + href: to, target: '_blank', rel: 'noopener' } } return { - is: 'router-link', - to: url + to: to } } }