Vue中父组件向子组件传值的格式规范

父组件:

<row-base
            investor="index.yearLoss"
            number="68"
            per-title="index.tenMillion"
></row-base>

子组件:

<template>
  <div>
    <div class="row_left row_base">
      <el-col :span="12">
        <div class="pay saleBgcolor">
          <div class="left_item">
            <p class="investor">{{ $t(`${investor}`) }}</p>
            <p class="number">
              {{ number }}
              <span class="perTitle">{{ $t(`${perTitle}`) }}</span>
            </p>
          </div>
          <div class="right_item">
            <span class="iconfont icon-zijinguanli1 icon"></span>
          </div>
        </div>
      </el-col>
      <el-col :span="12">
        <div class="pay saleBgcolor"></div>
      </el-col>
    </div>
  </div>
</template>
<script>
export default {
  props: ['investor', 'number', 'perTitle']
};
</script>

原文地址:https://www.cnblogs.com/hahahakc/p/13274934.html