Bootstrap

import { useRouter } from ‘vue-router‘打印useRouter为undefined

定义的router要写在函数外层

错误代码:

<script setup>
import {
    reactive } from 'vue'
import {
    useRouter } from 'vue-router'
import {
    ElMessage, ElMessageBox } from 'element-plus'

// 登录
const login = () => {
   
  if (formData.userName =
;