From f5ff5dc433dd65dba7083d257f8b62f1bea80321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=9D=A8?= <1711467488@qq.com> Date: Sat, 24 Feb 2018 18:21:01 +0800 Subject: [PATCH] no message Former-commit-id: 666caeae181eff9a6ab6e8ff81db442e8d0d3d89 Former-commit-id: e1df8e45d78d8d226b2543d8a00c863c2ff21534 Former-commit-id: fc2eafbfac803deb16c778afbfd94fa9eebc8cab --- src/components/core/Markdown/index.vue | 26 +++++++++++++++---- .../core/Markdown/plugin/baidupan.js | 16 +++++++----- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/components/core/Markdown/index.vue b/src/components/core/Markdown/index.vue index 7055836e..a746507c 100644 --- a/src/components/core/Markdown/index.vue +++ b/src/components/core/Markdown/index.vue @@ -93,14 +93,30 @@ export default { } $baidupanHeight: 40px; .baidupan { - height: $baidupanHeight; overflow: hidden; margin-bottom: 16px; - .l { - float: left; - } - .r { + .container { + height: $baidupanHeight + 10px; + border-radius: 4px; + border: 1px solid #dfe2e5; + padding: 5px; + padding-right: 15px; float: left; + .icon { + float: left; + height: $baidupanHeight; + text-align: center; + width: 50px; + img { + width: 40px; + margin-top: 4px; + } + } + .url { + float: left; + height: $baidupanHeight; + line-height: $baidupanHeight; + } } } diff --git a/src/components/core/Markdown/plugin/baidupan.js b/src/components/core/Markdown/plugin/baidupan.js index a9774e86..c436f9ea 100644 --- a/src/components/core/Markdown/plugin/baidupan.js +++ b/src/components/core/Markdown/plugin/baidupan.js @@ -4,13 +4,15 @@ export default (quote) => { const bdShareUrlPwd = /^链接: https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+ 密码: [a-z0-9]{4}$/i if (bdShareUrl.test(_quote)) { return `
-
- -
-
- ${_quote} -
-
` +
+
+ +
+
+ ${_quote} +
+
+ ` } else if (bdShareUrlPwd.test(_quote)) { const url = _quote.match(/https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+/i) const pwd = _quote.match(/[a-z0-9]{4}$/i)