v.0.1.0 pinia, albums-store
This commit is contained in:
@@ -4,13 +4,20 @@ import { ref } from "vue";
|
||||
const msg = ref<string>("Tom is building a vue template, oh yeah");
|
||||
const status = ref<boolean>(true);
|
||||
|
||||
defineProps({
|
||||
hide: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
// Define function directly
|
||||
const toggleStatus = (): void => {
|
||||
status.value = !status.value;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<template v-if="hide">
|
||||
<div class="card">
|
||||
<div class="tj">{{ msg }} {{ status }}</div>
|
||||
<p v-if="status">{{ msg }} {{ status }}</p>
|
||||
|
||||
Reference in New Issue
Block a user