There is no scroll bar when using better-scroll,

used in js like this:

 created() {
       this.getBanks();
    },

methods: {
/**
         * 
         */
        getBanks() {
            this.service.refundBanks({
                orderId: this.orderId,
            }).then(result => {
                if (result.success) {
                    this.bankList = result.data;
                    // this.$root.bankList = result.data;
                    this.$nextTick(() => {
                        this._initScroll();
                    });
                }
            });
            this.showFlag = true;
        },
        _initScroll () {
            console.log(this.$refs.bankBox);
            this.bankBoxScroll = new BScroll(this.$refs.bankBox, {
                scrollbar: true
            });
        },
}

html:
 <div class="container" ref="bankBox">
                    <div class="content">
                        <h3 v-show="hotBanks.length > 0">Bank yang paling sering digunakan</h3>
                        <ul v-show="hotBanks.length > 0">
                            <li v-for="hotItem in hotBanks" @mousedown="handleSelectBank(hotItem)">{{ hotItem.bankName }}</li>
                        </ul>
                        <h3 v-show="normalBanks.length > 0">Bank Lain</h3>
                        <ul v-show="normalBanks.length > 0">
                            <li v-for="normalItem in normalBanks" @mousedown="handleSelectBank(normalItem)">{{ normalItem.bankName }}</li>
                        </ul>
                        <!---->
                        <p class="no-result" v-show="hotBanks.length === 0 && normalBanks.length === 0">Sorry,results connot be found

</div> </div>

Why is there no scroll bar?

Mar.22,2021

set the width of < div class= "content" > is greater than the width of < div class= "container" ref= "bankBox" >

Menu