//父组件
<my-component :props_vue="props_vues"></my-component>


data () {
    return {
      props_vues:'宇哥最帅~~~!!!!!哟sdsdsd哟sdhasdjasdh',
  },


//子组件
<template>
    <div>
        <label>Email</label>
        <input placeholder="email address"><br/>
        <label>Email password</label>
        <input placeholder="password" key="email-possword">
        <p>{{counter}}</p>
    </div>
</template>
<script>
 export default {
    props: ['props_vue'],
    data () {
        return {
            counter: this.props_vue
        }
    },
 }


Logo

前往低代码交流专区

更多推荐