<script setup lang="ts" name="dashboard">
import useUserStore from '@/store/modules/user'
const props = defineProps({
  name: {
    type: String,
    required: true,
  },
})
const { proxy } = getCurrentInstance() as any
const user = useUserStore()
const $router = useRouter()
const newPage = ref(proxy.config.DataVUrl)
const current = () => {
  return newPage.value.filter(item => item.name === props.name)[0]
}
current()
onMounted(() => {
  window.open(`${current().url}?token=${user.token}`, '_blank')
  $router.go(-1)
  console.log(current().url)
})
</script>

