<template>
  <div class="body-m">
    <el-button @click="openTab">
      打开tab 页签
    </el-button>
  </div>
</template>

<script lang="ts">
import router from 'common/utils/router'
import { defineComponent } from 'vue-demi'

export default defineComponent({
  name: 'DemoIndex',
  setup () {
    function openTab () {
      const routeUrl = router.resolve({
        path: '/comp-example/table-columns-example'
      })
      window.open(routeUrl.href, '_blank')
    }

    return {
      openTab
    }
  }
})

</script>

<style scoped>
.body-m{
  padding: 20px;
}
</style>
