Skip to content

Commit 195bf45

Browse files
authored
docs(Switch): added slot module content (#3963)
1 parent e550238 commit 195bf45

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

packages/components/switch/README.en-US.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ name | params | description
2323
-- | -- | --
2424
change | `(value: SwitchValue)` | \-
2525

26+
### Switch External Classes
27+
28+
className | Description
29+
-- | --
30+
t-class | \-
31+
t-class-body | \-
32+
t-class-dot | \-
33+
t-class-label | \-
34+
2635
### CSS Variables
2736

2837
The component provides the following CSS variables, which can be used to customize styles.

packages/components/switch/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ default-value | String / Number / Boolean | undefined | 开关值。非受控属
6767
-- | -- | --
6868
change | `(value: SwitchValue)` | 数据发生变化时触发
6969

70+
### Switch External Classes
71+
72+
类名 | 描述
73+
-- | --
74+
t-class | 根节点样式类
75+
t-class-body | 描述文本样式类
76+
t-class-dot | 滑块样式类
77+
t-class-label | 开关内容样式类
78+
7079
### CSS Variables
7180

7281
组件提供了下列 CSS 变量,可用于自定义样式。

packages/components/switch/switch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { prefix } = config;
66
const name = `${prefix}-switch`;
77
@wxComponent()
88
export default class Switch extends SuperComponent {
9-
externalClasses = ['t-class', 't-class-label', 't-class-body', 't-class-dot'];
9+
externalClasses = [`${prefix}-class`, `${prefix}-class-label`, `${prefix}-class-body`, `${prefix}-class-dot`];
1010

1111
behaviors = ['wx://form-field'];
1212

0 commit comments

Comments
 (0)