1. 程式人生 > >avalon結合原生js tab切換

avalon結合原生js tab切換

tin val 榜單 ons rem 結合 epic lse HA

      <div class="fishqc-tap">
            <div ms-class="[@codePic!=‘‘&&@codeInfo!=‘‘?‘tapHome‘:‘changeToThree‘]">
                <a href="javascript:;" onClick="javascript:;" ms-class="@currentSelect.key == ‘safety‘ && ‘active‘" ms-click="sortclick(@setting.safety)
">安全榜單</a> </div> <div ms-class="[@codePic!=‘‘&&@codeInfo!=‘‘?‘tapHome‘:‘changeToThree‘]"> <a href="javascript:;" onClick="javascript:;" ms-class="@currentSelect.key == ‘recommend‘ && ‘active‘" ms-click="sortclick(@setting.recommend)
">優品推薦</a> </div> <!-- <a href="javascript:;" onClick="javascript:;" ms-class="@currentSelect.key == ‘report‘ && ‘active‘" ms-click="sortclick(@setting.report)">即將上線</a> --> <div ms-visible="@codePic!=‘‘&&@codeInfo!=‘‘
" class="tapHome"> <a href="javascript:;" onClick="javascript:;" ms-class="@currentSelect.key == ‘secret‘ && ‘active‘" ms-click="sortclick(@setting.secret)">中選秘籍</a> </div> <!-- <a href="javascript:;" onClick="javascript:;" ms-class="@currentSelect.key == ‘beforetry‘ && ‘active‘" ms-click="sortclick(@setting.beforetry)">試用報告</a> --> <div ms-class="[@codePic!=‘‘&&@codeInfo!=‘‘?‘tapHome‘:‘changeToThree‘]"> <a href="javascript:;" onClick="javascript:;" ms-class="@currentSelect.key == ‘report‘ && ‘active‘" ms-click="sortclick(@setting.report)">試用報告</a> </div> </div>
        <div ms-if="@currentSelect.key == ‘safety‘">
          11111 
        </div>

       <!--  </div> -->
        <div ms-if="@currentSelect.key == ‘recommend‘"> 
          222222
        </div>
        <div class="award_bottom" ms-if="@currentSelect.key == ‘secret‘">
           3333
        </div>
        <div ms-if="@currentSelect.key == ‘report‘" style="margin-top: 0.2rem;border-bottom: 1px solid #f8f8f8">
         44444
       </div>
       setting: {
            safety: {
                key: "safety"
            },
            recommend: {
                key: "recommend"
            },
            secret: {
                key: "secret"
            },
            report: {
                key: "report"
            }
        },
 sortclick: function(item) {
            vm.currentSelect = item
            if (item.key == safety) {
                vm.safetyList()
            } else if (item.key == recommend) {
                vm.productRecommend()
            } else if (item.key == report) {
                vm.tryReport()
            }
            console.log(55555, item)
        },
  vm.$watch(onReady, function() {
            vmi.currentSelect = vmi.setting.currenttry;

    })

avalon結合原生js tab切換