Skip to content

Commit a8bdc32

Browse files
committed
task-table header & pagination themes style perf
1 parent 3d91251 commit a8bdc32

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

src/Skeleton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function exContextMenuArg(e: MouseEvent) {
198198
<div v-show="currentLayoutId === layout.id" :id="`iw-tt-layout-${layout.id}`" class="iw-tt-layout">
199199
<div
200200
v-if="!tableConf.mini && (layout.sort || layout.filter)"
201-
class="iw-tt-toolbar flex items-center h-[40px] p-0.5"
201+
class="iw-tt-toolbar flex items-center px-0.5 py-[10px]"
202202
>
203203
<RowSortSettingComp v-if="layout.sort" :layout-id="layout.id" :sort="layout.sort" :columns-conf="getCurrentLayoutColumnConf()" />
204204
<div class="iw-divider iw-divider-horizontal m-0.5" />

src/assets/reset.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,18 @@
1919
background-color: var(--sys-primary);
2020
border-color: var(--sys-primary);
2121
}
22+
23+
.iw_tt_add_layout:hover {
24+
background-color: var(--sys-primary);
25+
color: #fff;
26+
}
27+
2228
/* button end*/
2329

2430
/* tabs start*/
2531
.iw-tt
2632
.iw-tabs-boxed
27-
:is(.iw-tab-active, [aria-selected='true']):not(.iw-tab-disabled):not(
33+
:is(.iw-tab-active, [aria-selected="true"]):not(.iw-tab-disabled):not(
2834
[disabled]
2935
),
3036
.iw-tabs-boxed :is(input:checked) {
@@ -34,7 +40,7 @@
3440
/* tabs end*/
3541
/* switch start*/
3642
.iw-tt .iw-toggle-primary:checked,
37-
.iw-toggle-primary[aria-checked='true'] {
43+
.iw-toggle-primary[aria-checked="true"] {
3844
background-color: var(--sys-primary);
3945
border-color: var(--sys-primary);
4046
}

src/components/function/Pagination.vue

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -177,23 +177,24 @@ function changePageSizeStyle(e: Event) {
177177
target.style.borderColor = ''
178178
}
179179
else {
180-
target.style.borderColor = 'oklch(var(--in))'
180+
target.style.borderColor = 'var(--sys-primary)'
181181
arrowEl.style.transform = 'rotate(180deg)'
182182
}
183183
}
184184
185185
function handleJump(e: Event) {
186186
const value = Number((e.target as HTMLInputElement).value)
187187
const total = getTotalPage()
188-
if(!value) return
188+
if (!value)
189+
return
189190
let jumpVal = 1
190-
if(value>0 &&value<total) {
191-
jumpVal=value
191+
if (value > 0 && value < total) {
192+
jumpVal = value
192193
}
193-
else if(value>=total){
194+
else if (value >= total) {
194195
jumpVal = total
195196
}
196-
else if(value<1){
197+
else if (value < 1) {
197198
jumpVal = 1
198199
}
199200
setCurrentPage(jumpVal)
@@ -216,7 +217,7 @@ function handleJump(e: Event) {
216217
<button
217218
v-for="page in getShowPages()"
218219
:key="page"
219-
:class="`flex justify-center px-3 ml-2 py-1 w-[30px] h-[30px] rounded transition-all border-none ${page === getCurrentPage() ? 'text-[oklch(var(--in))]' : ''}`"
220+
:class="`flex justify-center px-3 ml-2 py-1 w-[30px] h-[30px] rounded transition-all border-none ${page === getCurrentPage() ? 'text-[var(--sys-primary)]' : ''}`"
220221
:disabled="page === getCurrentPage()"
221222
@click="setCurrentPage(page)"
222223
>
@@ -227,7 +228,7 @@ function handleJump(e: Event) {
227228
...
228229
</div>
229230
<button
230-
:class="`flex justify-center px-3 ml-2 py-1 w-[30px] h-[30px] rounded transition-all border-none ${getTotalPage() === getCurrentPage() ? 'text-[oklch(var(--in))]' : ''}`"
231+
:class="`flex justify-center px-3 ml-2 py-1 w-[30px] h-[30px] rounded transition-all border-none ${getTotalPage() === getCurrentPage() ? 'text-[var(--sys-primary)]' : ''}`"
231232
@click="setCurrentPage(getTotalPage())"
232233
>
233234
{{ getTotalPage() }}
@@ -239,13 +240,13 @@ function handleJump(e: Event) {
239240
<button v-if="getCurrentPage() < getTotalPage() - 1" class="iw-btn iw-btn-ghost px-1 ml-1 iw-btn-xs" @click="setCurrentPage(getTotalPage())">
240241
<i :class="iconSvg.LAST" />
241242
</button>
242-
<span class="mx-2">{{ $t('function.pagination.jump')}}</span>
243-
<input type="number" class="iw-input iw-input-bordered iw-input-xs rounded-sm w-10" :value="getCurrentPage()" @keyup.enter="handleJump" @blur="handleJump" />
243+
<span class="mx-2">{{ $t('function.pagination.jump') }}</span>
244+
<input type="number" class="iw-input iw-input-bordered iw-input-xs rounded-sm w-10" :value="getCurrentPage()" @keyup.enter="handleJump" @blur="handleJump">
244245
<MenuComp ref="fetchNumberSelectCompRef">
245246
<div
246247
v-for="number in getActualSlice().fetchNumbers" :key="number"
247248
class="p-2 text-center transition-all cursor-pointer rounded hover:bg-gray-100"
248-
:class="`${number === getActualSlice().fetchNumber ? 'text-[oklch(var(--in))]' : ''}`"
249+
:class="`${number === getActualSlice().fetchNumber ? 'text-[var(--sys-primary)]' : ''}`"
249250
@click="setFetchNumber(number)"
250251
>
251252
{{ $t('function.pagination.pageSize', { number }) }}

src/components/function/TableHeaderItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ onMounted(() => {
147147
<div class="iw-dropdown">
148148
<div
149149
tabindex="0" role="button"
150-
class="bg-white iw-tt-header__item iw-tab flex flex-nowrap border-none hover:bg-neutral-400 hover:text-white transition-all"
150+
class="bg-white iw-tt-header__item iw-tab iw_tt_add_layout flex flex-nowrap border-none transition-all"
151151
>
152152
<i :class="`${iconSvg.NEW}`" class="text-lg" />
153153
</div>

0 commit comments

Comments
 (0)