<template>
  <ht-query-sql-preview :view-id="viewId"></ht-query-sql-preview>
</template>

<script>
  export default {
    name: 'QuerySqlPreview',
    props: {
      sqlViewId: {
        type: String,
        default: '',
      },
    },
    data() {
      return {
        viewId: this.sqlViewId,
      }
    },
    created() {
      if (!this.viewId && this.$route.meta.sqlViewId) {
        this.viewId = this.$route.meta.sqlViewId
      }
    },
    mounted() {},
  }
</script>
