Skip to content

Conversation

cong-min
Copy link
Contributor

@cong-min cong-min commented Oct 12, 2019

@cong-min cong-min closed this Oct 12, 2019
@@ -84,7 +84,7 @@ export const vModelCheckbox: Directive<HTMLInputElement> = {
if (i > -1) {
assign([...modelValue.slice(0, i), ...modelValue.slice(i + 1)])
} else {
assign(modelValue.concat(elementValue))
assign(modelValue.concat([elementValue]))
Copy link
Member

Choose a reason for hiding this comment

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

why you prefer creating an array?
The previous version is correct.

concat

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes... you are right.
the code of vue2.x misled me. 😂

sxzz pushed a commit that referenced this pull request Aug 12, 2024
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.

2 participants