Skip to content

Commit

Permalink
📃 docs: 文档修改
Browse files Browse the repository at this point in the history
  • Loading branch information
ashuicoder committed Dec 14, 2023
1 parent 553240f commit 51fc8c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
10 changes: 5 additions & 5 deletions docs/.vitepress/cache/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"hash": "2a002bef",
"browserHash": "aa528e9d",
"hash": "1b54282b",
"browserHash": "555ddccc",
"optimized": {
"vue": {
"src": "../../../../node_modules/.pnpm/[email protected][email protected]/node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "246c2fe0",
"fileHash": "7ebf57ee",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../../node_modules/.pnpm/@[email protected]/node_modules/@vue/devtools-api/lib/esm/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "69fbb1f9",
"fileHash": "4237f70d",
"needsInterop": false
},
"@theme/index": {
"src": "../../../../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected]_search-in_dbo57d3nsic27itderipp75bdq/node_modules/vitepress/dist/client/theme-default/index.js",
"file": "@theme_index.js",
"fileHash": "14df790b",
"fileHash": "ee915d28",
"needsInterop": false
}
},
Expand Down
20 changes: 7 additions & 13 deletions docs/naive-ui-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ pnpm add naive-ui-form
}
```

`naive-ui`已经配置到项目中:
确保`naive-ui`已经配置到项目中:

```vue
<template>
Expand Down Expand Up @@ -186,6 +186,11 @@ import { NConfigProvider, zhCN, dateZhCN, NMessageProvider } from 'naive-ui'
pnpm add naive-ui-upload
```

如果您在表单中使用了`type: 'editpr'`,则需要安装`naive-ui-editor`

```shell
pnpm add naive-ui-editor
```
:::

## 基本使用
Expand Down Expand Up @@ -213,18 +218,7 @@ const app = createApp(App)
app.use(NaiveUiForm, Option)
```

`Option`类型:

```ts
type RequestFun = (file: File, onProgerss?: (e: { percent: number }) => void) => Promise<string>

interface Option {
// `naive-ui-upload`
upload: {
requestFunc?: RequestFun
}
}
```

### props传值方式

Expand Down Expand Up @@ -256,7 +250,7 @@ interface Option {

::: tip 提示

如果`props``useForm()`传值有冲突,`useForm`的值为准
如果`props``useForm()`传值有冲突,`useForm`会覆盖`props`

:::

Expand Down

0 comments on commit 51fc8c0

Please sign in to comment.