From 628008efb32d0d46d8de68ebd39e86c49ecd928e Mon Sep 17 00:00:00 2001
From: johnsonwong666 <64689255+johnsonwong666@users.noreply.github.com>
Date: Mon, 15 Jan 2024 20:16:45 +0800
Subject: [PATCH] fix(Cascader): fix title slot inoperative (#5676)
---
packages/cascader/README.md | 1 +
packages/cascader/index.ts | 1 +
packages/cascader/index.wxml | 3 ++-
3 files changed, 4 insertions(+), 1 deletion(-)
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 @@