mcwl-pc/app/pages/model-square.vue

48 lines
1.0 KiB
Vue

<script setup lang="ts">
import { ref } from 'vue'
definePageMeta({
layout: 'default',
})
const myItems = [1, 2, 3, 4, 5, 6, 7]
const scrollListRef = ref(null)
// 处理选中项改变
function handleChange(index) {
console.log('Current index:', index)
}
// 处理项目点击
function handleItemClick({ index, item }) {
console.log('Clicked item:', item, 'at index:', index)
}
</script>
<template>
<div class="p-6">
<h1 class="text-2xl font-bold">
模型广场
</h1>
<!-- <ScrollListView
ref="scrollListRef"
title="My Scroll List"
:items="myItems"
:initial-index="2"
@change="handleChange"
@item-click="handleItemClick"
>
<template #item="{ item }">
<div class="custom-item">
<span>{{ item }}</span>
</div>
</template>
</ScrollListView> -->
<!-- <button @click="handleTest"></button>
<client-only>
{{ useUser.brief }}
</client-only> -->
<!-- 这里添加模型广场的具体内容 -->
</div>
</template>