long item controlled for long tab items
This commit is contained in:
parent
94554a463e
commit
9a495ce457
19
resources/assets/js/views/common/contacts.js
vendored
19
resources/assets/js/views/common/contacts.js
vendored
@ -37,6 +37,25 @@ const app = new Vue({
|
|||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.form.create_user = false;
|
this.form.create_user = false;
|
||||||
|
|
||||||
|
//swiper slider for long tabs items
|
||||||
|
for (let [index, item] of document.querySelectorAll('[data-swiper]').entries()) {
|
||||||
|
item.id = index;
|
||||||
|
|
||||||
|
new Swiper(".swiper-tabs-container", {
|
||||||
|
loop: false,
|
||||||
|
slidesPerView: Number(item.getAttribute('data-swiper')),
|
||||||
|
pagination: {
|
||||||
|
el: ".swiper-pagination",
|
||||||
|
clickable: true
|
||||||
|
},
|
||||||
|
navigation: {
|
||||||
|
nextEl: ".swiper-button-next",
|
||||||
|
prevEl: ".swiper-button-prev",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//swiper slider for long tabs items
|
||||||
},
|
},
|
||||||
|
|
||||||
methods:{
|
methods:{
|
||||||
|
@ -134,7 +134,7 @@
|
|||||||
|
|
||||||
@if (! $hideBottomRight)
|
@if (! $hideBottomRight)
|
||||||
<x-show.content.right>
|
<x-show.content.right>
|
||||||
<x-tabs active="documents">
|
<x-tabs id="" slides="3" active="documents">
|
||||||
<x-slot name="navs">
|
<x-slot name="navs">
|
||||||
@stack('documents_nav_start')
|
@stack('documents_nav_start')
|
||||||
|
|
||||||
@ -146,6 +146,34 @@
|
|||||||
|
|
||||||
@stack('transactions_nav_start')
|
@stack('transactions_nav_start')
|
||||||
|
|
||||||
|
<x-tabs.nav
|
||||||
|
id="transactions"
|
||||||
|
name="{{ trans_choice('general.transactions', 2) }}"
|
||||||
|
/>
|
||||||
|
<x-tabs.nav
|
||||||
|
id="transactions"
|
||||||
|
name="{{ trans_choice('general.transactions', 2) }}"
|
||||||
|
/>
|
||||||
|
<x-tabs.nav
|
||||||
|
id="transactions"
|
||||||
|
name="{{ trans_choice('general.transactions', 2) }}"
|
||||||
|
/>
|
||||||
|
<x-tabs.nav
|
||||||
|
id="transactions"
|
||||||
|
name="{{ trans_choice('general.transactions', 2) }}"
|
||||||
|
/>
|
||||||
|
<x-tabs.nav
|
||||||
|
id="transactions"
|
||||||
|
name="{{ trans_choice('general.transactions', 2) }}"
|
||||||
|
/>
|
||||||
|
<x-tabs.nav
|
||||||
|
id="transactions"
|
||||||
|
name="{{ trans_choice('general.transactions', 2) }}"
|
||||||
|
/>
|
||||||
|
<x-tabs.nav
|
||||||
|
id="transactions"
|
||||||
|
name="{{ trans_choice('general.transactions', 2) }}"
|
||||||
|
/>
|
||||||
<x-tabs.nav
|
<x-tabs.nav
|
||||||
id="transactions"
|
id="transactions"
|
||||||
name="{{ trans_choice('general.transactions', 2) }}"
|
name="{{ trans_choice('general.transactions', 2) }}"
|
||||||
|
@ -1,10 +1,28 @@
|
|||||||
@props(['active'])
|
@props(['active', 'id'])
|
||||||
|
|
||||||
<div x-data="{ active: window.location.hash.split('#')[1] == undefined ? '{{ $active }}' : window.location.hash.split('#')[1] }">
|
@php
|
||||||
<div>
|
if (! empty($attributes['slides'])) {
|
||||||
<ul {{ ((! $attributes->has('override')) || ($attributes->has('override') && ! in_array('class', explode(',', $attributes->get('override'))))) ? $attributes->merge(['class' => 'flex items-center']) : $attributes }}>
|
$slides = $attributes['slides'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($attributes['slides'])) {
|
||||||
|
$slides = '2';
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<div id="{{ $id }}" data-swiper="{{ $slides }}" class="swiper" x-data="{ active: window.location.hash.split('#')[1] == undefined ? '{{ $active }}' : window.location.hash.split('#')[1] }">
|
||||||
|
<div class="swiper-tabs-container">
|
||||||
|
<ul class="swiper-wrapper" {{ ((! $attributes->has('override')) || ($attributes->has('override') && ! in_array('class', explode(',', $attributes->get('override'))))) ? $attributes->merge(['class' => 'flex items-center']) : $attributes }}>
|
||||||
{!! $navs !!}
|
{!! $navs !!}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<div class="swiper-button-next top-3 right-0">
|
||||||
|
<span class="material-icons">chevron_right</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="swiper-button-prev top-3 left-0">
|
||||||
|
<span class="material-icons">chevron_left</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!! $content !!}
|
{!! $content !!}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@props(['id', 'name', 'href', 'active'])
|
@props(['id', 'name', 'href', 'active'])
|
||||||
|
|
||||||
<li
|
<li
|
||||||
class="relative px-8 text-sm text-center pb-2 cursor-pointer transition-all border-b tabs-link"
|
class="swiper-slide relative px-8 text-sm text-center pb-2 cursor-pointer transition-all border-b tabs-link"
|
||||||
id="tab-{{ $id }}"
|
id="tab-{{ $id }}"
|
||||||
data-id="tab-{{ $id }}"
|
data-id="tab-{{ $id }}"
|
||||||
data-tabs="{{ $id }}"
|
data-tabs="{{ $id }}"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@props(['id', 'name', 'active'])
|
@props(['id', 'name', 'active'])
|
||||||
|
|
||||||
<li
|
<li
|
||||||
class="relative px-8 text-sm text-center pb-2 cursor-pointer transition-all border-b tabs-link"
|
class="swiper-slide relative px-8 text-sm text-center pb-2 cursor-pointer transition-all border-b tabs-link"
|
||||||
id="tab-{{ $id }}"
|
id="tab-{{ $id }}"
|
||||||
data-id="tab-{{ $id }}"
|
data-id="tab-{{ $id }}"
|
||||||
data-tabs="{{ $id }}"
|
data-tabs="{{ $id }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user