表单重置和作用域插槽

2020-12-26  本文已影响0人  李小白呀
  1. 在使用this.$refs.queryInfo.resetFields()实现表单重置时,必须用prop绑定数据。

  2. 在渲染表格内容时,只要是在表格的列中,需要嵌套其他组件,就需要使用作用域插槽


          <el-table-column label="录入时间">

            <template slot-scope="scope">

              {{scope.row.createTime|parseTimeByString}}

            </template>

          </el-table-column>

          <el-table-column label="状态">

            <template slot-scope="scope">

              {{scope.row.state==1?'启用':'禁用'}}

            </template>

          </el-table-column>
上一篇 下一篇

猜你喜欢

热点阅读