From fbc2ad94f2f1b20f1b4f59fbab8e1d5e44737822 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BE=A1=E9=A3=8E?= <18012261618@126.com>
Date: Mon, 25 Mar 2024 10:58:49 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=89=E6=8B=A9=E5=99=A8=E9=80=89?=
=?UTF-8?q?=E9=A1=B9=E6=96=87=E6=A1=88=E5=B1=95=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pickerson/List.js | 4 ++--
src/pickerson/PickerColumn.js | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/pickerson/List.js b/src/pickerson/List.js
index 6f312a7cb..2afa60676 100644
--- a/src/pickerson/List.js
+++ b/src/pickerson/List.js
@@ -119,7 +119,7 @@ export default createComponent({
{this.multiple && (
- {this.slots('option', item) ||
+ {this.slots('option', {...item, item}) ||
(isInDesigner ? (
) : (
@@ -130,7 +130,7 @@ export default createComponent({
)}
{!this.multiple &&
- (this.slots('option', item) ||
+ (this.slots('option', {...item, item}) ||
(isInDesigner ? (
) : (
diff --git a/src/pickerson/PickerColumn.js b/src/pickerson/PickerColumn.js
index de3ea8d4d..3fa9d4a68 100644
--- a/src/pickerson/PickerColumn.js
+++ b/src/pickerson/PickerColumn.js
@@ -201,8 +201,8 @@ export default createComponent({
},
getOptionText(option) {
- if (isObject(option) && isDef(_get(option, this.textField))) {
- return _get(option, this.textField);
+ if (isObject(option)) {
+ return _get(option, this.textField) || '';
}
return option;
@@ -309,7 +309,7 @@ export default createComponent({
return (
- {this.slots('option', option) ||
+ {this.slots('option', {...option, item: option}) ||
(isInDesigner ? : )}
);