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

Use more readable attributes on <recycle-list> #12

Open
Hanks10100 opened this issue Dec 18, 2017 · 1 comment
Open

Use more readable attributes on <recycle-list> #12

Hanks10100 opened this issue Dec 18, 2017 · 1 comment
Labels

Comments

@Hanks10100
Copy link
Owner

Syntax

Change the compiler to support the new syntax.

  • Use for instead of the list-data, alias and index.
  • Use switch instead of the template-key.
  • Use case instead of the template-type.

Examples

Before:

<recycle-list :list-data="longList" template-key="cellType" alias="item" index="i">
  <cell-slot template-type="A"> ... </cell-slot>
  <cell-slot template-type="B"> ... </cell-slot>
</recycle-list>

After:

<recycle-list for="(item, i) in longList" switch="cellType">
  <cell-slot case="A"> ... </cell-slot>
  <cell-slot case="B"> ... </cell-slot>
</recycle-list>

The data of longList still should be binding with the <recycle-list>.

@yyx990803
Copy link
Contributor

yyx990803 commented Dec 19, 2017

done in vuejs/vue@7cc0b55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants