NUXTJS 中文网

Nuxt.js logo
  • Guides beta
  • 学习指南
  • API
  • 案例
  • 常见问题
  • Blog
  • 英文官网
Get Started
Concepts
Features
Directory Structure
Configuration Glossary
Internals Glossary

Components Glossary

  • The fetch Method
  • The head Method
  • The key Property
  • The layout Property
  • The loading Property
  • The middleware Property
  • The page `transition` Property
  • The scrollToTop Property
  • The validate Method
  • The watchQuery Property
Get Started
Concepts
Features
Directory Structure
Configuration Glossary
Internals Glossary

Components Glossary

  • Fetch Method
  • Head Method
  • Key Property
  • Layout Property
  • Loading Property
  • Middleware Property
  • Transition Property
  • scrollToTop Property
  • Validate Method
  • WatchQuery Property

版本 2.14.5

The layout Property

Every file (first level) in the layouts directory will create a custom layout accessible with the layout property in the page component.

  • Type: String or Function (default: 'default')

Use the layout key in your pages components to define which layout to use:

export default {
  layout: 'blog',
  // OR
  layout(context) {
    return 'blog'
  }
}
Key Property Loading Property

Discover

  • Design resources
  • A worldwide team
  • Blog

Follow

  • GitHub
  • Twitter
  • Discord

Support

  • Sponsor NuxtJS
  • The NuxtJS Shop
  • NuxtJS Consulting

友链

  • Bootstrap中文网
  • Vue
  • Gridsome
  • React
  • Next.js
  • Docusaurus
  • Blitz.js
  • Gatsby
  • Svelte
  • Sapper
  • Preact
  • NPM
  • Yarn
  • MDX
  • Markdown
  • Webpack
  • Rollup.js
  • Parcel
  • Deno
  • WebAssembly
  • TailwindCSS

NUXTJS

京ICP备15031610号-16
学习指南 API 案例 常见问题 Blog 英文官网