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