实例:

https://www.cnblogs.com/weichen913/p/iview.html


解释:

https://cn.vuejs.org/v2/guide/render-function.html

 

iview table使用说明:
https://www.iviewui.com/components/table

 

搜索+复选框列表:

<FormItem label="用户列表">
  <Input search v-model="search" @on-change="userSearch" @on-search="userSearch" placeholder="请输入搜索项"></Input>
</FormItem>
<Checkbox-group v-model='userSelect' @on-change="userChange">
  <Checkbox style="margin-left:90px" v-for="(item,key) in userList" :key="key" :label="item.info"></Checkbox><br><br>
</Checkbox-group>

 

父组件

this.authColumns.unshift({
  title: '展开',
  type: 'expand',
  width: 70,
  align: 'center',
  render: (h, params) => {
    return h(expandRow, {
      props: {
        row: this.dataRes[this.dataResKey[params.index]]
      },
      on: {
        // 接收来自子组件的 $emit
        upData: () => {
          this.getAuthData(this.$store.getters.authList)
        }
      }
    })
  }
})

 

 

子组件:

// 接收参数

props: { row: Object }

// 调用父组件方法
this.$emit('upData')
Logo

前往低代码交流专区

更多推荐