feat(popconfirm): [popconfirm] optimize docs and API (#1301)

This commit is contained in:
李天佑 2024-01-15 00:42:52 -08:00 committed by GitHub
parent eaa0a7890b
commit 967e9ca278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 7 deletions

View File

@ -1,7 +1,7 @@
---
title: 气泡确认框组件
title: Popconfirm 气泡确认框组件
---
# 气泡确认框组件
# Popconfirm 气泡确认框组件
<div>使用说明文字及操作按钮对较简单的操作进行二次确认。</div>

View File

@ -60,7 +60,7 @@ export default {
},
{
'demoId': 'width',
'name': { 'zh-CN': '设置宽度', 'en-US': 'Set width' },
'name': { 'zh-CN': '宽度', 'en-US': 'Set width' },
'desc': {
'zh-CN': '<p>通过 <code>width</code> 设置提示框宽度。</p>',
'en-US': '<p>Set the width of the prompt box through<code>width</code></ P>'
@ -115,8 +115,8 @@ export default {
},
{
'name': 'placement',
'type':
"'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end'",
'type': 'IPplacement',
'typeAnchorName': 'IPplacement',
'defaultValue': "'top'",
'desc': {
'zh-CN': '气泡提示框显示位置',
@ -156,7 +156,8 @@ export default {
},
{
'name': 'type',
'type': "'info' | 'success' | 'warning' | 'error' | Component",
'type': 'IPtype',
'typeAnchorName': 'IPtype',
'defaultValue': '--',
'desc': {
'zh-CN': '提示图标类型,可以传入自定义图标',
@ -184,7 +185,7 @@ export default {
'zh-CN': '点击确认按钮时触发',
'en-US': 'Triggered when confirm button is clicked'
},
'demoId': 'confirm-event'
'demoId': 'event'
},
{
'name': 'hide',
@ -230,5 +231,18 @@ export default {
}
]
}
],
types: [
{
name: 'IPplacement',
type: 'type',
code: "type IPplacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end'"
},
{
name: 'IPtype',
type: 'type',
code: "type IPtype = 'info' | 'success' | 'warning' | 'error' | Component"
}
]
}