diff --git a/docs/.vitepress/cache/deps/_metadata.json b/docs/.vitepress/cache/deps/_metadata.json index 46ed444..1fd4569 100644 --- a/docs/.vitepress/cache/deps/_metadata.json +++ b/docs/.vitepress/cache/deps/_metadata.json @@ -1,23 +1,23 @@ { - "hash": "1b54282b", - "browserHash": "555ddccc", + "hash": "02274044", + "browserHash": "6c7f6349", "optimized": { "vue": { "src": "../../../../node_modules/.pnpm/vue@3.3.8_typescript@5.2.2/node_modules/vue/dist/vue.runtime.esm-bundler.js", "file": "vue.js", - "fileHash": "7ebf57ee", + "fileHash": "ece1bcb5", "needsInterop": false }, "vitepress > @vue/devtools-api": { "src": "../../../../node_modules/.pnpm/@vue+devtools-api@6.5.1/node_modules/@vue/devtools-api/lib/esm/index.js", "file": "vitepress___@vue_devtools-api.js", - "fileHash": "4237f70d", + "fileHash": "3538dd85", "needsInterop": false }, "@theme/index": { "src": "../../../../node_modules/.pnpm/vitepress@1.0.0-rc.25_@algolia+client-search@4.20.0_@types+node@18.18.9_sass@1.69.5_search-in_dbo57d3nsic27itderipp75bdq/node_modules/vitepress/dist/client/theme-default/index.js", "file": "@theme_index.js", - "fileHash": "ee915d28", + "fileHash": "63f02da1", "needsInterop": false } }, diff --git a/docs/naive-ui-form.md b/docs/naive-ui-form.md index 4340584..f88934d 100644 --- a/docs/naive-ui-form.md +++ b/docs/naive-ui-form.md @@ -180,17 +180,9 @@ import { NConfigProvider, zhCN, dateZhCN, NMessageProvider } from 'naive-ui' ::: tip 提示 -如果您在表单中使用了`type: 'upload'`,则需要安装`naive-ui-upload` +- 如果表单中使用了`type: 'upload'`,则需要安装[naive-ui-upload](/naive-ui-upload),并注册该组件。 +- 如果表单中使用了`type: 'editpr'`,则需要安装[naive-ui-editor](/naive-ui-editor),并注册该组件。 -```shell -pnpm add naive-ui-upload -``` - -如果您在表单中使用了`type: 'editpr'`,则需要安装`naive-ui-editor` - -```shell -pnpm add naive-ui-editor -``` ::: ## 基本使用 @@ -215,7 +207,7 @@ import NaiveUiForm from 'naive-ui-form' const app = createApp(App) -app.use(NaiveUiForm, Option) +app.use(NaiveUiForm) ``` @@ -768,3 +760,58 @@ function handleSubmit(values: Recordable) { ``` +有时候需要获取整个表单值去做一些额外的事情,如表单校验。`ModalForm`组件暴露了`getValue`方法: +```vue + + + + + + + +```