Skip to content
Grok

Vue Built-ins

Directives

Directives พื้นฐานของ Vue ที่ใช้ใน Template สำหรับการจัดการ DOM และการ bind ข้อมูล

DirectiveDescriptionCategory
vuejs.org faviconv-textกำหนดข้อความใน elementBasic
vuejs.org faviconv-htmlแทรก HTML (ระวัง XSS)Basic
vuejs.org faviconv-showแสดง/ซ่อน element ด้วย CSSConditional
vuejs.org faviconv-ifแสดง element ตามเงื่อนไขConditional
vuejs.org faviconv-elseใช้ร่วมกับ v-ifConditional
vuejs.org faviconv-else-ifเงื่อนไขเพิ่มเติมConditional
vuejs.org faviconv-forLoop ข้อมูลList
vuejs.org faviconv-onฟังเหตุการณ์ (@ shorthand)Event
vuejs.org faviconv-bindผูกข้อมูล (: shorthand)Binding
vuejs.org faviconv-modelTwo-way bindingForm
vuejs.org faviconv-slotตั้งชื่อ slot (# shorthand)Slot
vuejs.org faviconv-preไม่ compile templateBasic
vuejs.org faviconv-onceRender แค่ครั้งเดียวBasic
vuejs.org faviconv-memoMemoize templateBasic
vuejs.org faviconv-cloakซ่อน template จนกว่า Vue จะโหลดเสร็จBasic

Components

Component พื้นฐานของ Vue สำหรับการจัดการ Transition, KeepAlive, และการทำงานกับ DOM

ComponentDescriptionCategory
vuejs.org favicon<Transition>ใช้สำหรับ animation/transitionAnimation
vuejs.org favicon<KeepAlive>เก็บ component ใน memoryState
vuejs.org favicon<Teleport>ย้าย component ไปยัง DOM อื่นDOM
vuejs.org favicon<Suspense>จัดการ async componentAsync

Special Elements

ElementDescriptionCategory
vuejs.org favicon<component>Dynamic componentComponent
vuejs.org favicon<slot>Content distributionSlot
vuejs.org favicon<template>Template fragmentTemplate

Special Attributes

AttributeDescriptionCategory
vuejs.org faviconkeyระบุตัวตนของ elementRendering
vuejs.org faviconrefอ้างอิงถึง element/componentReference
vuejs.org faviconisDynamic componentComponent