feat(badge): [badge] optimize docs and API (#1302)

This commit is contained in:
李天佑 2024-01-15 03:11:33 -08:00 committed by GitHub
parent 6a0858d3f8
commit efeb30187b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 3 deletions

View File

@ -14,7 +14,7 @@ export default {
},
{
'demoId': 'type',
'name': { 'zh-CN': '主样式', 'en-US': 'Theme Style' },
'name': { 'zh-CN': '主样式', 'en-US': 'Theme Style' },
'desc': {
'zh-CN':
'<p>通过 <code>type</code> 设置显示主题,可选值: <code>primary</code> 、<code>success</code> 、<code>warning</code> 、<code>danger</code> 、<code>info</code>。</p>\n',
@ -160,7 +160,7 @@ export default {
'defaultValue': '--',
'desc': {
'zh-CN':
"指定徽章显示的最大值,如果实际获取的徽章值超过该最大值,则以最大值后接一个 '+' 的形式显示徽章数,要求 value 是 number 类型",
"指定徽章显示的最大值如果实际获取的徽章值超过该最大值,则以最大值后接一个 '+' 的形式显示徽章数,要求 value 是 number 类型",
'en-US':
'Specifies the maximum number of badges to be displayed. If the actual badge value exceeds the maximum value, the number of badges is displayed in the format of "+". The value must be of the number type.'
},
@ -189,7 +189,8 @@ export default {
},
{
'name': 'type',
'type': "'primary' | 'success' | 'warning' | 'danger' | 'info'",
'type': 'IPtype',
'typeAnchorName': 'IPtype',
'defaultValue': "'danger'",
'desc': {
'zh-CN': '标记的类型',
@ -232,5 +233,12 @@ export default {
}
]
}
],
types: [
{
name: 'IPtype',
type: 'type',
code: "type IPtype = 'primary' | 'success' | 'warning' | 'danger' | 'info'"
}
]
}