File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
src/uni_modules/wot-design-uni/components/wd-step Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1212` active ` 为步骤进度,为 number 类型,步骤的下标。
1313
1414``` html
15- <wd-steps :active =" 0 " >
15+ <wd-steps :active =" active " >
1616 <wd-step />
1717 <wd-step />
1818 <wd-step />
1919</wd-steps >
2020```
2121
22+ ``` ts
23+ const active = ref <number >(0 )
24+
25+ function nextStep() {
26+ active .value = active .value + 1
27+ }
28+
29+ ```
30+
2231## 水平居中
2332
2433设置 ` align-center ` 水平居中,只对横向步骤条有效。
3645可以通过 ` title ` 和 ` description ` 设置步骤的标题和描述信息。如果不设置标题,则会使用默认的文案。
3746
3847``` html
39- <wd-steps :active =" 0 " align-center >
48+ <wd-steps :active =" active " align-center >
4049 <wd-step title =" 步骤1" description =" 注册1个账号" />
4150 <wd-step title =" 步骤2" description =" 登录账号并绑定手机" />
4251 <wd-step title =" 步骤3" description =" 完善个人信息" />
Original file line number Diff line number Diff line change 2525 <text v-else >{{ currentTitle }}</text >
2626 </view >
2727 <view v-if =" $slots.description || description" class =" wd-step__description" >
28- <slot v-if =" $slots.description" name =" description" />
28+ <slot v-if =" $slots.description" name =" description" />
2929 <text v-else >{{ description }}</text >
3030 </view >
3131 </view >
You can’t perform that action at this time.
0 commit comments