@@ -73,6 +79,9 @@ Methods in [Universal Methods](js-components-common-methods.md) are not supporte
+```
+
+```css
/* xxx.css */
.doc-page {
flex-direction: column;
@@ -119,30 +128,33 @@ Methods in [Universal Methods](js-components-common-methods.md) are not supporte
background-color: #F2F2F2;
text-color: #0D81F2;
}
+```
+
+```js
// xxx.js
import prompt from '@system.prompt';
export default {
- showDialog(e) {
+ showDialog() {
this.$element('simpledialog').show()
},
- cancelDialog(e) {
+ cancelDialog() {
prompt.showToast({
message: 'Dialog cancelled'
})
},
- cancelSchedule(e) {
+ cancelSchedule() {
this.$element('simpledialog').close()
prompt.showToast({
message: 'Successfully cancelled'
})
},
- setSchedule(e) {
+ setSchedule() {
this.$element('simpledialog').close()
prompt.showToast({
message: 'Successfully confirmed'
})
},
- doubleclick(e){
+ doubleclick(){
prompt.showToast({
message: 'doubleclick'
})
@@ -150,4 +162,4 @@ export default {
}
```
-
\ No newline at end of file
+
diff --git a/en/application-dev/reference/arkui-ts/ts-container-badge.md b/en/application-dev/reference/arkui-ts/ts-container-badge.md
index 2bc7c61001496b4145f7c7266a27d90f65e87813..f3dd7c6710648b165208f64c7147e6f7a9c0758a 100644
--- a/en/application-dev/reference/arkui-ts/ts-container-badge.md
+++ b/en/application-dev/reference/arkui-ts/ts-container-badge.md
@@ -24,7 +24,7 @@ Create a badge.
| count | number | Yes| - | Number of notifications.|
| position | [BadgePosition](#badgeposition) | No| BadgePosition.RightTop | Position to display the badge relative to the parent component.|
| maxCount | number | No| 99 | Maximum number of notifications. When the maximum number is reached, only **maxCount+** is displayed.|
-| style | [BadgeStyle](#badgestyle) | Yes| - | Style of the badge, including the font color, font size, badge color, and badge size. |
+| style | [BadgeStyle](#badgestyle) | Yes| - | Style of the badge, including the font color, font size, badge color, and badge size.|
**Method 2**: Badge(value: {value: string, position?: BadgePosition, style: BadgeStyle})
@@ -36,7 +36,7 @@ Creates a badge based on the given string.
| -------- | -------- | -------- | -------- | -------- |
| value | string | Yes| - | Prompt content.|
| position | [BadgePosition](#badgeposition) | No| BadgePosition.RightTop | Position to display the badge relative to the parent component.|
-| style | [BadgeStyle](#badgestyle) | Yes| - | Style of the badge, including the font color, font size, badge color, and badge size. |
+| style | [BadgeStyle](#badgestyle) | Yes| - | Style of the badge, including the font color, font size, badge color, and badge size.|
## BadgePosition
@@ -47,12 +47,13 @@ Creates a badge based on the given string.
| Left | The badge is vertically centered on the left of the parent component.|
## BadgeStyle
-| Name| Type| Mandatory| Default Value| Description|
-| -------- | -------- | -------- | -------- | -------- |
-| color | [ResourceColor](ts-types.md#resourcecolor) | No| Color.White | Font color. |
-| fontSize | number \| string | No| 10 | Font size. |
-| badgeSize | number \| string | Yes| - | Badge size.|
-| badgeColor | [ResourceColor](ts-types.md#resourcecolor) | No| Color.Red | Badge color.|
+
+| Name | Type | Mandatory| Default Value | Description |
+| ---------- | ------------------------------------------ | ---- | ----------- | ------------------------------------------- |
+| color | [ResourceColor](ts-types.md#resourcecolor) | No | Color.White | Font color. |
+| fontSize | number \| string | No | 10 | Font size, in vp. |
+| badgeSize | number \| string | No | 16 | Badge size, in vp. This parameter cannot be set in percentage. If it is set to an invalid value, the default value is used.|
+| badgeColor | [ResourceColor](ts-types.md#resourcecolor) | No | Color.Red | Badge color. |
## Example