Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: select提供选项定制和回显内容定制 #69

Merged
merged 4 commits into from
Mar 14, 2022
Merged

Conversation

wanchun
Copy link
Collaborator

@wanchun wanchun commented Mar 11, 2022

What kind of change does this PR introduce? (check at least one)

  • Feature

Does this PR introduce a breaking change? (check one)

  • No

If yes, please describe the impact and migration path for existing applications:

Related issue (if exists):

close #47

Other information:

if (props.multiple) {
return currentValue.value.includes(option.value);
}
return [currentValue.value].includes(option.value);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接用 currentValue.value === option.value ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不改了,差别不大

.map((option) => {
return {
...option,
label: `${option[props.optionLabelField]}`,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果用户传了 labelField,没有 optionLabelField,这里应该有问题?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

额好像是

.map((option) => {
return {
...option,
label: option[props.optionLabelField],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同理

@winixt winixt merged commit cbc9c45 into main Mar 14, 2022
@winixt winixt deleted the feat-select branch March 14, 2022 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request/新需求] select/selectTree 希望能定制回填内容
2 participants