瀏覽代碼

check external link

HgH 2 年之前
父節點
當前提交
e22f438eab

+ 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,