btcpayserver/BTCPayServer/wwwroot/pos/cart.js

31 lines
756 B
JavaScript
Raw Normal View History

document.addEventListener("DOMContentLoaded",function () {
new Vue({
el: '#PosCart',
mixins: [posCommon],
data () {
return {
$cart: null,
amount: 0,
persistState: true
}
},
watch: {
cart: {
handler(newCart) {
if (!newCart || newCart.length === 0) {
this.$cart.hide()
}
}
}
},
methods: {
toggleCart() {
this.$cart.toggle()
}
},
mounted() {
2023-08-05 11:44:59 +03:00
this.$cart = new bootstrap.Offcanvas(this.$refs.cart, { backdrop: false })
}
});
});