Skip to content

Commit f18c5f5

Browse files
committed
chore: address standardization review comments
1 parent 8f2283d commit f18c5f5

3 files changed

Lines changed: 24 additions & 13 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.zh-CN.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,44 +64,44 @@ npm start
6464
| --- | --- | --- | --- |
6565
| `activeKey` | string | - | 受控的活动 Tab 键。 |
6666
| `animated` | boolean \| AnimatedConfig | `{ inkBar: true, tabPane: false }` | 动画配置。 |
67-
| `className` | string | - | 附加className|
68-
| `classNames` | `Partial<Record<SemanticName, string>>` | - | 语义className|
67+
| `className` | string | - | 附加 className|
68+
| `classNames` | `Partial<Record<SemanticName, string>>` | - | 语义化类名|
6969
| `defaultActiveKey` | string | - | 初始活动 Tab 键。 |
70-
| `destroyOnHidden` | boolean | false | Destroy inactive tab panels. |
71-
| `direction` | `'ltr' \| 'rtl'` | `'ltr'` | Layout direction. |
70+
| `destroyOnHidden` | boolean | false | 销毁非活动标签页面板。 |
71+
| `direction` | `'ltr' \| 'rtl'` | `'ltr'` | 布局方向。 |
7272
| `editable` | EditableConfig | - | 可编辑标签页配置。 |
7373
| `getPopupContainer` | `(node: HTMLElement) => HTMLElement` | - | 弹层容器解析器。 |
7474
| `id` | string | - | 根 ID。 |
75-
| `indicator` | `{ size?: GetIndicatorSize; align?: 'start' \| 'center' \| 'end' }` | - | Indicator size and alignment. |
75+
| `indicator` | `{ size?: GetIndicatorSize; align?: 'start' \| 'center' \| 'end' }` | - | 指示器尺寸和对齐方式。 |
7676
| `items` | Tab[] | [] | 选项卡项目。 |
7777
| `locale` | TabsLocale | - | 无障碍本地化文本。 |
7878
| `more` | MoreProps | - | 溢出下拉菜单配置。 |
7979
| `onChange` | `(activeKey: string) => void` | - | 当活动选项卡更改时触发。 |
8080
| `onTabClick` | `(activeKey, event) => void` | - | 单击选项卡时触发。 |
8181
| `onTabScroll` | `({ direction }) => void` | - | 当选项卡导航滚动时触发。 |
82-
| `prefixCls` | string | `'rc-tabs'` | 前缀className|
82+
| `prefixCls` | string | `'rc-tabs'` | 前缀 className|
8383
| `renderTabBar` | RenderTabBar | - | 自定义标签栏渲染函数。 |
8484
| `style` | React.CSSProperties | - | 根样式。 |
8585
| `styles` | `Partial<Record<SemanticName, React.CSSProperties>>` | - | 语义化样式。 |
8686
| `tabBarExtraContent` | React.ReactNode \| TabBarExtraMap | - | 标签栏旁的额外内容。 |
8787
| `tabBarGutter` | number | 0 | 选项卡之间的间隙。 |
8888
| `tabBarStyle` | React.CSSProperties | - | 标签栏样式。 |
89-
| `tabPosition` | `'left' \| 'right' \| 'top' \| 'bottom'` | `'top'` | Tab position. |
89+
| `tabPosition` | `'left' \| 'right' \| 'top' \| 'bottom'` | `'top'` | 标签页位置。 |
9090

9191
### Tab
9292

9393
| 名称 | 类型 | 默认值 | 说明 |
9494
| --- | --- | --- | --- |
9595
| `children` | React.ReactNode | - | 选项卡面板内容。 |
96-
| `className` | string | - | 面板className称|
96+
| `className` | string | - | 面板 className|
9797
| `closable` | boolean | - | 是否可以在可编辑模式下关闭选项卡。 |
9898
| `closeIcon` | React.ReactNode | - | 自定义关闭图标。 |
9999
| `destroyOnHidden` | boolean | false | 销毁非活动面板。 |
100100
| `disabled` | boolean | false | 禁用该选项卡。 |
101101
| `forceRender` | boolean | false | 在面板变为活动状态之前渲染面板。 |
102102
| `key` | string | - | 需要唯一的 Tab 键。 |
103-
| `label` | React.ReactNode | - | Tab label. |
104-
| `style` | React.CSSProperties | - | 面板风格|
103+
| `label` | React.ReactNode | - | Tab 标签内容。 |
104+
| `style` | React.CSSProperties | - | 面板样式|
105105

106106
## 本地开发
107107

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
},
3636
"include": [
3737
".dumirc.ts",
38+
".fatherrc.ts",
3839
"src",
3940
"tests",
4041
"docs/examples"

0 commit comments

Comments
 (0)