在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/Linux  HTML/ elementUI el-option-group + vue filter 過

elementUI el-option-group + vue filter 過濾問題?

<el-option-group
        v-for="(letter,index) in letters"
        :key="letter"
        class="selectgrop"
        :label="letter">
        <el-option
          :class="{active: activeIndex===index}"
          class="ty-opg-opt"
          v-for="(item,index) in sportDatabaseOrderBy | item.firstLetter== letter" 
          // 這里我知道是錯誤的, 主要是我想過濾出item.firstLetter== letter 的數(shù)據(jù) 請問該怎么做, 謝謝大佬們
          :key="item.id"
          :label="item.majorKindName"
          :value="item.mets">
          <span style="color: blue">{{item.majorKindName}}</span>
          <span>{{item.activityName}}</span>
          <!--"id": "5a6697078412379d5a549f74",-->
          <!--"energyId": 4005,-->
          <!--"mets": 4.5,-->
          <!--"majorKindName": "釣魚和打獵",-->
          <!--"activityName": "釣魚, 螃蟹釣魚"-->
        </el-option>
        <!-- v-for="(item,index) in sportDatabase.filter|item.firstLetter== letter" -->
      </el-option-group>
回答
編輯回答
傻叼

可以不用過濾器的,試試這樣看行不行:

 <el-option
      :class="{active: activeIndex===index}"
      class="ty-opg-opt"
      v-for="(item,index) in sportDatabaseOrderBy" 
      :key="item.id"
      :label="item.majorKindName"
      :value="item.mets"
      v-if="item.firstLetter == letter"> //添加這句試試
2017年7月18日 12:48