示例说明 ·
Callout
This is a
callout with full markdown support. It can be used to link to another page.This suggests a helpful tip.
Card
Components
Discover all the components available in Nuxt UI Pro.
CardGroup
CodeBlock
Terminal
code <project-name>
code <project-name>
CodeGroup
npx nuxi@latest init <project-name>
Field
namerequired
string
The description can be set as prop or in the default slot with full markdown support.
FieldGroup
validate (path?: string, opts: { silent?: boolean })
Promise<T>
Triggers form validation. Will raise any errors unless opts.silent is set to true.
clear (path?: string)
void
Clears form errors associated with a specific path. If no path is provided, clears all form errors.
getErrors (path?: string)
FormError[]
Retrieves form errors associated with a specific path. If no path is provided, returns all form errors.
setErrors (errors: FormError[], path?: string)
void
Sets form errors for a given path. If no path is provided, overrides all errors.
errors
Ref<FormError[]>
A reference to the array containing validation errors. Use this to access or manipulate the error information.
ReadMore
Shortcut
KK
Tabs
::callout
Lorem velit voluptate ex reprehenderit ullamco et culpa.
::
Tip
If you are familiar with Vue, you might wonder where
main.js is (the file that normally creates a Vue app). Nuxt does this behind the scene.Well done! A browser window should automatically open for http://localhost:3000.
Note
You don't have to use TypeScript to build an application with Nuxt. However, it is strongly recommended to use the
.ts extension for the nuxt.config file. This way you can benefit from hints in your IDE to avoid typos and mistakes while editing your configuration.Warning 警告
This is likely to need code changes in your project.
Important 重要
This method does not allow you to provide reactive data. We recommend to use
useHead() in app.vue.Caution 谨慎
Be very careful before proxying headers to an external API and just include headers that you need. Not all headers are safe to be bypassed and might introduce unwanted behavior. Here is a list of common headers that are NOT to be proxied:
host,acceptcontent-length,content-md5,content-typex-forwarded-host,x-forwarded-port,x-forwarded-protocf-connecting-ip,cf-ray
