my purpose is to produce a table from information of a JSON data. As the table includes online information I intend to carry out shifts whenever the ranking adjustments. Nonetheless, although the information is refilled after changings I do not take care of to utilize shifts.
This is the JSON data:
{"table": [["Player1",1],["Player1",2],["Player1",3]]}
And Also below is a marginal variation of the Vue code:
<< layout>>.
<< div id=" flip-list-demo" course=" trial">
<> < transition-group name=" flip-list">
<> < div course=" table-entry" v-for="( ranking, index) in playernum" v-bind: trick=" index">
<> < div course=" name"> > {{gamers[index][0]}} <.
<< div course=" ranking"> > {{gamers[index][1]}} <.
<.
<.
<.
<.
<< manuscript>>.
import game_data from './ assets/game _ data.json'.
export default {
name: 'Application',.
information() {
return {
information: game_data,.
gamers: Things( game_data. table),.
playernum: Object.keys( game_data. table). size,.
};
},.
};
<.
<< design>>
. flip-list-move {
shift: change ones;
}
#flip- list-demo {
display screen: flex;
align-items: facility;
justify-content: facility;
}
. table-entry {
display screen: grid;
grid-template-columns: 1fr 1fr;
place-items: facility;.
}
<.