Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust input max min default value #1421

Merged
merged 10 commits into from
Feb 27, 2025
4 changes: 2 additions & 2 deletions src/ActionSheet/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ In `index.json` Introducing Components in

### Basic use

> `ant-action-sheet` components must pass through `visible` Property controls the show/hide state.`actions` property to pass in the data-driven options rendering.
> `ant-action-sheet` Components must pass `visible` Property controls the show/hide state.`actions` property passes in the data to drive the options rendering.

```xml
<ant-action-sheet
Expand Down Expand Up @@ -106,7 +106,7 @@ Page({

### Option Status

> [actions](#actionsheetitem) Each of the provided `icon` `danger` `description` `disabled` Used to set the option state.
> [actions](#actionsheetitem) Each of the items provided `icon` `danger` `description` `disabled` Used to set the option state.

```xml
<ant-action-sheet
Expand Down
2 changes: 1 addition & 1 deletion src/AutoResize/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ In `index.json` Introducing Components in
| minFontSize | The minimum font size limit can be set according to the business. | number | 30 |
| maxFontSize | The original design font size of this area, which cannot exceed this font size at most. | number | 36 |
| wrap | Whether to support line feed | boolean | false |
| ratio | Copy width ratio, calculated `maxFontSize / ratio * length of copy`, there are scenes where the English characters are long but the container width is enough to display, but the font is reduced, which can be increased at this time. |
| ratio | Copy width ratio, calculated `maxFontSize / ratio * Copy length`, there are scenes where the English characters are long but the container width is enough to display, but the font is reduced, which can be increased at this time. |
52 changes: 26 additions & 26 deletions src/Badge/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ toc: 'content'

# Badge

A logo that displays a red dot, number, or text. Used to remind the user of pending matters or new updated quantities. Use when you need to display numbers, text, or little red dots in the upper right corner. It is suitable for prompting new messages, functions or services for productization, attracting users' attention through conspicuous visual forms and prompting them to perform related operations.
徽标,显示红点、数字或文字。用于提醒用户,有待处理的事项或者新的更新数量。当需要在右上角展示数字、文字或小红点时使用。适合于提示产品化的新消息、功能或服务等内容,通过显眼的视觉形式吸引用户注意,并促使其进行相关操作。

## Introduction
## 引入

In `index.json` Introducing Components in
`index.json` 中引入组件

```json
"usingComponents": {
Expand All @@ -26,9 +26,9 @@ In `index.json` Introducing Components in
}
```

## Code Sample
## 代码示例

### Basic use
### 基本使用

```xml
<ant-badge type="dot" position="top-right"><view class="box" /></ant-badge>
Expand All @@ -37,28 +37,28 @@ In `index.json` Introducing Components in
<ant-badge type="bubble" text="new" position="top-right"><view class="box" /></ant-badge>
```

### with border
### 带边框

```xml
<ant-badge stroke type="dot" position="top-right"><view class="box" /></ant-badge>
```

### Custom background and location
### 自定义背景和位置

```xml
<ant-badge type="dot" position="bottom-right"><view class="box" /></ant-badge>
<ant-badge type="dot" position="top-center" bgColor="#1677FF"><view class="box" /></ant-badge>
```

### Set Offset
### 设置偏移

```xml
<ant-badge type="dot" position="bottom-right" offsetX="-20px" offsetY="-14px">
<view class="box" />
</ant-badge>
```

### Custom Content
### 自定义内容

```xml
<ant-badge type="text" position="top-right">
Expand All @@ -67,31 +67,31 @@ In `index.json` Introducing Components in
</ant-badge>
```

### Demo Code
### Demo 代码

<code src="../../demo/pages/Badge/index"></code>

## API

