[cookbook]Change "data" to a function (#2221) (#1748)
[cookbook]Change "data" to a function (#2221) (#1748)

* Change "data" to a function

* Update src/v2/cookbook/unit-testing-vue-components.md

Co-Authored-By: Phan An <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@phanan.net>
vuejs/jp.vuejs.org,vuejs/jp.vuejs.org