From ef4f7fcaa33f4f98cf320308b0778913a18324a6 Mon Sep 17 00:00:00 2001 From: Frost-ZX <30585462+Frost-ZX@users.noreply.github.com> Date: Sat, 5 Jun 2021 00:03:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=93=BE=E6=8E=A5=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Home.vue | 75 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/src/views/Home.vue b/src/views/Home.vue index f8ebe12..29478c1 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -119,6 +119,7 @@ + +
+
+
ID:
+
{{ linkDetail.id }}
+
+
+
标题:
+
{{ linkDetail.title }}
+
+
+
链接:
+
+ {{ linkDetail.link }} +
+
+
+
更新:
+
{{ linkDetail.update }}
+
+
+
+ @@ -170,6 +199,14 @@ export default { debounce: null, keyword: '', type: 'all' + }, + // 链接详情 + linkDetail: { + show: false, + id: '', + title: '', + link: '', + update: '' } }; }, @@ -216,6 +253,26 @@ export default { this.searchLink.keyword = ''; }, + /** + * 查看详情 + * + * @param {object} datas 当前链接的数据 + */ + openDetail(datas) { + // 非链接 + if (datas.link === undefined) { + return; + } + + var detail = this.linkDetail; + + detail.id = datas.id; + detail.title = datas.title; + detail.link = datas.link; + detail.update = datas.update || '无'; + detail.show = true; + }, + /** * 打开链接 * @@ -525,4 +582,22 @@ export default { } } } + +/deep/ .link-detail { + width: 80%; + max-width: 32rem; + + .row { + line-height: 2rem; + + > div { + display: inline-block; + } + } + + .label { + width: 3.5em; + text-align: right; + } +}