Skip to content

Commit e16b82e

Browse files
committed
chore: address standardization review comments
1 parent c092a17 commit e16b82e

2 files changed

Lines changed: 19 additions & 9 deletions

File tree

.github/workflows/surge-preview.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,23 @@ jobs:
1818
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
1919
with:
2020
persist-credentials: false
21+
- name: Check Surge token
22+
id: surge-token
23+
env:
24+
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
25+
run: |
26+
if [ -n "$SURGE_TOKEN" ]; then
27+
echo "enabled=true" >> "$GITHUB_OUTPUT"
28+
else
29+
echo "enabled=false" >> "$GITHUB_OUTPUT"
30+
fi
2131
- name: Build preview
22-
if: ${{ secrets.SURGE_TOKEN != '' }}
32+
if: ${{ steps.surge-token.outputs.enabled == 'true' }}
2333
run: |
2434
npm install
2535
npm run build
2636
- uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
27-
if: ${{ secrets.SURGE_TOKEN != '' }}
37+
if: ${{ steps.surge-token.outputs.enabled == 'true' }}
2838
env:
2939
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
3040
with:
@@ -34,5 +44,5 @@ jobs:
3444
failOnError: false
3545
setCommitStatus: false
3646
- name: Skip Surge preview
37-
if: ${{ secrets.SURGE_TOKEN == '' }}
47+
if: ${{ steps.surge-token.outputs.enabled != 'true' }}
3848
run: echo "SURGE_TOKEN is not configured; skip Surge preview."

README.zh-CN.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ npm start
8080
| 参数 | 说明 | 类型 | 默认值 |
8181
| -------------- | ------------------------------------------ | -------------------------------------- | ------------- |
8282
| checked | 复选框是否被选中 | boolean | - |
83-
| className | 附加className | string | - |
83+
| className | 附加 className | string | - |
8484
| defaultChecked | 复选框是否默认选中 | boolean | false |
8585
| disabled | 复选框是否禁用 | boolean | false |
8686
| name | 与原生 checkbox input 一致 `name` | string | - |
87-
| prefixCls | 组件className前缀 | string | `rc-checkbox` |
88-
| 风格 | 包装器的内联样式 | `React.CSSProperties` | - |
87+
| prefixCls | 组件 className 前缀 | string | `rc-checkbox` |
88+
| style | 包装器的内联样式 | `React.CSSProperties` | - |
8989
| type | 原生输入类型 | string | `checkbox` |
90-
| 价值 | 与原生 checkbox input 一致 `value` | 字符串\|数字\|只读字符串[] | - |
90+
| value | 与原生 checkbox input 一致 `value` | string \| number \| readonly string[] | - |
9191
| onChange | 勾选状态改变时回调 | `(event: CheckboxChangeEvent) => void` | - |
9292

9393
还支持其他本机输入属性。
@@ -96,8 +96,8 @@ npm start
9696

9797
| 参数 | 说明 | 类型 |
9898
| ------------- | ------------------------------ | ---------------------------------- |
99-
| 模糊 | 从复选框中移除焦点 | `() => void` |
100-
| 重点 | 聚焦复选框 | `(options?: FocusOptions) => void` |
99+
| blur | 从复选框中移除焦点 | `() => void` |
100+
| focus | 聚焦复选框 | `(options?: FocusOptions) => void` |
101101
| input | 原生输入元素 | `HTMLInputElement \| null` |
102102
| nativeElement | 包装元素 | `HTMLElement \| null` |
103103

0 commit comments

Comments
 (0)