Skip to content

Commit

Permalink
feat(Cascader): add ellipsis prop support (#5806)
Browse files Browse the repository at this point in the history
  • Loading branch information
landluck authored May 31, 2024
1 parent 1a83513 commit db1c0ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/cascader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ Page({
| active-color | 选中状态的高亮颜色 | _string_ | `#1989fa` |
| swipeable | 是否开启手势左右滑动切换 | _boolean_ | `false` |
| closeable | 是否显示关闭图标 | _boolean_ | `true` |
| ellipsis `v1.11.7` | 是否省略过长的标题文字, 关闭后文字过长会出现横向滚动 | _boolean_ | `true` |
| show-header | 是否展示标题栏 | _boolean_ | `true` |
| close-icon | 关闭图标名称或图片链接,等同于 Icon 组件的 [name 属性](#/icon) | _string_ | `cross` |
| field-names | 自定义 `options` 结构中的字段 | _CascaderFieldNames_ | `{ text: 'text', value: 'value', children: 'children' }` |
Expand Down
4 changes: 4 additions & 0 deletions packages/cascader/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ VantComponent({
type: Boolean,
value: true,
},
ellipsis: {
type: Boolean,
value: true,
},
showHeader: {
type: Boolean,
value: true,
Expand Down
1 change: 1 addition & 0 deletions packages/cascader/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
color="{{ activeColor }}"
border="{{ false }}"
swipeable="{{ swipeable }}"
ellipsis="{{ ellipsis }}"
bind:click="onClickTab"
>
<van-tab
Expand Down

0 comments on commit db1c0ce

Please sign in to comment.