zoukankan      html  css  js  c++  java
  • thymeleaf中双下划线问题

    <div th:fragment="foot_menu(index)">
        <div class="weui-tabbar wy-foot-menu">
            <a href="index.html" th:class="${index}==0?'weui-bar_'+'_item--on weui-tabbar_'+'_item':'weui-tabbar_'+'_item'">
                <div class="weui-tabbar__icon foot-menu-home"></div>
                <p class="weui-tabbar__label">首页</p>
            </a>
            <a href="classify.html" class="weui-tabbar__item">
                <div class="weui-tabbar__icon foot-menu-list"></div>
                <p class="weui-tabbar__label">分类</p>
            </a>
        </div>
    </div>
    

     weui中 要求菜单未选中为 class="weui-tabbar__item",选中后为 class="weui-tabbar__item weui-bar__item--on"

    错误写法

    th:class="${index}==0?'weui-bar__item--on weui-tabbar__item':'weui-tabbar__item'"

    正确写法

    th:class="${index}==0?'weui-bar_'+'_item--on weui-tabbar_'+'_item':'weui-tabbar_'+'_item'"

  • 相关阅读:
    WebServices Get
    字符出现次数
    正则
    防止AutoPost
    转双问号,单问号
    GetData
    UpdatePanel
    字居中
    C# 面向对象之多态
    C# 委托之把委托从委托链(多播委托)移除
  • 原文地址:https://www.cnblogs.com/zys0597/p/14067687.html
Copyright © 2011-2022 走看看