本文へスキップ
製品デスクトップツールTASTECAD図面の確認TASTEFILESファイル管理TASTEFTPファイル転送TASTESSHリモートワークスペースTASTEZIP圧縮と展開TASTEWINMファイル管理開発ツールTASTECODERust 統合開発環境TASTESTUDIO統合開発・テスト環境TASTEETLデータ統合(ETL)サーバーTASTEREMOTEリモートデスクトップサーバーTASTEGEO空間情報サーバーTASTEMAILメールワークスペース投資TASTESTOCK株式自動売買デスクトップアプリはじめるダウンロードドキュメント購入すべての製品
マーケットプレイス
ニュース
技術ニュース今日の開発ニュース開発ドキュメントプログラミング言語RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartWebフロントエンド フレームワークNext.jsReactVue.js · NuxtSvelteKitAngularサーバー フレームワークSpring BootDjangoFastAPIASP.NET CoreNestJS · Expressアプリ・デスクトップ フレームワークTauriFlutterReact NativeElectronアルゴリズムアルゴリズムの基礎主要アルゴリズム発展アルゴリズム実務のアルゴリズム
コミュニティプロジェクト開発ログプロンプトAIツールの問題ショーケースコミュニティガイド
協業技術移転ウェブサイト構築デスクトップアプリ構築リリース・決済パイプライン販売パートナーお問い合わせ
サービスリモートデスクトップインストールパッケージのカスタマイズ
TASTEDEV
製品

デスクトップツール

TASTECAD複雑な図面を、軽やかにひらくTASTEFILES必要なファイルだけを、最速でTASTEFTPファイルが行き交う、いちばん端正な道TASTESSHサーバーとあなたを、より確かにつなぐTASTEZIPより速くまとめ、より安全にひらくTASTEWINM2つの画面で整理する、キーボード中心のファイルマネージャー

開発ツール

TASTECODERust アプリの編集・ビルド・デバッグ・テストまでひとつのウィンドウでTASTESTUDIO編集からリモートテスト、承認した AI 修正までTASTEETL値を見ながら、データを運ぶ

サーバー

TASTEREMOTE自社サーバーで運用するリモートデスクトップTASTEGEOGeoServer 互換の空間情報サーバーを Rust で作り直しますTASTEMAILメールの主導権を、もう一度自分の手に

投資

TASTESTOCKいつ・何を。自分で決めたルールどおりに動く株式自動売買

はじめる

ダウンロード全製品の最新版ドキュメント各製品の使い方購入サブスクリプション・永久ライセンスすべての製品全製品を一覧で
すべての製品
マーケットプレイスニュース
技術

ニュース

今日の開発ニュース言語・フレームワーク・GitHub・AI の公式発表開発ドキュメント言語・フレームワーク・アルゴリズムのガイド

プログラミング言語

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

フレームワーク

Webフロントエンド フレームワークNext.jsReactVue.js · NuxtSvelteKitAngular
サーバー フレームワークSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
アプリ・デスクトップ フレームワークTauriFlutterReact NativeElectron

アルゴリズム

アルゴリズムの基礎計算量解析 · ソート · 探索 · 基本データ構造 · 木構造とヒープ主要アルゴリズムグラフ探索 · 最短経路と最小全域木 · 動的計画法 · 貪欲法 · 分割統治法 · バックトラッキング発展アルゴリズム文字列アルゴリズム · 数学と整数論 · ビット演算 · セグメント木 · Union-Find実務のアルゴリズムコーディング面接対策 · LRUキャッシュ · レート制限 · コンシステントハッシュ法
開発ドキュメントをすべて見る
コミュニティ
プロジェクトビルダーと作品を探す開発ログ決定と試行錯誤プロンプト再利用できる指示AIツールの問題Claude・Codex・Gemini の問題と回避策ショーケース完成した成果コミュニティガイドオープンにつくる方法
協業
技術移転Rust・egui でネイティブアプリを作るウェブサイト構築10言語、アカウント、ドキュメントとダウンロードデスクトップアプリ構築Rust・egui、WebView なしリリース・決済パイプライン署名・MSI・deb・rpm・AppImage・ハッシュ販売パートナー紹介して決済額の30%お問い合わせ構築・提携・投資のご相談
サービス
リモートデスクトップブラウザから自分のパソコンへインストールパッケージのカスタマイズ必要な機能だけ、設定は事前に
購入
JA
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
ログイン
ログイン
TASTEDEV

小さなツールから、より良い開発へ。

support@tastedev.netTASTEDEVを支援
製品製品ラインナップ購入ドキュメントダウンロードマーケットプレイスサポート
コミュニティプロジェクト開発ログプロンプトAIツールの問題ショーケース
ポリシー会社概要プライバシーポリシー利用規約サブスクリプション規約返金ポリシーコミュニティガイドライン
アカウントログイン新規登録
訪問者
今日
昨日
累計閲覧
商号
GXSOFT
代表者
CHOI YOUNG GU
事業者登録番号
853-44-00368
所在地
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
電話
+82-10-4404-1523
メール
whitecalvin@tastedev.net
個人情報保護責任者
CHOI YOUNG GU

