first commit
This commit is contained in:
48
loginmulti/components/coba2.vue
Normal file
48
loginmulti/components/coba2.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-container class="mb-6">
|
||||
<h1>Component 2</h1>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script type="module">
|
||||
export default {
|
||||
name: "component2",
|
||||
computed: {
|
||||
// Akses state dari store
|
||||
count() {
|
||||
return this.$store.state.count;
|
||||
},
|
||||
email() {
|
||||
return this.$store.state.email;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// Dispatch action ke store
|
||||
increment() {
|
||||
this.$store.dispatch("increment");
|
||||
},
|
||||
},
|
||||
};
|
||||
// export default {
|
||||
// name: "HelloWorld",
|
||||
// // setup() {
|
||||
// // // const store = useStore();
|
||||
// // const email = computed(() => $store.state.email);
|
||||
// // },
|
||||
// computed: {
|
||||
// email: {
|
||||
// get() {
|
||||
// return this.$store.state.store.email;
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
h1 {
|
||||
color: blue;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user