From d7fcbcaa283df334725d1a4f046b1363f550726a Mon Sep 17 00:00:00 2001 From: rongxingsun Date: Fri, 24 Aug 2018 10:01:27 +0000 Subject: [PATCH] Update index.vue Former-commit-id: 8004454a874f75694f88d8eebd37cff06828e2e1 [formerly 8004454a874f75694f88d8eebd37cff06828e2e1 [formerly 8004454a874f75694f88d8eebd37cff06828e2e1 [formerly 8004454a874f75694f88d8eebd37cff06828e2e1 [formerly 74344de3508cb42a17ab6d4e194964e8c786cacb [formerly fd859e76f8d42ac7d1e57054a93cd6bb51523d01]]]]] Former-commit-id: bb3053de99201da3fa6499dda0d90d196e699a2c Former-commit-id: a90dbd47e259cae5b9479c1d74e0db2dcdc7b559 Former-commit-id: 74d893743fb050944cefac3e9c963c8e9487e768 [formerly 66fcd9f8f5e1642d7930ac1123b750dd4cccc110] Former-commit-id: 159a54d45f4c9b7c324864986067197d1f6ab81f Former-commit-id: d68f21e49eda7d15fdf73a9d6c646ca23fd3fbc0 Former-commit-id: d0c008ca0887b9a552312eaa9acfad1ab2788b02 Former-commit-id: d41d1e7848f8d4c495926de44477e59afd196cf8 Former-commit-id: ce98a3bb1e9fac3f3e5df4ee03a071086ca7fded --- src/components/d2-markdown/index.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/d2-markdown/index.vue b/src/components/d2-markdown/index.vue index aaf60f50..00f161b1 100644 --- a/src/components/d2-markdown/index.vue +++ b/src/components/d2-markdown/index.vue @@ -21,6 +21,12 @@ export default { required: false, default: '' }, + // axios的baseurl + baseurl: { + type: String, + required: false, + default: process.env.VUE_APP_API + } source: { type: String, required: false, @@ -64,7 +70,7 @@ export default { }, // 从 url 加载原始数据 async getReadme (url) { - const data = await ComponentsMarkdownBase(url) + const data = await ComponentsMarkdownBase(url, this.baseurl) return this.marked(data) }, marked (data) {