zoukankan      html  css  js  c++  java
  • iview-表格搜索

    <Input v-model.trim="clusterVal" :search="true" enter-button class="fr mar-r16 wd-20P" @on-search="() => this.searchClustersFn(clusterVal)"/>
     
    searchClustersFn(clusterVal) {
    // tableData
    this.newSourData = []
    const search = (data, item, val) => {
    return data[item] ? data[item].indexOf(val) !== -1 : false
    }
    const any = items => {
    for (let i in items) {
    if (items[i]) return true
    }
    return false
    }
    const that = this;
    this.sourData.forEach((item) => {
    const fields = ['name','display_name', 'ceph_version', 'idc']
    if (any(fields.map(field => search(item, field, that.clusterVal)))) {
    that.newSourData.push(item)
    }
    });
    this.tableData = that.newSourData
    },
  • 相关阅读:
    hdfs校验和
    hdfs读写策略
    hdfs架构
    hdfs数据块
    元数据
    集群的创建
    jQuery_DOM操作
    jQuery_简介_选择器
    Ajax
    MySQL整理_2_数据库操作
  • 原文地址:https://www.cnblogs.com/limengyao/p/11242805.html
Copyright © 2011-2022 走看看