Skip to content

Instantly share code, notes, and snippets.

@liaooliver
Created June 30, 2020 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liaooliver/6ef5bd6a059bb298ac49a3918ae13229 to your computer and use it in GitHub Desktop.
Save liaooliver/6ef5bd6a059bb298ac49a3918ae13229 to your computer and use it in GitHub Desktop.
<template>
<div id="app">
// 建立一個按鈕,綁定 testGetVuex 事件
<button @click="testGetVuex()">測試 取得 Vuex 實體</button>
</div>
</template>
<script>
export default {
name: "App",
methods: {
testGetVuex() {
// 透過 testGetVuex 事件 來呼叫 Vuex
console.log(this.$store);
}
}
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment