소스 검색

check external link

HgH 2 년 전
부모
커밋
e22f438eab
2개의 변경된 파일과 3개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 0
      src/components/Widgets/ActionButton/ActionButton.vue
  2. 1 1
      src/components/Widgets/ActionButton/OptionPanel.vue

+ 2 - 0
src/components/Widgets/ActionButton/ActionButton.vue

@@ -78,6 +78,8 @@ export default {
         this.$router.push(this.options.route)
       } else if (this.options.action && this.options.action === 'event') {
         this.$bus.emit(this.options.eventName, this.eventArgs)
+      } else if (this.options.action && this.options.action === 'external-link') {
+        window.open(this.options.route, '_blank')
       }
     }
   }

+ 1 - 1
src/components/Widgets/ActionButton/OptionPanel.vue

@@ -150,7 +150,7 @@ export default defineComponent({
   },
   data () {
     return {
-      actionOptions: ['scroll', 'link', 'event'],
+      actionOptions: ['scroll', 'link', 'event', 'external-link'],
       positionOptions: ['top-right', 'top-left', 'bottom-right', 'bottom-left'],
       defaultOptions: {
         color: null,