Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/components/switch/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ name | params | description
-- | -- | --
change | `(value: SwitchValue)` | \-

### Switch External Classes

className | Description
-- | --
t-class | \-
t-class-body | \-
t-class-dot | \-
t-class-label | \-

### CSS Variables

The component provides the following CSS variables, which can be used to customize styles.
Expand Down
9 changes: 9 additions & 0 deletions packages/components/switch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ default-value | String / Number / Boolean | undefined | 开关值。非受控属
-- | -- | --
change | `(value: SwitchValue)` | 数据发生变化时触发

### Switch External Classes

类名 | 描述
-- | --
t-class | 根节点样式类
t-class-body | 描述文本样式类
t-class-dot | 滑块样式类
t-class-label | 开关内容样式类

### CSS Variables

组件提供了下列 CSS 变量,可用于自定义样式。
Expand Down
2 changes: 1 addition & 1 deletion packages/components/switch/switch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { prefix } = config;
const name = `${prefix}-switch`;
@wxComponent()
export default class Switch extends SuperComponent {
externalClasses = ['t-class', 't-class-label', 't-class-body', 't-class-dot'];
externalClasses = [`${prefix}-class`, `${prefix}-class-label`, `${prefix}-class-body`, `${prefix}-class-dot`];

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

Expand Down
Loading