<template>
    <el-card class="m-5 w-screen-sm mt-[60px] m-auto">
      <!-- 异常状态 -->
      <el-result
          :icon="website.statusIcon || 'info'"
          :title="`${website.statusName || '404'}`"
          :sub-title="website.statusText || '页面找不到了 :('"
      >
        <template #extra>
          <el-button type="primary" v-if="website.statusUrl" @click="navigateTo(`${website.statusUrl}`)">{{ website.statusBtnText }}</el-button>
        </template>
      </el-result>

    </el-card>
</template>
<script setup lang="ts">
import {useWebsite} from "~/composables/configState";

const website = useWebsite()

const navigateTo = (url: string) => {
  window.location.href = url;
}
</script>
