Open Hanks10100 opened 6 years ago
Change the compiler to support the new syntax.
for
list-data
alias
index
switch
template-key
case
template-type
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>.
longList
<recycle-list>
done in https://github.com/vuejs/vue/commit/7cc0b559e9e57fcb3baeae5d8d4c8964aa335b5e
Syntax
Change the compiler to support the new syntax.
for
instead of thelist-data
,alias
andindex
.switch
instead of thetemplate-key
.case
instead of thetemplate-type
.Examples
Before:
After:
The data of
longList
still should be binding with the<recycle-list>
.