s8e107 props in child components
This commit is contained in:
parent
0c19dcf46a
commit
db1e4c63d2
@ -2,13 +2,18 @@
|
||||
<div class="component">
|
||||
<h3>You may view the User Details here</h3>
|
||||
<p>Many Details</p>
|
||||
<p>User Name: {{ name }}</p>
|
||||
<p>User Name: {{ switchName() }}</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['name']
|
||||
props: ['name'],
|
||||
methods: {
|
||||
switchName(){
|
||||
return this.name.split("").reverse().join("");
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user