使用<script setup>,在页面生命周期里调用后定义的方法,提示error: Unresolved reference: 方法名,调换位置之后就没有问题了,在Vue3项目中是没有出现过这种问题的。