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(components): [cascader] initialHeight #10517

Closed
wants to merge 3 commits into from

Conversation

Simon-He95
Copy link
Contributor

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

fixed: #10516

@pull-request-triage
Copy link

👋 @Simon-He95, thank you for contributing element-plus.

  • You can comment with /label Components:[component_name] to add a label for which component you are working on.
  • You may join our Discord for staying tuned.

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

Hello @Simon-He95, thank you for contributing to element-plus, please see our guideline to see how to make contribution

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

@github-actions github-actions bot added the CommitMessage::Qualified Qualified commit message label Nov 8, 2022
@github-actions
Copy link

github-actions bot commented Nov 8, 2022

🧪 Playground Preview: https://element-plus.run/?pr=10517
Please comment the example via this playground if needed.

const getInitialHeight = () => {
if (props.size === 'large') return 38
if (props.size === 'small') return 22
return 30
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should use css variable to replace hardcode here
#9982 #10308

Copy link
Contributor Author

Choose a reason for hiding this comment

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

His original logic also has inputInner.offsetHeight
inputInitialHeight = inputInner.offsetHeight || initialHeight
cssVar isn't it an another form hardcode
Just personal feeling, there is more burden to find dom to inject style, I don't think it seems to have any advantages over the current method

@holazz
Copy link
Member

holazz commented Nov 9, 2022

Hi, @Simon-He95 This bug was introduced by #10214, I created a PR to fix it.

@Simon-He95
Copy link
Contributor Author

Hi, @Simon-He95 This bug was introduced by #10214, I created a PR to fix it.

OK

@Simon-He95 Simon-He95 closed this Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Component] [cascader] 在el-dialog组件中使用el-cascader多选属性,el-cascader组件的高度将为0
4 participants