<template>
<div>
<h4>Comp2 컴포넌트</h4>
<span>{{ s1 }}</span>
<span v-text="n1"></span>
<span v-text="k1"></span>
<input type="button" value="num1의 값 감소" @click="handleNum1()" />
</div>
</template>
<script>
export default {
create(){
},
mounted() {
},
props: {
s1: {
type: String,
default: ''
},
n1: {
type: Number,
default: 0
},
k1: {
type: String,
default: ''
}
},
data() {
return {}
},
methods: {
handleNum1(){
console.log('Comp2.vue => handleNum1');
this.$emit('handleNum1');
}
},
computed: {
}
}
</script>
<style scoped>
</style>