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; + } +}