在课堂条件下设置默认手风琴项目时出错

时间:2019-04-11 10:20:15

标签: vuejs2 bootstrap-4

在我的laravel 5.7中/ Vuejs(vue“:” ^ 2.6.10“)/” bootstrap“:” ^ 4.3.1“应用程序 使用我想用于调试目的的手风琴,使用模板显示1个块的openec:

            <div :id="'collapse'+nextStateWithRegion.id" v-bind:class="'collapse'+{ ' show' : nextStateWithRegion.id == debugging_state_id }" :aria-labelledby="'heading'+nextStateWithRegion.id"
                 data-parent="#accordion_hostels_by_location">
                <div class="card-body">
                    <!--{{ nextStateWithRegion.regionsOfStateArray }}-->
                    <ul>

                        <li v-for="nextRegionOfState, index in nextStateWithRegion.regionsOfStateArray" :key="nextRegionOfState.id">
                            <!--nextRegionOfState::{{ nextRegionOfState }}-->
                            <router-link :to="{ name: 'hostelsByRegion', params: { region_id: nextRegionOfState.id, state_id : nextRegionOfState.state_id } }"
                                         class="nav-link">{{ nextRegionOfState.name }}
                                <small>( {{ nextRegionOfState.related_common_hostels_count }} hostels with {{ nextRegionOfState.related_featured_hostels_count }}
                                    featured)</small>
                            </router-link>
                        </li>
                    </ul>
                </div>
            </div>

但是结果有所不同,因为我看到的不是“ show”字符串添加到类中,而是“ [object Object]”: https://imgur.com/a/YWenuxh

哪种方法正确?

谢谢!

0 个答案:

没有答案