diff --git a/packages/cascader/README.md b/packages/cascader/README.md index b0823bc1..9198fd2a 100644 --- a/packages/cascader/README.md +++ b/packages/cascader/README.md @@ -213,6 +213,7 @@ Page({ | show-header | 是否展示标题栏 | _boolean_ | `true` | | close-icon | 关闭图标名称或图片链接,等同于 Icon 组件的 [name 属性](#/icon) | _string_ | `cross` | | field-names | 自定义 `options` 结构中的字段 | _CascaderFieldNames_ | `{ text: 'text', value: 'value', children: 'children' }` | +| use-title-slot `v1.11.3` | 是否使用自定义标题的插槽 | _boolean_ | `false` | ### CascaderOption 数据结构 diff --git a/packages/cascader/index.ts b/packages/cascader/index.ts index a5fef194..eeedb06a 100644 --- a/packages/cascader/index.ts +++ b/packages/cascader/index.ts @@ -58,6 +58,7 @@ VantComponent({ value: defaultFieldNames, observer: 'updateFieldNames', }, + useTitleSlot: Boolean, }, data: { diff --git a/packages/cascader/index.wxml b/packages/cascader/index.wxml index 1794b829..94172341 100644 --- a/packages/cascader/index.wxml +++ b/packages/cascader/index.wxml @@ -1,7 +1,8 @@ - {{ title }} + + {{ title }}