问题原因: - request.js 响应拦截器已经提取了 res.data - 但页面代码中还在使用 res.data.records/res.data.total - 导致实际访问的是 undefined 修复内容: - role.vue: res.data.records -> res.records - menu.vue: res.data -> res - contact.vue: res.data.records -> res.records, res.data -> res 现在页面可以正确加载数据了
Vue 3 + Vite
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
Learn more about IDE Support for Vue in the Vue Docs Scaling up Guide.