OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
{{--
|
||||
One tab panel paired with x-global::navigation.tabs.tab by `name`.
|
||||
|
||||
Renders the full panel contract (id/role/aria-labelledby/tabindex +
|
||||
data attributes) so consumers never hand-write it. Works in both
|
||||
component modes: `toggle` (the tabs script shows/hides these) and
|
||||
`manual` (the page's own JS moves them — pass extra classes/attrs
|
||||
through, e.g. class="ra-page" inside a deck track).
|
||||
|
||||
Props:
|
||||
name string REQUIRED. Must match the paired tab's name.
|
||||
group string Usually inherited via @aware from the parent tabs
|
||||
component; pass explicitly when the panel renders
|
||||
outside the component tree (deck tracks, separate
|
||||
partials).
|
||||
--}}
|
||||
@props([
|
||||
'name',
|
||||
'group' => null,
|
||||
])
|
||||
@aware(['group' => null])
|
||||
|
||||
<div id="{{ $group }}-panel-{{ $name }}"
|
||||
role="tabpanel"
|
||||
aria-labelledby="{{ $group }}-tab-{{ $name }}"
|
||||
tabindex="0"
|
||||
data-tabs-panel="{{ $name }}"
|
||||
data-tabs-group="{{ $group }}"
|
||||
{{ $attributes }}>
|
||||
{{ $slot }}
|
||||
</div>
|
||||
31
app/Views/Templates/components/navigation/tabs/tab.blade.php
Normal file
31
app/Views/Templates/components/navigation/tabs/tab.blade.php
Normal file
@@ -0,0 +1,31 @@
|
||||
{{--
|
||||
One tab button inside x-global::navigation.tabs.
|
||||
|
||||
Props:
|
||||
name string REQUIRED. Pairs the tab with its panel
|
||||
({group}-tab-{name} controls {group}-panel-{name}).
|
||||
icon string Optional Font Awesome classes (e.g. "fa-users").
|
||||
count mixed Optional count badge; countLabel gives it an
|
||||
accessible name ("7 people" instead of bare "7").
|
||||
selected bool Server-rendered initial selection (exactly one tab
|
||||
per group should pass true).
|
||||
--}}
|
||||
@props([
|
||||
'name',
|
||||
'icon' => null,
|
||||
'count' => null,
|
||||
'countLabel' => null,
|
||||
'selected' => false,
|
||||
])
|
||||
@aware(['group'])
|
||||
|
||||
<button type="button"
|
||||
role="tab"
|
||||
id="{{ $group }}-tab-{{ $name }}"
|
||||
aria-controls="{{ $group }}-panel-{{ $name }}"
|
||||
aria-selected="{{ $selected ? 'true' : 'false' }}"
|
||||
tabindex="{{ $selected ? '0' : '-1' }}"
|
||||
data-tab-name="{{ $name }}"
|
||||
{{ $attributes->merge(['class' => 'lt-tab'.($selected ? ' on' : '')]) }}>
|
||||
@if ($icon)<i class="fa {{ $icon }}" aria-hidden="true"></i> @endif{{ $slot }}@if ($count !== null) <span class="ct" @if ($countLabel) aria-label="{{ $countLabel }}" @endif>{{ $count }}</span>@endif
|
||||
</button>
|
||||
Reference in New Issue
Block a user