zoukankan      html  css  js  c++  java
  • v-show过滤输出


    给v-show绑定一个computed方法,如果是在嵌套v-for中,要使用methods:
    <td v-for="(value,key) in item" @click="$_fly(item['经度'],item['纬度'])" v-show="checkID(key)">
        <input class="form-control input-sm" :disabled="checkDisable(index)" v-model="item[key]">
    </td>
    根据不同情况返回布尔值:
    checkID: function (key) {
      if (key == 'id' || key == 'ID') {
        return false;
      } else {
        return true;
      }
    }
  • 相关阅读:
    内置方法(item系列、__str__方法、__del__方法)
    POJ3436
    CF551B
    HDU1588
    HDU3117
    CF834D
    CF832D
    CF832C
    POJ1930
    POJ3666
  • 原文地址:https://www.cnblogs.com/wangwg1994/p/9153053.html
Copyright © 2011-2022 走看看