Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1265 Lượt xem

In Odoo 18, OWL2 (Frontend) I want to use Basic Bootstrap Functionalities like Popovers:
https://getbootstrap.com/docs/5.0/components/popovers/

I got it to work, but it seams a little bit off, as Odoo uses bootstrap 5 and why do I have to additionally import it? Is there a more odoo-nic way?

Codesample: https://github.com/weinni2000/faq/tree/18.0/minimal_owl


"web.assets_frontend": [

 "minimal_owl/static/src/lib/package/bootstrap.bundle.min.js", # bootstrap tooling


async setup() {


onMounted(() => {

const popoverTriggerList = [].slice.call(

document.querySelectorAll('[data-bs-toggle="popover"]')

);

popoverTriggerList.forEach(function (popoverTriggerEl) {

/* eslint-disable no-undef */

new bootstrap.Popover(popoverTriggerEl);

});

});

}

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 12 24
1446
0
thg 4 24
1174
2
thg 4 24
3157
1
thg 6 23
2849
2
thg 7 25
6520