From 967e9ca278a1e750f43f6828328553531abefdf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A4=A9=E4=BD=91?= <66231260+You-Hw-Y@users.noreply.github.com> Date: Mon, 15 Jan 2024 00:42:52 -0800 Subject: [PATCH] feat(popconfirm): [popconfirm] optimize docs and API (#1301) --- .../pc/app/popconfirm/webdoc/popconfirm.cn.md | 4 ++-- .../pc/app/popconfirm/webdoc/popconfirm.js | 24 +++++++++++++++---- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/examples/sites/demos/pc/app/popconfirm/webdoc/popconfirm.cn.md b/examples/sites/demos/pc/app/popconfirm/webdoc/popconfirm.cn.md index ccbccd581..adab60c1e 100644 --- a/examples/sites/demos/pc/app/popconfirm/webdoc/popconfirm.cn.md +++ b/examples/sites/demos/pc/app/popconfirm/webdoc/popconfirm.cn.md @@ -1,7 +1,7 @@ --- -title: 气泡确认框组件 +title: Popconfirm 气泡确认框组件 --- -# 气泡确认框组件 +# Popconfirm 气泡确认框组件
通过 width
设置提示框宽度。
Set the width of the prompt box throughwidth
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"
+ }
]
}