ionic中的*ngFor
<div style="position:fixed;margin-top: 80%;" *ngIf="phoneticside"> <p class="letter" *ngFor="let i of phoneticList;" (click)="jumpToPhonetic(i)">{{i}}</p> </div>
phoneticList = ['3', 'a', 'æ', 'aI', 'ar', 'au', 'ɔ', 'ɔI', 'ɔr', 'e', 'ə', 'ɚ', 'I', 'i-', 'iə', 'ɪə', 'Ir', 'o', 'U', 'u-', 'Ur', 'ʌ', 'ε', 'εr', 'b', 'd', 'ð', 'dʒ', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'ŋ', 'p', 'r', 's', 'ʃ', 't', 'tʃ', 'v', 'w', 'z', 'ʒ', 'θ'];
vue中 v-for
<div class="altherList">
<p class="letter" v-for=" (item,i) in alphabet" :key=i >{{alphabet[i]}}</p>
</div>
data() { return {
alphabet :['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '#']
} },