feat: 更新路由名称映射,调整插件配置

This commit is contained in:
严浩
2024-12-25 11:12:29 +08:00
parent 7a682b1ea6
commit 99c8e8d892
5 changed files with 2 additions and 5 deletions

25
src/pages/api.page.vue Normal file
View File

@ -0,0 +1,25 @@
<template>
<pre>{{ JSON.stringify(fakeApiResult, null, 2) }}</pre>
<!-- <div>{{ npmRegistryApiResult?.['_id'] }}</div> -->
</template>
<script setup lang="ts">
const baseURL = '/fake-api';
let fakeApiResult = $ref<Record<string, unknown> | null>(null);
fetch(`${baseURL}/mock/get-user-info`)
.then((response) => response.json())
.then((json) => (fakeApiResult = json));
/* fetch('https://jsonplaceholder.typicode.com/posts/1')
.then((response) => response.json())
.then((json) => console.log(json)); */
// let npmRegistryApiResult = $ref<Record<string, any> | null>(null);
// fetch('/npm-registry-api/@vue%2Fbabel-plugin-jsx')
// .then((response) => response.json())
// .then((json) => npmRegistryApiResult = json);
</script>
<style scoped></style>