소스 검색

add link to NodeView

Axolotle 2 년 전
부모
커밋
eb3828a7f8
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/components/nodes/NodeViewTitle.vue

+ 2 - 1
src/components/nodes/NodeViewTitle.vue

@@ -12,7 +12,8 @@
       <slot name="default" />
       <span>
         <strong>{{ toCommaList(node.authors) }}</strong>,
-        <button-url v-if="url && node.piece" :link="node.piece" />
+        <button-url v-if="url && node.piece && node.piece.url" :link="node.piece" />
+        <button-url v-if="url && node.link && node.link.url" :link="node.link" />
       </span>
       <span>
         <span v-if="node.preTitle" v-html="' ' + trim(node.preTitle) + ','" />