Skip to content

Commit 5abe573

Browse files
committed
docs(switch): add loading
1 parent 2e7d1b2 commit 5abe573

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

docs/src/lib/i18n/zh/switch.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ export default {
1717
'你可以设置 activeValue 和 inactiveValue 属性, 它们接受 Boolean、String 或 Number 类型的值。',
1818
cswitch07010: '禁用状态',
1919
cswitch07020: '设置disabled属性,接受一个Boolean,设置true即可禁用。',
20+
cswitch08010: '加载状态',
21+
cswitch08020: '设置loading属性,接受一个Boolean,设置true即加载中状态。',
2022
};

docs/src/routes/component/switch/+page.svelte

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
1212
let value3 = '100';
1313
let value4 = true;
14+
let value5 = true;
1415
</script>
1516

1617
<h1>{$langFn('cswitch01010')}</h1>
@@ -158,5 +159,18 @@
158159
<SvelSwitch class="ml-2" />
159160
</Example>
160161

162+
<h2>{$langFn('cswitch08010')}</h2>
163+
<p>{$langFn('cswitch08020')}</p>
164+
165+
<Example
166+
code={`
167+
<SvelSwitch bind:value={value5} loading />
168+
<SvelSwitch class="ml-2" loading />
169+
`}
170+
>
171+
<SvelSwitch bind:value={value5} loading />
172+
<SvelSwitch class="ml-2" loading />
173+
</Example>
174+
161175
<style>
162176
</style>

0 commit comments

Comments
 (0)