喵币管理

整体项目的技术难度不大, 更多的在于表格 状态的处理.

技术注意点

表格的数据拼接

  <el-table
    :data="tableData1"
    border
    @cell-dblclick="celledit"
    style="width: 671px;height:100px"
  >
    <template v-for="({ prop, label }, index) in vipConfig1">
      <el-table-column :key="prop" :prop="prop" :label="label">
        <template slot-scope="scope">
          <el-input
            class="border"
            v-model.number="scope.row[index].value"
            :disabled="scope.row[index].edit"
          ></el-input>
        </template>
      </el-table-column>
    </template>
  </el-table>

传值的注意点

还有传值的时候, 注意值为0 的时候, 会判断成 false , 进而执行其他的. 还有一个 route 要注意的. 传成 false, 还是判断成字符串, 进而拿不到正确值.

数组嵌套

在时间控件上面面对 timerange 这种, 如果自己解析成, 很容易出现丢失的情况

导出表格

最后更新于

这有帮助吗?