その他

Nuxtメモ

kurumin

<table>タグの子要素に直接<tr>タグを使用するとエラーになる

warning: cannot be child of , according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.

theadやtbodyを使用すればOK。

リンクが静的な場合to、動的な場合:to

サーバーサイドでAPIを作成して処理

/* src/server/api/hello.ts */
export default () => 'Hello Server API'
<!-- src/pages/index.vue -->
<script setup lang="ts">

const { data: message } = await useFetch('/api/hello')

</script>
<template>
    <div>
        <h1 style="
        font-size:50px;
        text-align:center;
        margin:100px 0 auto;
        ">{{ message }}</h1>
    </div>
</template> 

ABOUT ME
記事URLをコピーしました