Skip to content

Instantly share code, notes, and snippets.

@guilhermecarvalhocarneiro
Created March 26, 2022 14:18
Show Gist options
  • Save guilhermecarvalhocarneiro/5f3b80fdb723e9277dec7595c86d403e to your computer and use it in GitHub Desktop.
Save guilhermecarvalhocarneiro/5f3b80fdb723e9277dec7595c86d403e to your computer and use it in GitHub Desktop.
<script setup lang="ts">
import { onMounted, Ref, ref } from "vue";
const nome = ref("");
const sobrenome: Ref<string> = ref("carvalho carneiro");
const idade = ref(25);
const props = defineProps<{
foo: string;
bar?: number;
}>();
onMounted(() => {
nome.value = "Guilherme de Carvalho Carneiro";
sobrenome.value = "Carvalho Carneiro";
idade.value = 45;
});
</script>
<template>
<div id="linha-nome">{{ nome }} | {{ sobrenome }} - {{ idade }}</div>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment