网页 综合 更新时间 2026-11-13 15:32:31

API Reference | Vue.js

自动蜘蛛 vuejs.org 正文约 3933 字
API Reference | Vue.js
Skip to contentVue.jsSearchMain NavigationDocs Quick StartGuideTutorialExamplesAPIGlossaryError ReferenceVue 2 DocsMigration from Vue 2PlaygroundEcosystem ResourcesThemesUI ComponentsPlugins CollectionCertificationJobsT-Shirt ShopOfficial LibrariesVue RouterPiniaTooling GuideVideo CoursesVue MasteryVue SchoolHelpDiscord ChatGitHub DiscussionsDEV CommunityNewsBlogTwitterEventsNewslettersAbout FAQTeamReleasesCommunity GuideCode of ConductPrivacy PolicyThe DocumentarySupport SponsorPartners简体中文 日本語 Українська Français Deutsch 한국어 Português বাংলা Italiano فارسی Русский Čeština 繁體中文 Polski Help Us Translate!githubtwitterdiscordAppearancegithubtwitterdiscordAre you an LLM? You can read better optimized documentation at /api.md for this page in Markdown formatAPI ReferenceFilterGlobal APIApplicationcreateApp()createSSRApp()app.mount()app.unmount()app.onUnmount()app.component()app.directive()app.use()app.mixin()app.provide()app.runWithContext()app.versionapp.configapp.config.errorHandlerapp.config.warnHandlerapp.config.performanceapp.config.compilerOptionsapp.config.globalPropertiesapp.config.optionMergeStrategiesapp.config.idPrefixapp.config.throwUnhandledErrorInProductionGeneralversionnextTick()defineComponent()defineAsyncComponent()Composition APIsetup()Basic UsageAccessing PropsSetup ContextUsage with Render FunctionsReactivity: Coreref()computed()reactive()readonly()watchEffect()watchPostEffect()watchSyncEffect()watch()onWatcherCleanup()Reactivity: UtilitiesisRef()unref()toRef()toValue()toRefs()isProxy()isReactive()isReadonly()isShallow()Reactivity: AdvancedshallowRef()triggerRef()customRef()shallowReactive()shallowReadonly()toRaw()markRaw()effectScope()getCurrentScope()onScopeDispose()Lifecycle HooksonMounted()onUpdated()onUnmounted()onBeforeMount()onBeforeUpdate()onBeforeUnmount()onErrorCaptured()onRenderTracked()onRenderTriggered()onActivated()onDeactivated()onServerPrefetch()Dependency Injectionprovide()inject()hasInjectionContext()HelpersuseAttrs()useSlots()useModel()useTemplateRef()useId()Options APIOptions: StatedatapropscomputedmethodswatchemitsexposeOptions: RenderingtemplaterendercompilerOptionsslotsOptions: LifecyclebeforeCreatecreatedbeforeMountmountedbeforeUpdateupdatedbeforeUnmountunmountederrorCapturedrenderTrackedrenderTriggeredactivateddeactivatedserverPrefetchOptions: CompositionprovideinjectmixinsextendsOptions: MiscnameinheritAttrscomponentsdirectivesComponent Instance$data$props$el$options$parent$root$slots$refs$attrs$watch()$emit()$forceUpdate()$nextTick()Built-insDirectivesv-textv-htmlv-showv-ifv-elsev-else-ifv-forv-onv-bindv-modelv-slotv-prev-oncev-memov-cloakComponents<Transition><TransitionGroup><KeepAlive><Teleport><Suspense>Special Elements<component><slot><template>Special AttributeskeyrefisSingle-File ComponentSyntax SpecificationOverviewLanguage BlocksAutomatic Name InferencePre-Processorssrc ImportsComments<script setup>Basic SyntaxReactivityUsing ComponentsUsing Custom DirectivesdefineProps() & defineEmits()defineModel()defineExpose()defineOptions()defineSlots()useSlots() & useAttrs()Usage alongside normal <script>Top-level awaitImport StatementsGenericsRestrictionsCSS FeaturesScoped CSSCSS Modulesv-bind() in CSSAdvanced APIsCustom ElementsdefineCustomElement()useHost()useShadowRoot()this.$hostRender Functionh()mergeProps()cloneVNode()isVNode()resolveComponent()resolveDirective()withDirectives()withModifiers()Server-Side RenderingrenderToString()renderToNodeStream()pipeToNodeWritable()renderToWebStream()pipeToWebWritable()renderToSimpleStream()useSSRContext()data-allow-mismatchTypeScript Utility TypesPropType<T>MaybeRef<T>MaybeRefOrGetter<T>ExtractPropTypes<T>ExtractPublicPropTypes<T>ComponentCustomPropertiesComponentCustomOptionsComponentCustomPropsCSSPropertiesCustom RenderercreateRenderer()Compile-Time Flags__VUE_OPTIONS_API____VUE_PROD_DEVTOOLS____VUE_PROD_HYDRATION_MISMATCH_DETAILS__Configuration GuidesAPI Reference has loaded
访问原文 返回搜索 https://vuejs.org/api/
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。