init aop log

This commit is contained in:
Chuck1sn
2025-07-07 16:13:52 +08:00
parent 5c685d4f74
commit 36d285a61d
22 changed files with 1741 additions and 44 deletions

View File

@@ -42,7 +42,7 @@
<Avatar :src="user.avatar" size="sm" />
</button>
</div>
<div class="z-50 hidden my-4 text-base list-none bg-white divide-y divide-gray-100 rounded-sm shadow-sm "
<div class="z-50 hidden my-4 text-base list-none bg-white divide-y divide-gray-100 rounded-sm shadow-sm"
id="dropdown-user">
<div class="px-4 py-3" role="none">
<p class="text-sm font-medium text-gray-900 truncate " role="none">

View File

@@ -1,53 +1,53 @@
<template>
<div class="relative overflow-x-auto shadow-md sm:rounded-lg">
<table class="w-full text-sm text-left rtl:text-right text-gray-500">
<thead class="text-xs text-gray-700 uppercase bg-gray-50">
<tr>
<th v-if="hasCheckbox" scope="col" class="p-4 w-4">
<div class="flex items-center">
<input id="checkbox-all-search" type="checkbox" v-model="allChecked" @change="handleAllCheckedChange"
class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded-sm focus:ring-blue-500 focus:ring-2">
<label for="checkbox-all-search" class="sr-only">checkbox</label>
</div>
</th>
<th v-for="(column, index) in columns" :key="index" scope="col" :class="[
<div class="relative overflow-x-auto shadow-md sm:rounded-lg">
<table class="w-full text-sm text-left rtl:text-right text-gray-500 whitespace-nowrap">
<thead class="text-xs text-gray-700 uppercase bg-gray-50">
<tr>
<th v-if="hasCheckbox" scope="col" class="p-4 w-4">
<div class="flex items-center">
<input id="checkbox-all-search" type="checkbox" v-model="allChecked" @change="handleAllCheckedChange"
class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded-sm focus:ring-blue-500 focus:ring-2">
<label for="checkbox-all-search" class="sr-only">checkbox</label>
</div>
</th>
<th v-for="(column, index) in columns" :key="index" scope="col" :class="[
'px-6 py-3',
column.sortable ? 'cursor-pointer' : '',
column.class || ''
]" @click="column.sortable ? handleSortClick(column.field) : null">
<div class="flex items-center">
<span>{{ column.title }}</span>
<slot v-if="column.sortable" name="sort-icon" :field="column.field"></slot>
</div>
</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, rowIndex) in items" :key="getItemKey(item, rowIndex)"
class="bg-white border-b border-gray-200 hover:bg-gray-50">
<td v-if="hasCheckbox" class="w-4 p-4">
<div class="flex items-center">
<input :id="`checkbox-table-search-${rowIndex}`" :value="getItemId(item)" type="checkbox"
v-model="checkedItems"
class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded-sm focus:ring-blue-500 focus:ring-2">
<label :for="`checkbox-table-search-${rowIndex}`" class="sr-only">checkbox</label>
</div>
</td>
<td v-for="(column, colIndex) in columns" :key="colIndex" :class="[
<div class="flex items-center">
<span>{{ column.title }}</span>
<slot v-if="column.sortable" name="sort-icon" :field="column.field"></slot>
</div>
</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, rowIndex) in items" :key="getItemKey(item, rowIndex)"
class="bg-white border-b border-gray-200 hover:bg-gray-50">
<td v-if="hasCheckbox" class="w-4 p-4">
<div class="flex items-center">
<input :id="`checkbox-table-search-${rowIndex}`" :value="getItemId(item)" type="checkbox"
v-model="checkedItems"
class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded-sm focus:ring-blue-500 focus:ring-2">
<label :for="`checkbox-table-search-${rowIndex}`" class="sr-only">checkbox</label>
</div>
</td>
<td v-for="(column, colIndex) in columns" :key="colIndex" :class="[
'px-6 py-4',
column.class || '',
colIndex === 0 ? 'font-medium text-gray-900' : ''
]">
<slot :name="column.field" :item="item" :index="rowIndex">
<div class="max-w-sm whitespace-nowrap overflow-hidden text-ellipsis">
{{ getItemValue(item, column.field) }}
</div>
</slot>
</td>
</tr>
</tbody>
</table>
</div>
<slot :name="column.field" :item="item" :index="rowIndex">
<div class="max-w-sm whitespace-nowrap overflow-hidden text-ellipsis">
{{ getItemValue(item, column.field) }}
</div>
</slot>
</td>
</tr>
</tbody>
</table>
</div>
</template>
<script setup generic="T" lang="ts">