| Property | Description | Type | Default Value |
| 属性 | 说明 | 类型 | 默认值 |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | ----------- |
| bgColor | Custom background color, CSS color values | string | - |
| className | Class name of the component root node | string | - |
| offsetX | Horizontal offset | string | '-50%' |
| offsetY | Offset in vertical direction | string | '-50%' |
| position | Position of the logo relative to the container, options include:`top-left`、`top-right`、`top-center`、`left`、`right`、`bottom-left`、`bottom-center` and `bottom-right` | string | `top-right` |
| stroke | Does the logo have a stroke | boolean | false |
| style | Custom Style | object | - |
| text | Logo content. Empty means that only red dots are displayed. It can be numbers or text. If the number exceeds 99, it will be displayed `...` | string \| number \| slot | - |
| type | Logo type, options include:`dot`(red dot),`number`(Number type, more than 99 will be automatically converted),`text`(text bubbles) and `bubble`(Bubble form, with arrow) | string | `dot` |
| bgColor | 自定义背景色,CSS 色值 | string | - |
| className | 组件根节点的类名 | string | - |
| offsetX | 水平方向偏移量 | string | '-50%' |
| offsetY | 垂直方向的偏移量 | string | '-50%' |
| position | 徽标相对于容器的位置,选项包括:`top-left`、`top-right`、`top-center`、`left`、`right`、`bottom-left`、`bottom-center` `bottom-right` | string | `top-right` |
| stroke | 徽标是否带有描边 | boolean | false |
| style | 自定义样式 | object | - |
| text | 徽标内容,为空代表仅展示红点;可以是数字或文字;若是数字且超过 99,则显示为 `...` | string \| number \| slot | - |
| type | 徽标类型,选项包括:`dot`(红点)、`number`(数字类型,超过 99 会自动转换)、`text`(文字气泡)和 `bubble`(气泡形态,带有箭头) | string | `dot` |

### Theme customization
### 主题定制

#### Style Variables
#### 样式变量

Component provides the following CSS variables, which can be used to customize styles. For more information, see ConfigProvider Components.
组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 ConfigProvider 组件。

| Variable name | Default Value | Dark Mode Default | Remarks |
| 变量名 | 默认值 | 深色模式默认值 | 备注 |
| ------------------------ | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -------------- |
| --badge-text-color | <div style="width: 150px; height: 30px; background-color: #ffffff; color: #000000;">#ffffff</div> | <div style="width: 150px; height: 30px; background-color: #ffffff; color: #000000;">#ffffff</div> | Badge Text Color |
| --badge-background-color | <div style="width: 150px; height: 30px; background-color: #ff3141; color: #ffffff;">#ff3141</div> | <div style="width: 150px; height: 30px; background-color: #ff4a58; color: #ffffff;">#ff4a58</div> | Badge background color |
| --badge-text-color | <div style="width: 150px; height: 30px; background-color: #ffffff; color: #000000;">#ffffff</div> | <div style="width: 150px; height: 30px; background-color: #ffffff; color: #000000;">#ffffff</div> | Badge 文字颜色 |
| --badge-background-color | <div style="width: 150px; height: 30px; background-color: #ff3141; color: #ffffff;">#ff3141</div> | <div style="width: 150px; height: 30px; background-color: #ff4a58; color: #ffffff;">#ff4a58</div> | Badge 背景颜色 |
4 changes: 2 additions & 2 deletions src/Button/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ The following table describes the API properties for the Button component:
| loading | Whether it is loading or not, it cannot be clicked during loading. | boolean | - |
| size | Button size. Only in `inline` Effective under, optional `small`、`medium`、`large` | string | `medium` |
| aide | Whether the button is a secondary button Only default and primary buttons consume this parameter | boolean | false |
| subText | Secondary text, displayed on the second line.`inline` Not effective | string | - |
| subText | Secondary text, displayed on the second line.`inline` Do not take effect | string | - |
| #if ALIPAY catchTap | Click the button to trigger this callback, non-bubbling | (e: [Event](https://opendocs.alipay.com/mini/framework/event-object)) => void | - |
| #if ALIPAY onTap | Click the button to trigger this callback | (e: [Event](https://opendocs.alipay.com/mini/framework/event-object)) => void | - |
| #if ALIPAY onDisabledTap | Click Departure Callback when disabled (not supported by WeChat) | (e: [Event](https://opendocs.alipay.com/mini/framework/event-object)) => void | - |
Expand Down Expand Up @@ -165,4 +165,4 @@ The following are additional properties that the Button component supports:

For specific attribute descriptions, please refer to the official documents of Alipay applet.

