[Vue] data function vs object

新手時期時其實搞不懂為什麼明明都是 data 怎麼會那麼多種寫法…

現在的我決定提供下面四種範例(相信那時若有這篇就能幫到過去的我)

必備知識: ES6 Shorthand, Object結構, ES6 箭頭函數

如果搞懂上面這幾個就OK了~

--

--

--

這邊主要分享自己查資料找不到的資訊,若之後有人遇到相同的問題便可省去不少時間。

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
亂叫阿醇

亂叫阿醇

這邊主要分享自己查資料找不到的資訊,若之後有人遇到相同的問題便可省去不少時間。

More from Medium

Evolution of my Dev Environment

AlterNET Studio 8.0 released — now with support for Visual Studio 2022 and .NET 6

How to install leaflet via npm

Connect to your MySQL Database using C# & Windows Forms