[vue]computed

computed

<template>
  <input type="text" v-model="firstName" />
  <input type="text" v-model="lastName" />
  <h1>헬로우, {{ fullName }}</h1>
</template>
<script>
export default {
  name: "",
  components: {},
  data() {
    return {
      firstName: "민규",
      lastName: "박",
    };
  },
  computed: {
    fullName() {
      return this.firstName + this.lastName;
    },
  },
  setup() {},
  created() {},
  mounted() {},
  unmounted() {},
  methods: {},
};
</script>

--------

좋은 웹페이지 즐겨찾기