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: update step #2379

Merged
merged 5 commits into from
Jun 22, 2020
Merged

feat: update step #2379

merged 5 commits into from
Jun 22, 2020

Conversation

zkwolf
Copy link
Member

@zkwolf zkwolf commented Jun 7, 2020

First of all, thank you for your contribution! 😄

New feature please send pull request to feature branch, and rest to master branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!

[中文版模板 / Chinese template]

This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

What's the background?

  1. Describe the source of requirement.
  2. Resolve what problem.
  3. Related issue link.

API Realization (Optional if not new feature)

  1. Basic thought of solution and other optional proposal.
  2. List final API realization and usage sample.
  3. GIF or snapshot should be provided if includes UI/interactive modification.

What's the effect? (Optional if not new feature)

  1. Does this PR affect user? Which part will be affected?
  2. What will say in changelog?
  3. Does this PR contains potential break change or other risk?

Changelog description (Optional if not new feature)

  1. English description
  2. Chinese description (optional)

Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

Additional Plan? (Optional if not new feature)

If this PR related with other PR or following info. You can type here.

@zkwolf zkwolf mentioned this pull request Jun 7, 2020
63 tasks
@zkwolf zkwolf marked this pull request as draft June 7, 2020 15:55
@zkwolf zkwolf marked this pull request as ready for review June 7, 2020 16:00
export function isEmptyElement(c) {
return typeof c.type === 'symbol' && c.children.trim() === '';
return typeof c.type === Comment;
Copy link
Member

Choose a reason for hiding this comment

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

? rebase 看看

Copy link
Member Author

Choose a reason for hiding this comment

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

ok

@@ -41,30 +39,27 @@ const Steps = {
const getPrefixCls = this.configProvider.getPrefixCls;
const prefixCls = getPrefixCls('steps', customizePrefixCls);
const iconPrefix = getPrefixCls('', customizeIconPrefixCls);
const progressDot = this.progressDot || this.$slots.progressDot;
Copy link
Member

Choose a reason for hiding this comment

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

getComponent(this, 'progressDot')


function isString(str) {
return typeof str === 'string';
}
function noop() {}
export default {
name: 'Step',
inheritAttrs: false,
Copy link
Member

Choose a reason for hiding this comment

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

如果声明了 inheritAttrs: false, class style 都需要单独处理
如果不声明就要单独声明事件

progressDot,
icons,
...childProps,
...this.$attrs,
Copy link
Member

Choose a reason for hiding this comment

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

这里只需要传 this.$attrs.slots 就可以了吧 多测试下 单测可以改一下了

Copy link
Member Author

Choose a reason for hiding this comment

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

我先看看test-utils都改啥了,目前steps里面除了demo和mountTest好像没啥单测了

Copy link
Member Author

Choose a reason for hiding this comment

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

这里我想了一下不用传this.$attrs了,里面没有需要从父组件传子组件的,progressDot已经从props传了

onItemClick(...args) {
const { onClick } = this.$props;

if (onClick) {
Copy link
Member

Choose a reason for hiding this comment

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

可以不用判断

};
return (
<div {...stepsProps}>
{filteredChildren.map((child, index) => {
const childProps = getPropsData(child);
const childProps = child.props || {};
Copy link
Member

Choose a reason for hiding this comment

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

还是用 getPropsData 不然有驼峰和下划线问题

@tangjinzhou tangjinzhou merged commit 65f49b9 into vueComponent:feat-vue3 Jun 22, 2020
@zkwolf zkwolf deleted the feat-step branch March 16, 2021 06:03
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants