mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-03-07 13:48:31 +08:00
docs: some fixes
This commit is contained in:
parent
c9fb32d058
commit
d1d52fdc4c
@ -1,4 +1,4 @@
|
||||
# With Header
|
||||
# With header
|
||||
|
||||
Use `header` slot to customize header.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Manually Positioned
|
||||
# Manually positioned
|
||||
|
||||
Click it.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# No Arrow
|
||||
# No arrow
|
||||
|
||||
```html
|
||||
<n-popover trigger="hover" :show-arrow="false">
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Raw Content
|
||||
# Raw content
|
||||
|
||||
```html
|
||||
<n-popover trigger="hover" raw :show-arrow="false">
|
||||
|
@ -1,12 +1,20 @@
|
||||
# Body Style
|
||||
# Body style
|
||||
|
||||
Set style attribute to style the popover.
|
||||
|
||||
```html
|
||||
<n-popover :style="{ width: '500px' }" trigger="hover">
|
||||
<template #trigger>
|
||||
<n-button> Width 500px </n-button>
|
||||
</template>
|
||||
<span>Looks like a bar</span>
|
||||
</n-popover>
|
||||
<n-space>
|
||||
<n-popover :style="{ width: '500px' }" trigger="hover">
|
||||
<template #trigger>
|
||||
<n-button>Width 500px</n-button>
|
||||
</template>
|
||||
Looks like a bar
|
||||
</n-popover>
|
||||
<n-popover :style="{ maxWidth: '100px' }" trigger="hover">
|
||||
<template #trigger>
|
||||
<n-button style="margin:0;">Max width 100px</n-button>
|
||||
</template>
|
||||
Who kicks a hole in the sky so the heaven cry over me.
|
||||
</n-popover>
|
||||
</n-space>
|
||||
```
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Use Trigger Width
|
||||
# Use trigger width
|
||||
|
||||
Set `width="trigger"` to make popover's width the same as its trigger.
|
||||
|
||||
|
@ -6,15 +6,15 @@
|
||||
<n-space>
|
||||
<n-popover :style="{ width: '500px' }" trigger="hover">
|
||||
<template #trigger>
|
||||
<n-button style="margin:0;"> 宽度 500px </n-button>
|
||||
<n-button style="margin:0;">宽度 500px</n-button>
|
||||
</template>
|
||||
<span>长得像根条一样</span>
|
||||
长得像根条一样
|
||||
</n-popover>
|
||||
<n-popover :style="{ maxWidth: '100px' }" trigger="hover">
|
||||
<template #trigger>
|
||||
<n-button style="margin:0;"> 最大宽度 100px </n-button>
|
||||
<n-button style="margin:0;">最大宽度 100px</n-button>
|
||||
</template>
|
||||
<span>内容长度不确定的时候,设置最大宽度可能更好看</span>
|
||||
内容长度不确定的时候,设置最大宽度可能更好看
|
||||
</n-popover>
|
||||
</n-space>
|
||||
```
|
||||
|
@ -48,7 +48,7 @@ download
|
||||
| show-preview-button | `boolean` | `true` | Show a preview button (when `list-type` is `image-card`). Use the `on-preview` callback for this event. | |
|
||||
| show-remove-button | `boolean` | `true` | Show a remove button (after upload completed). Use the `on-remove` callback for this event. | |
|
||||
| show-retry-button | `boolean` | `true` | Show a retry button (for a failed upload). | |
|
||||
| show-trigger | `boolean` | `true` | Show upload trigger. | NEXT_VERSION |
|
||||
| show-trigger | `boolean` | `true` | Show upload trigger. | 2.21.5 |
|
||||
| with-credentials | `boolean` | `false` | Any credentials to be sent with the request (e.g. cookie). | |
|
||||
| on-change | `(options: { file: UploadFileInfo, fileList: Array<UploadFileInfo>, event?: Event }) => void` | `() => {}` | Uploaded file(s) status change callback. | |
|
||||
| on-update:file-list | `(fileList: UploadFileInfo[]) => void` | `undefined` | Callback function triggered on file-list changes. | |
|
||||
|
@ -49,7 +49,7 @@ retry-debug
|
||||
| show-retry-button | `boolean` | `true` | 是否显示重新上传按钮(在 error 时展示) | |
|
||||
| show-file-list | `boolean` | `true` | 是否显示文件列表 | |
|
||||
| show-preview-button | `boolean` | `true` | 是否允许显示预览按钮(在 `list-type` 为 `image-card` 时生效) | |
|
||||
| show-trigger | `boolean` | `true` | 是否显示触发元素 | NEXT_VERSION |
|
||||
| show-trigger | `boolean` | `true` | 是否显示触发元素 | 2.21.5 |
|
||||
| with-credentials | `boolean` | `false` | 是否携带 Cookie | |
|
||||
| on-change | `(options: { file: UploadFileInfo, fileList: Array<UploadFileInfo>, event?: Event }) => void` | `() => {}` | 组件状态变化的回调,组件的任何文件状态变化都会触发回调 | |
|
||||
| on-finish | `(options: { file: UploadFileInfo, event: Event }) => UploadFileInfo \| void` | `({ file }) => file` | 文件上传结束的回调,可以修改传入的 UploadFileInfo 或者返回一个新的 UploadFileInfo。注意:file 将会下一次事件循环中被置为 null | |
|
||||
|
Loading…
Reference in New Issue
Block a user