Vue 在做每一個動作的前後,都可以使用 hook 的方式做需要做的事情,例如: created 、 mounted 。
created
mounted
這邊會列出幾個常用的陣列方法以及使用的方式。以下使用 pokémonList 當做範例。
pokémonList