This commit is contained in:
李志鹏
2025-10-16 14:49:01 +08:00
parent d2a7b76ec9
commit 3c1baa843e
7 changed files with 58 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, onMounted, inject } from 'vue'
import { ref, reactive, onMounted, inject } from 'vue'
import HeaderTitle from '@/components/HeaderTitle.vue'
import FooterNavigation from '@/components/FooterNavigation.vue'
const emit = defineEmits(['view-type'])
@@ -8,12 +8,24 @@
emit('view-type', 1)
})
const list = reactive([
{ id: 1, userID: '1111111111', datetime: '7/22/2025 18:20', lastopened: '18:20' },
{ id: 2, userID: '2222222222', datetime: '7/22/2025 18:20', lastopened: '18:20' },
{ id: 3, userID: '3333333333', datetime: '7/22/2025 18:20', lastopened: '18:20' },
{ id: 4, userID: '4444444444', datetime: '7/22/2025 18:20', lastopened: '18:20' },
{ id: 5, userID: '5555555555', datetime: '7/22/2025 18:20', lastopened: '18:20' },
{ id: 6, userID: '6666666666', datetime: '7/22/2025 18:20', lastopened: '18:20' },
{ id: 7, userID: '7777777777', datetime: '7/22/2025 18:20', lastopened: '18:20' },
{ id: 8, userID: '8888888888', datetime: '7/22/2025 18:20', lastopened: '18:20' },
{ id: 9, userID: '9999999999', datetime: '7/22/2025 18:20', lastopened: '18:20' },
{ id: 10, userID: '0000000000', datetime: '7/22/2025 18:20', lastopened: '18:20' }
])
const onRetrieveItem = (i: number) => {
console.log('检索' + i)
}
const deleteItem = (i: number) => {
console.log('删除' + i)
list.splice(i, 1)
}
</script>
@@ -22,14 +34,14 @@
<div class="library">
<div class="title">Library</div>
<div class="list">
<div class="item" v-for="i in 10" :key="i">
<div class="item" v-for="(v, i) in list" :key="v.id">
<div class="image">
<img src="@/assets/images/workshop/posture/posture_1.png" />
</div>
<div class="content">
<span class="userID">User ID: 1234567890</span>
<span class="datetime">7/22/2025 18:20</span>
<span class="lastopened">Last opened 18:20</span>
<span class="userID">User ID: {{ v.userID }}</span>
<span class="datetime">{{ v.datetime }}</span>
<span class="lastopened">Last opened {{ v.lastopened }}</span>
<button @click="onRetrieveItem(i)">Retrieve</button>
</div>
<div class="delete" @click="deleteItem(i)"><SvgIcon name="delete2" size="30" /></div>
@@ -65,7 +77,6 @@
right: -40rem;
background: linear-gradient(88.42deg, #ffffff 32.58%, #d9d9d9 94.9%);
transform: rotate(-45deg);
}
> .title {