[Button Component Property Description](https://opendocs.alipay.com/mini/component/button#%E5%B1%9E%E6%80%A7%E8%AF%B4%E6%98%8E)
[Button component property description](https://opendocs.alipay.com/mini/component/button#%E5%B1%9E%E6%80%A7%E8%AF%B4%E6%98%8E)
6 changes: 3 additions & 3 deletions src/Calendar/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,10 @@ Component provides the following CSS variables, which can be used to customize s
| --calendar-cell-disabled-opacity | 0.4 | 0.4 | Calendar cell transparency disabled |
| --calendar-weekday-names-bg | <div style="width: 150px; height: 40px; background-color: #f8f8f8; color: #333333;">#f8f8f8</div> | <div style="width: 150px; height: 40px; background-color: #f8f8f8; color: #333333;">#f8f8f8</div> | Calendar Week Name Background Color |
| --calendar-default-color | <div style="width: 150px; height: 40px; background-color: #333333; color: #FFFFFF;">#333333</div> | <div style="width: 150px; height: 40px; background-color: #c5cad1; color: #000000;">#c5cad1</div> | Calendar default color |
| --calendar-selected-color | <div style="width: 150px; height: 40px; background-color: rgba(22, 119, 255, 0.1); color: #ffffff;">rgba(22, 119, 255, 0.1)</div> | <div style="width: 150px; height: 40px; background-color: rgba(22, 119, 255, 0.1); color: #ffffff;">rgba(22, 119, 255, 0.1)</div> | Calendar selected color |
| --calendar-selected-color | <div style="width: 150px; height: 40px; background-color: rgba(22, 119, 255, 0.1); color: #ffffff;">rgba(22, 119, 255, 0.1)</div> | <div style="width: 150px; height: 40px; background-color: rgba(22, 119, 255, 0.1); color: #ffffff;">rgba(22, 119, 255, 0.1)</div> | Calendar Selected Color |
| --calendar-assist-color | <div style="width: 150px; height: 40px; background-color: #999999; color: #FFFFFF;">#999999</div> | <div style="width: 150px; height: 40px; background-color: #616161; color: #FFFFFF;">#616161</div> | Calendar Auxiliary Color |
| --calendar-selected-end-color | <div style="width: 150px; height: 40px; background-color: #ffffff; color: #333333;">#ffffff</div> | <div style="width: 150px; height: 40px; background-color: #ffffff; color: #333333;">#ffffff</div> | Calendar selected end color |
| --calendar-selected-color | <div style="width: 150px; height: 40px; background-color: #1677ff; color: #FFFFFF;">#1677ff</div> | <div style="width: 150px; height: 40px; background-color: #3086ff; color: #FFFFFF;">#3086ff</div> | Calendar selected color |
| --calendar-selected-color | <div style="width: 150px; height: 40px; background-color: #1677ff; color: #FFFFFF;">#1677ff</div> | <div style="width: 150px; height: 40px; background-color: #3086ff; color: #FFFFFF;">#3086ff</div> | Calendar Selected Color |

## FAQ

Expand All @@ -278,7 +278,7 @@ For example, if we want to set the default start time to today and end time to s
[dayjs().startOf('date'), dayjs().add(7, 'days').startOf('date')];
```

### By `onFormatter` Set custom data for a cell
### By `onFormatter` Set custom data for cells

We can pass `onFormatter` method to set the custom data for the cell,`onFormatter` The format of is `(cell: CellState, currentValue: CalendarValue) => CellState`。

Expand Down
6 changes: 3 additions & 3 deletions src/Card/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ In `index.json` Introducing Components in
| title | Card Title | string | - |
| divider | Whether there is a dividing line | boolean | false |
| needFold | Whether a foldable card is required, the operateText needs to be empty, otherwise it needs to be manually unfolded and stowed. | boolean | false |
| foldStatus | Collapse or not, passing true will cause collapse, regardless of whether the needFold is true or not | boolean | false |
| foldStatus | Whether it is collapsed or not, passing true will cause it to be collapsed, regardless of whether the needFold is true or not. | boolean | false |
| headSticky | Does the title need ceiling | boolean | false |
| stickyTransparentTitle | Whether the ceiling is on the transparent head page, if so, the height of the transparent head will be calculated automatically. | boolean | false |
| stickyTop | How much distance from the top when the title is sucked | string | - |
| stickyTop | How much distance should the title be from the top when it is sucked | string | - |
| operateText | Default title bar right action button text | string | - |
| #if ALIPAY onOperateClick | Default title bar right operation button click callback | () => void | - |
| #if ALIPAY onFoldChange | Default title bar right collapse expand button click callback | () => void | - |
Expand All @@ -144,7 +144,7 @@ In `index.json` Introducing Components in

| Name | Description |
| ----------- | -------------------- |
| Default slot | Card Content |
| Default Slot | Card Content |
| headerTitle | Custom Title Bar Left Title |
| headerRight | Customize the right content of the title bar |

Expand Down
2 changes: 1 addition & 1 deletion src/Checkbox/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ Page({

#### Style Variables

Component provides the following CSS variables, which can be used to customize styles. For details, see ConfigProvider Components.
Component provides the following CSS variables, which can be used to customize styles. For more information, see ConfigProvider Components.

| Variable name | Default Value | Dark Mode Default | Remarks |
| ------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -------------------- |
Expand Down
Loading