From efeb30187b5d7c1340eff07c676ffafbefafbe64 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 03:11:33 -0800 Subject: [PATCH] feat(badge): [badge] optimize docs and API (#1302) --- examples/sites/demos/pc/app/badge/webdoc/badge.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/examples/sites/demos/pc/app/badge/webdoc/badge.js b/examples/sites/demos/pc/app/badge/webdoc/badge.js index 35daddd7f..cd1cf7a22 100644 --- a/examples/sites/demos/pc/app/badge/webdoc/badge.js +++ b/examples/sites/demos/pc/app/badge/webdoc/badge.js @@ -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': '

通过 type 设置显示主题,可选值: primarysuccesswarningdangerinfo

\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'" + } ] }