Skip to content

add style guide blockquote in v-if with v-for #1794

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

Merged
merged 6 commits into from
Sep 28, 2018
Merged

Conversation

CeceWall
Copy link
Contributor

in the vue style guide, it's an essential rule to avoid use v-if and v-for together, i thought beginners should know this.

@@ -196,4 +196,6 @@ Generally speaking, `v-if` has higher toggle costs while `v-show` has higher ini

## `v-if` with `v-for`

> Use v-if and v-for together is **not recommended**. See the style guide for futher infomation [Avoid v-if with v-for](https://vuejs.org/v2/style-guide/#Avoid-v-if-with-v-for-essential)
Copy link
Member

Choose a reason for hiding this comment

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

I'd suggest something like this instead:

> Use v-if and v-for together is **not recommended**. See the [style guide](/v2/style-guide/#Avoid-v-if-with-v-for-essential) for further information.

Notice the wording changes and the two spelling mistake corrections.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for your change and correcting, your version is much better.

Copy link
Member

@phanan phanan left a comment

Choose a reason for hiding this comment

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

Sorry, I approved the PR by mistake. What I suggested was to use a p.tip element instead, which would render something like this:

image

I believe this style serves our intention better.

@CeceWall
Copy link
Contributor Author

sorry for didn't get your point, and I push a new commit use p.tip instead.

@CeceWall
Copy link
Contributor Author

does anybody here?

@phanan
Copy link
Member

phanan commented Sep 27, 2018

@CeceWall Thanks for the ping. One extra little change and I think we're good to go :)

@CeceWall
Copy link
Contributor Author

thanks, and i have finished that

@CeceWall CeceWall closed this Sep 27, 2018
@CeceWall CeceWall reopened this Sep 27, 2018
@@ -196,4 +196,6 @@ Generally speaking, `v-if` has higher toggle costs while `v-show` has higher ini

## `v-if` with `v-for`

<p class="tip">Use `v-if` and `v-for` together is **not recommended**. See the [style guide](/v2/style-guide/#Avoid-v-if-with-v-for-essential) for further information.</p>
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, but I miss this earlier 😅: It's "Using," not "Use."

@phanan phanan merged commit 1520ddd into vuejs:master Sep 28, 2018
@phanan
Copy link
Member

phanan commented Sep 28, 2018

Thanks!

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