Skip to content
Open
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
20 changes: 14 additions & 6 deletions src/cascader/cascader.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@
</view>
<view class="{{name}}__close-btn" bind:tap="hide">
<slot name="close-btn" />
<t-icon wx:if="{{closeBtn}}" size="24" name="close" />
<t-icon wx:if="{{closeBtn}}" aria-role="button" aria-label="关闭" size="24" name="close" />
</view>
<view class="{{name}}__content">
<block wx:if="{{steps && steps.length}}">
<view wx:if="{{theme == 'step'}}" class="{{name}}__steps">
<view wx:for="{{steps}}" wx:key="index" class="{{name}}__step" bind:tap="onStepClick" data-index="{{index}}">
<view
wx:for="{{steps}}"
wx:key="index"
class="{{name}}__step"
bind:tap="onStepClick"
data-index="{{index}}"
aria-role="{{ item === defaultOptionLabel ? 'text' : 'button' }}"
aria-label="{{ item === defaultOptionLabel ? item : '已选中,' + item }}"
>
<view
class="{{name}}__step-dot {{name}}__step-dot--{{item !== defaultOptionLabel ? 'active' : ''}} {{name}}__step-dot--{{index === steps.length - 1 ? 'last' : ''}}"
></view>
Expand All @@ -29,9 +37,9 @@
</t-tabs>
</block>
</block>
<view wx:if="{{ subTitles && subTitles[stepIndex] }}" class="{{name}}__options-title"
>{{subTitles[stepIndex]}}</view
>
<view wx:if="{{ subTitles && subTitles[stepIndex] }}" class="{{name}}__options-title">
{{subTitles[stepIndex]}}
</view>
<view
class="{{name}}__options-container"
style="width: {{items.length + 1}}00vw; transform: translateX(-{{stepIndex}}00vw)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个style去掉了,符合预期吗

Expand All @@ -44,7 +52,7 @@
scroll-y
scroll-top="{{scrollTopList[index]}}"
>
<view class="cascader-radio-group-{{index}}">
<view class="cascader-radio-group-{{index}}" aria-hidden="{{ stepIndex !== index}}">
<t-radio-group
value="{{selectedValue[index]}}"
keys="{{keys}}"
Expand Down