Artifact Content
Artifact 01c1af0055938df77abdc9beaba68c2ccc1c9b6e0aad4165fb40a1b5a79a7cf2:
- File public/riot-3.13.2/test/tag/loop-swap-type.tag — part of check-in [12a9bb700d] at 2021-08-11 18:56:04 on branch trunk — Import from git Added a changelog (user: dev size: 356)
<loop-swap-type> <div each="{ item in current }">{ item.num }</div> var arr = [ { num: 1 }, { num: 2 } ] var obj = { 0: { num: 3 }, 1: { num: 4 } } this.current = arr this.swap = function () { if (Array.isArray(this.current)) { this.current = obj } else { this.current = arr } } </loop-swap-type>