© 2026 TASTEDEV製品情報は検証済みの開発ソースに基づいています。リリース・改善中

Vue.js · Nuxt ドキュメント
Vue.js · Nuxt
Getting Started with Vue and NuxtProject StructureCore Concepts: SFCs, Reactivity, Components, Nuxt RoutingData and StateTestingBuild and Deployment
ディスカッション

Vue.js · Nuxt ガイド · 3/6

Core Concepts: SFCs, Reactivity, Components, Nuxt Routing

この章は現在、英語でのみ提供しています。

This chapter covers the ideas you need to read and write Vue code: single-file components, the reactivity APIs, template directives, props and emits, and Nuxt's file-based routing and auto-imports.

Single-file components and the Composition API

A .vue file is made of three blocks: <script setup>, <template> and <style>. <script setup> is the concise syntax for the Composition API; every variable, function and imported component declared inside it is available in the template. Adding scoped to the style block limits those styles to the current component.

Reactivity: ref, reactive, computed, watch

ref wraps any value in a reactive container that you read and write through .value in script code (templates unwrap it for you). reactive makes an object itself reactive. computed caches a value derived from other state, and watch runs side effects when a value changes.

<script setup lang="ts">
import { ref, reactive, computed, watch } from "vue";

const query = ref("");
const filter = reactive({ onlyDone: false });
const todos = ref([
  { id: 1, text: "Learn Vue", done: true },
  { id: 2, text: "Try Nuxt", done: false },
]);

const visible = computed(() =>
  todos.value
    .filter((t) => !filter.onlyDone || t.done)
    .filter((t) => t.text.includes(query.value)),
);

watch(query, (next, prev) => {
  console.log(`query: ${prev} -> ${next}`);
});
</script>

<template>
  <input v-model="query" placeholder="Search" />
  <label><input type="checkbox" v-model="filter.onlyDone" /> Done only</label>
  <ul>
    <li v-for="todo in visible" :key="todo.id">{{ todo.text }}</li>
  </ul>
  <p v-if="visible.length === 0">No results.</p>
</template>

Keep computed pure. Anything that touches the outside world, such as API calls or logging, belongs in watch or watchEffect.

Template directives

DirectiveShorthandWhat it does
v-bind:href:hrefBinds a value to an attribute
v-on:click@clickHandles an event
v-modelTwo-way binding between an input and state
v-if / v-elseConditional rendering
v-showToggles visibility with CSS only
この章について質問がありますか?
前の章Project Structure次の章Data and State
v-forRenders a list; always provide :key

Components, props and emits

Parents pass data down through props, and children report changes up through events (emits). With TypeScript, you type defineProps and defineEmits directly.

<!-- components/TodoItem.vue -->
<script setup lang="ts">
const props = defineProps<{ text: string; done?: boolean }>();
const emit = defineEmits<{ toggle: []; remove: [reason: string] }>();
</script>

<template>
  <li :class="{ done: props.done }">
    <input type="checkbox" :checked="props.done" @change="emit('toggle')" />
    {{ props.text }}
    <button @click="emit('remove', 'user')">Remove</button>
  </li>
</template>

A parent uses it as <TodoItem :text="todo.text" :done="todo.done" @toggle="todo.done = !todo.done" />. Props are read-only, so a child asks for changes by emitting events instead of mutating them. When you need two-way binding, defineModel() connects directly to the parent's v-model. To let a parent inject content, render a <slot />.

File-based routing in Nuxt

In Nuxt, the path of a file in pages/ becomes its URL. Square brackets mark dynamic parameters.

pages/index.vue        ->  /
pages/about.vue        ->  /about
pages/posts/[id].vue   ->  /posts/:id
<!-- pages/posts/[id].vue -->
<script setup lang="ts">
const route = useRoute();
definePageMeta({ layout: "default" });
</script>

<template>
  <h1>Post {{ route.params.id }}</h1>
  <NuxtLink to="/">Back to list</NuxtLink>
</template>

Placing <NuxtPage /> in app.vue renders the page that matches the current URL, and <NuxtLink> navigates without a full page load.

Auto-imports

Notice that the example above has no import statements. Nuxt automatically imports Vue APIs such as ref and computed, Nuxt composables such as useRoute and useFetch, components from components/, and functions from composables/ and utils/. A file at components/base/Button.vue is prefixed by its folder and becomes <BaseButton>. If you prefer explicit imports, you can still write import { ref } from "#imports".

Summary

  • Everything declared in <script setup> is usable in the template.
  • Use ref through .value and reactive as a plain object; put derived values in computed and side effects in watch.
  • Data flows down through props; changes flow up through emits.
  • Nuxt builds routes from file paths in pages/ and auto-imports APIs, components and composables.

コメント 0件

人気のコメント順新しい順

ログイン · ログインするとコメントできます。