第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

代碼
提交代碼
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> <div id="app"> <person @modify="modify"></person> <detail :name="name" :count="count"/> </div> </body> <script src="https://unpkg.com/vue/dist/vue.js"></script> <script type="text/javascript"> Vue.component('person', { template: '<div><div>姓名:<input type="text" v-model="name"/></div><div>年齡:<input type="text" v-model="count"/></div><button @click="modify">修改</button></div>', data() { return { name: '句號(hào)', count: 18 } }, methods: { modify() { this.$emit('modify', {name: this.name, count: this.count}) } } }) Vue.component('detail', { template: '<div>我是:{{name}}, 我今年 {{count}}歲。</div>', props: { name: { type: String, default: '句號(hào)' }, count: { type: Number, default: 18 } }, methods: { } }) var vm = new Vue({ el: '#app', data() { return { name: '句號(hào)', count: 18 } }, methods: { modify(detail) { this.name = detail.name this.count = parseInt(detail.count) } } }) </script> </html>
運(yùn)行結(jié)果