[Vuejs]-Vue js loop though object using v-for in template

0๐Ÿ‘

  <ul class="nav nav-pills">
    <li class="dropdown" v-for="(items, opt) in filterOptions">
      <a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">{{opt}}</a>
      <div class="dropdown-menu">
        <a href="#" v-for="item in items">
          <div class="inner">
            <div class="checkbox">
              <label class="filter-label-item">
                  <input type="checkbox" :data-prop="opt" :value="item.value" :checked="item.checked"/>
                  <span class="cr"><i class="cr-icon fa fa-check"></i></span>
                  <span>{{item.value}} <span class="badge badge-dark">{{item.count}}</span></span>
                </label>
            </div>
          </div>
        </a>
      </div>
    </li>
  </ul>

Leave a comment