<script setup lang="ts" name="dashboard">
import { getDataUrl } from '@/utils/fullScreenUrl'
import useUserStore from '@/store/modules/user'
const props = defineProps({
  name: {
    type: String,
    required: true,
  },
})
const user = useUserStore()
const $router = useRouter()
console.log(getDataUrl())
const newPage = ref(getDataUrl())
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)
})
</script>

