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 f86c553 commit c019ad3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 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 Expand Up @@ -308,7 +308,7 @@ export default createComponent({

return (
<li {...data}>
{this.slots('option', option) || <div {...childData} />}
{this.slots('option', {...option, item: option}) || <div {...childData} />}
</li>
);
});
Expand Down

0 comments on commit c019ad3

Please sign in to comment.