-
Notifications
You must be signed in to change notification settings - Fork 140
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
fix(comp:transfer): pagination should enable quick jumper, meanwhile fix header suffix style #1459
Conversation
This preview will be available after the AzureCI is passed. |
@@ -11,7 +11,7 @@ | |||
<span v-else> Target ({{ data.length }}) </span> | |||
</template> | |||
<template #headerSuffix> | |||
<IxIcon name="plus" :onClick="handleSuffixClick" /> | |||
<IxIcon style="font-size: 16px" name="plus" :onClick="handleSuffixClick" /> | |||
</template> | |||
</IxTransfer> | |||
</template> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by doing a code review of this patch,
The code is modifying the style property of the IxIcon element. It is setting the font-size to 16px. This change will ensure that the plus icon is displayed at the appropriate size. In addition, it appears that the handleSuffixClick function is being passed as a prop to the IxIcon element. This should help ensure the icon is clickable and that the appropriate action is taken when clicked.
Overall, this code looks valid and should not lead to any bugs.
@@ -79,6 +79,7 @@ function createPagination( | |||
return { | |||
simple: true, | |||
showTotal: false, | |||
showQuickJumper: true, | |||
...pagination, | |||
pageIndex: pageIndex.value, | |||
pageSize: pageSize.value, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the code review
The code looks good; there are no obvious syntax or logical errors. There is one improvement that can be made - adding a check to make sure that showQuickJumper
is a valid boolean value (currently it is set to true
). Additionally, it would also be beneficial to add documentation/comments to explain the purpose of this function and what each parameter does. This will help any other developers or maintainers who may need to work on this code in the future.
@@ -74,6 +74,8 @@ | |||
} | |||
|
|||
&-suffix { | |||
display: flex; | |||
align-items: center; | |||
margin-left: auto; | |||
} | |||
&-clear-icon + &-suffix, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the code review.
The code looks good as it adds a display: flex; and align-items: center; to style the element. This should help make sure the elements are properly aligned and displayed on the page. It also adds margin-left: auto; which will help make sure the elements are spaced out evenly and pushed to the right side of the page.
However, there are a few things to consider. First, are there any potential compatibility issues with older browsers? If so, you should add additional CSS rules to ensure the styling is supported in those browsers. Second, it may be worth adding a comment to the code to explain what the code is doing and why it was added. This will make it easier for other developers to understand the code and make any necessary changes. Finally, you should consider using a preprocessor such as Sass or Less to better organize your styling and make it easier to maintain.
Overall, the code looks good. With some minor tweaks, it should be able to provide the desired styling.
Codecov Report
@@ Coverage Diff @@
## main #1459 +/- ##
==========================================
- Coverage 92.89% 92.74% -0.15%
==========================================
Files 327 327
Lines 30399 30399
Branches 3507 3495 -12
==========================================
- Hits 28238 28193 -45
- Misses 2161 2206 +45
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -11,7 +11,7 @@ | |||
<span v-else> Target ({{ data.length }}) </span> | |||
</template> | |||
<template #headerSuffix> | |||
<IxIcon name="plus" :onClick="handleSuffixClick" /> | |||
<IxIcon style="font-size: 16px" name="plus" :onClick="handleSuffixClick" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<IxIcon style="font-size: 16px" name="plus" :onClick="handleSuffixClick" /> | |
<IxIcon name="plus" size="16px" :onClick="handleSuffixClick" /> |
@@ -74,6 +74,8 @@ | |||
} | |||
|
|||
&-suffix { | |||
display: flex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么要加这个? 哪怕改成 16px 还是居中的啊。?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原本是不居中的
64699e4
to
d3a6d9e
Compare
PR Checklist
Please check if your PR fulfills the following requirements:
What is the current behavior?
What is the new behavior?
修复以上问题
Other information