我正在与BootstrapVue.
我有以下情况:我有 aparent.vue和 a child.vue。在我的parent.vue目录中v-for,我可以创建多个Buttons. 其中每一个都会触发b-collapse我的child.vue,并且每一个都有多个b-collapse。(参见代码)
现在我需要做以下事情:当我的内心被关闭时,我想关闭b-collapse我的所有内心。但我不知道该怎么做..(当我重新打开我的-collapse 时它们也应该关闭)child.vueb-collapseparent.vueparent.vue
我已将代码减少到最少。但只是为了获得额外的信息,我每次都会this.inputs.push[{id: this.id +=1}]添加新的项目或元素。所以他们每个人都有一个unique id.
希望有人可以帮助我!
代码
父级.vue
<div v-for="item in inputs" :key="item.id">
<b-button v-b-toggle="'NewItem'+item.id"></b-button>
</div>
<Child/>
<b-button @click="addNewItem()"></b-button>
Run Code Online (Sandbox Code Playgroud)
孩子.vue
<b-collapse visible :id="'NewItem' + item.id"> //Here i need a solution
<div v-for="element in inputs" :key="element.id">
<b-button v-b-toggle="'Element' + element.id"></b-button>
<b-collapse :id="'Element' + element.id>
<div>Here is Element …Run Code Online (Sandbox Code Playgroud) 我想要基于字段名称从到 的MOVE字段。我尝试过以下操作:itab1itab2
CLEAR itab2.
MOVE-CORRESPONDING itab1 TO itab2.
Run Code Online (Sandbox Code Playgroud)
这是可行的,但前提是FIELDS名称相同。
现在我想做类似的事情:
CLEAR itab2.
MOVE-CORRESPONDING itab1-field1 TO itab2-field2.
MOVE-CORRESPONDING itab1-field3 TO itab2-field4.
Run Code Online (Sandbox Code Playgroud)
等等..但是每次我尝试这样做时都会出现以下错误"itab1-field1" is not a structure or an internal table.
我也尝试过这样写,MOVE-CORRESPONDING <itab1>-field1但这也行不通。
我怎样才能实现我想要的?感谢您尝试帮助我..
我有一个看起来像这样的字符串,例如L\xc3\xbcbeck N\xc3\xbcrnberg \xc3\x96sterreich带有“Umlaute”。
现在我想要split它并在字符串上添加新的“单词”,如下所示L\xc3\xbcbeck N\xc3\xbcrnberg \xc3\x96sterreich Luebeck Nuernberg Oesterreich。
\xc3\xa4应该是这样ae,\xc3\xb6应该是这样oe,\xc3\xbc应该是这样ue。
但我不知道如何实现这一目标,谢谢!
\nDATA: lt_split TYPE TABLE OF char40.\n\nSPLIT string AT space INTO TABLE lt_split.\nRun Code Online (Sandbox Code Playgroud)\n 我试图让我的icon旋转像下面一样连续,但它没有旋转或做任何事情。
我知道关于这个主题也有类似的问题,但其中的每个解决方案都不适合我。
我正在与Vue 3、Bootstrap 5.3和 一起工作Chrome。
这里出了什么问题?感谢您的帮助!
.rotating-icon {
animation: transform-icon 5s linear infinite;
}
@keyframes transform-icon {
from {
transform: rotate(0deg) !important;
}
to {
transform: rotate(359deg) !important;
}
}Run Code Online (Sandbox Code Playgroud)
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" integrity="sha384-b6lVK+yci+bfDmaY1u0zE8YYJt0TZxLEAFyYSLHId4xoVvsrQu3INevFKo+Xir8e" crossorigin="anonymous">
<div class="col-1">
<i class="bi bi-hourglass-top rotating-icon"></i>
</div>Run Code Online (Sandbox Code Playgroud)
我正在与Bootstrap5和合作Vue 3。我有多个buttons,每个都触发一个collapse。
我想要的是,如果我打开一个折叠,所有其他折叠都应该关闭。但现在每一个崩溃都会显示出来,而其他的则不会关闭。
我尝试过使用data-parent,data-bs-parent但这些都不起作用。
我怎样才能做到这一点?谢谢你!
<div class="row margin-top">
<div class="col">
<div class="d-grid gap-2">
<button type="button" class="btn color-success" style="height: 200px;" data-bs-toggle="collapse" data-bs-target="#collapse-b1" aria-expanded="false" aria-controls="collapse-b1" data-bs-parent="#myGroup">
Button 1
</button>
</div>
</div>
<div class="col">
<div class="d-grid gap-2">
<button type="button" class="btn color-primary" style="height: 200px;" data-bs-toggle="collapse" data-bs-target="#collapse-b2" aria-expanded="false" aria-controls="collapse-b2" data-bs-parent="#myGroup">
Button 2
</button>
</div>
</div>
</div>
<div>
<div class="collapse" id="collapse-b1">
<div class="mt-3">
Text 1
</div>
</div>
<div class="collapse" id="collapse-b2">
<div class="mt-3">
Text 2 …Run Code Online (Sandbox Code Playgroud) javascript ×3
abap ×2
vue.js ×2
animation ×1
bootstrap-5 ×1
replace ×1
rotation ×1
string ×1
vuejs2 ×1
vuejs3 ×1