Skip to content

Commit

Permalink
fix: 选择器选项文案展示
Browse files Browse the repository at this point in the history
  • Loading branch information
YufJi committed Mar 25, 2024
1 parent ded2436 commit 70dc7a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pickerson/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default createComponent({
{this.multiple && (
<div class="icon">
<Checkbox value={checked} shape="square">
{this.slots('option', item) ||
{this.slots('option', {...item, item}) ||
(isInDesigner ? (
<EmptyCol></EmptyCol>
) : (
Expand All @@ -130,7 +130,7 @@ export default createComponent({
)}

{!this.multiple &&
(this.slots('option', item) ||
(this.slots('option', {...item, item}) ||
(isInDesigner ? (
<EmptyCol></EmptyCol>
) : (
Expand Down
4 changes: 2 additions & 2 deletions src/pickerson/PickerColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 70dc7a0

Please sign in to comment.