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

fix(comp:transfer): pagination should enable quick jumper, meanwhile fix header suffix style #1459

Merged
merged 3 commits into from Feb 23, 2023

Conversation

sallerli1
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added/updated or not needed
  • Docs and demo have been added/updated or not needed

What is the current behavior?

  1. 分页没有快速跳转
  2. 头部的后缀没有垂直居中
  3. demo中的后缀加号图标尺寸应该是16px

What is the new behavior?

修复以上问题

Other information

@idux-bot
Copy link

idux-bot bot commented Feb 20, 2023

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>
Copy link

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,
Copy link

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,
Copy link

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
Copy link

codecov bot commented Feb 20, 2023

Codecov Report

Merging #1459 (8bd2e15) into main (8ca7a08) will decrease coverage by 0.15%.
The diff coverage is n/a.

❗ Current head 8bd2e15 differs from pull request most recent head d3a6d9e. Consider uploading reports for the commit d3a6d9e to get more accurate results

@@            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     
Impacted Files Coverage Δ
packages/components/upload/src/Upload.tsx 50.00% <0.00%> (-44.88%) ⬇️
packages/components/upload/src/List.tsx 77.77% <0.00%> (-22.23%) ⬇️

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" />
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<IxIcon style="font-size: 16px" name="plus" :onClick="handleSuffixClick" />
<IxIcon name="plus" size="16px" :onClick="handleSuffixClick" />

@@ -74,6 +74,8 @@
}

&-suffix {
display: flex;
Copy link
Member

Choose a reason for hiding this comment

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

为什么要加这个? 哪怕改成 16px 还是居中的啊。?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

原本是不居中的

@danranVm danranVm merged commit 499ae90 into IDuxFE:main Feb 23, 2023
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.

None yet

2 participants