第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

根據動態(tài)寬度更改進度條的類別

根據動態(tài)寬度更改進度條的類別

湖上湖 2021-08-26 19:29:32
我有一個寬度動態(tài)變化的進度條,因此如果寬度小于或等于 50%,則引導進度條的類別應為“進度條警告”,否則如果寬度大于 50% 的類別bootstrap 進度條應該是“progress-bar-success”。我已經檢查過每個地方,但發(fā)現很難讓它工作。請任何幫助?這是 HTML 代碼:客戶貸款.php                   <td>                                            <span class="header-text">                                                <div class="progress-bar          progress-bar-striped active progressbartextcolor"           id="progressbarcolorchange" role="progressbar" aria-valuenow="25"                aria-valuemin="0" v-bind:style="{width: customerLoan.progress                    + '%'}" aria-valuemax="100">{{customerLoan.progress ||            "0"}}%</div>                                            </span>                                        </td>客戶貸款.js   var vueCustomerLoans = new Vue({       el: "#table-records",      data: {    customerLoans: []       },         methods: {    navigateToView: function (row) {        document.location = "backoffice/customer-loan?id=" +         JSON.stringify(row.id);       }      }    });
查看完整描述

2 回答

?
呼啦一陣風

TA貢獻1802條經驗 獲得超6個贊

用 "attr" 獲取 "valuenow" 的值怎么樣?


<td>

    <span class="header-text">

        <div class="progress-bar 

             progress-bar-striped active progressbartextcolor" 

             id="progressbarcolorchange" role="progressbar" aria- 

             valuenow="25" aria-valuemin="0" v-bind:style="{width: 

             customerLoan.progress + '%'}" aria-valuemax="100"> 

            {{customerLoan.progress || "0"}}%</div>

    </span>

</td>

<script>

    $(document).ready(function () {

        var bar = $('#progressbarcolorchange').attr('valuenow');

        if (bar <= 50) {

            $('#progressbarcolorchange').addClass("progress-bar-warning");

        } else {

            $('#progressbarcolorchange').addClass("progress-bar-success");

        }

    });

</script>

我猜“valuenow”總是在變化,對嗎?


查看完整回答
反對 回復 2021-08-26
  • 2 回答
  • 0 關注
  • 179 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號