Skip to content

Commit 6f019d2

Browse files
committed
chore: address standardization review comments
1 parent febbe36 commit 6f019d2

3 files changed

Lines changed: 18 additions & 8 deletions

File tree

.github/workflows/surge-preview.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,23 @@ jobs:
2222
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
2323
with:
2424
persist-credentials: false
25+
- name: Check Surge token
26+
id: surge-token
27+
env:
28+
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
29+
run: |
30+
if [ -n "$SURGE_TOKEN" ]; then
31+
echo "enabled=true" >> "$GITHUB_OUTPUT"
32+
else
33+
echo "enabled=false" >> "$GITHUB_OUTPUT"
34+
fi
2535
- name: Build preview
26-
if: ${{ secrets.SURGE_TOKEN != '' }}
36+
if: ${{ steps.surge-token.outputs.enabled == 'true' }}
2737
run: |
2838
npm install
2939
npm run build
3040
- uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
31-
if: ${{ secrets.SURGE_TOKEN != '' }}
41+
if: ${{ steps.surge-token.outputs.enabled == 'true' }}
3242
env:
3343
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
3444
with:
@@ -38,5 +48,5 @@ jobs:
3848
failOnError: false
3949
setCommitStatus: false
4050
- name: Skip Surge preview
41-
if: ${{ secrets.SURGE_TOKEN == '' }}
51+
if: ${{ steps.surge-token.outputs.enabled != 'true' }}
4252
run: echo "SURGE_TOKEN is not configured; skip Surge preview."

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Then open `http://localhost:8000`.
100100

101101
| Name | Type | Description |
102102
| ------- | ------------------------- | ----------------------- |
103-
| `abort` | `(file?: RcFile) => void` | Abort an active upload. |
103+
| `abort` | `(file: RcFile) => void` | Abort an active upload. |
104104

105105
## Development
106106

README.zh-CN.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ npm start
7171
| `accept` | string \| AcceptConfig | - | input accept 配置。 |
7272
| `action` | string \| `(file) => string \| PromiseLike<string>` | - | 上传地址或异步解析函数。 |
7373
| `beforeUpload` | `(file, fileList) => BeforeUploadFileType \| Promise<void \| BeforeUploadFileType> \| void` | - | 上传前校验或转换文件。返回 false 可阻止上传。 |
74-
| `className` | string | - | 根className|
75-
| `classNames` | `{ input?: string }` | - | 语义className|
74+
| `className` | string | - | 根 className|
75+
| `classNames` | `{ input?: string }` | - | 语义化类名|
7676
| `component` | React.ComponentType<any> \| string | `'span'` | 根组件。 |
7777
| `customRequest` | CustomUploadRequestOption | - | 覆盖默认请求行为。 |
7878
| `data` | object \| `(file) => object` | `{}` | 额外上传数据。 |
@@ -91,7 +91,7 @@ npm start
9191
| `onSuccess` | `(response, file, xhr) => void` | - | 上传成功回调。 |
9292
| `openFileDialogOnClick` | boolean | true | 点击根节点时打开文件选择框。 |
9393
| `pastable` | boolean | false | 启用粘贴上传。 |
94-
| `prefixCls` | string | `'rc-upload'` | 前缀className|
94+
| `prefixCls` | string | `'rc-upload'` | 前缀 className|
9595
| `style` | React.CSSProperties | - | 根样式。 |
9696
| `styles` | `{ input?: React.CSSProperties }` | - | 语义化样式。 |
9797
| `withCredentials` | boolean | false | 随 Ajax 上传发送凭证。 |
@@ -100,7 +100,7 @@ npm start
100100

101101
| 名称 | 类型 | 说明 |
102102
| ------- | ------------------------- | ----------------------- |
103-
| `abort` | `(file?: RcFile) => void` | 中止进行中的上传。 |
103+
| `abort` | `(file: RcFile) => void` | 中止进行中的上传。 |
104104

105105
## 本地开发
106106

0 commit comments

Comments
 (0)