Skip to content

Commit

Permalink
fix(cascader): 修复在 Popup 中的滑动问题 (#2465)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu authored Aug 1, 2023
1 parent 10612a9 commit 3b61a94
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
32 changes: 17 additions & 15 deletions src/packages/__VUE/cascader/cascader-item.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@
<template v-if="!initLoading && panes.length">
<nut-tab-pane v-for="(pane, index) in panes" :title="formatTabTitle(pane)" :key="index">
<view role="menu" class="nut-cascader-pane">
<template v-for="node in pane.nodes" :key="node.value">
<view
class="nut-cascader-item"
:aria-checked="isSelected(pane, node)"
:aria-disabled="node.disabled || undefined"
:class="{ active: isSelected(pane, node), disabled: node.disabled }"
role="menuitemradio"
@click="handleNode(node, false)"
>
<view class="nut-cascader-item__title">{{ node.text }}</view>

<Loading v-if="node.loading" class="nut-cascader-item__icon-loading" name="loading" />
<Checklist v-else class="nut-cascader-item__icon-check" name="checklist" />
</view>
</template>
<scroll-view :scrollY="true" style="height: 100%">
<template v-for="node in pane.nodes" :key="node.value">
<view
class="nut-cascader-item"
:aria-checked="isSelected(pane, node)"
:aria-disabled="node.disabled || undefined"
:class="{ active: isSelected(pane, node), disabled: node.disabled }"
role="menuitemradio"
@click="handleNode(node, false)"
>
<view class="nut-cascader-item__title">{{ node.text }}</view>

<Loading v-if="node.loading" class="nut-cascader-item__icon-loading" name="loading" />
<Checklist v-else class="nut-cascader-item__icon-check" name="checklist" />
</view>
</template>
</scroll-view>
</view>
</nut-tab-pane>
</template>
Expand Down
1 change: 1 addition & 0 deletions src/packages/__VUE/cascader/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
:close-icon="closeIcon"
:destroy-on-close="false"
:close-icon-position="closeIconPosition"
:lock-scroll="lockScroll"
>
<template v-if="title">
<view class="nut-cascader__bar" v-html="title"></view>
Expand Down

0 comments on commit 3b61a94

Please sign in to comment.