提交 f891fc74 编写于 作者: View Design's avatar View Design

Update index.vue

上级 db1b7458
......@@ -5,37 +5,26 @@
autoresize
placeholder="输入搜索内容..."
/>
<UDropdown
:items="repos"
:popper="{ placement: 'bottom-start' }"
>
<UButton
color="white"
:label="selectedRepo ? selectedRepo : '选择 GitHub 项目'"
trailing-icon="i-heroicons-chevron-down-20-solid"
<div class="flex justify-between">
<USelectMenu
class="min-w-40"
v-model="selectedRepo"
:options="repos"
placeholder="选择 GitHub 项目"
searchable
/>
<template #repo="{ item }">
<div @click="handleSelectRepo(item.label)">{{ item.label }}</div>
</template>
</UDropdown>
<UButton
trailing-icon="i-heroicons-chevron-right-20-solid"
@click="handleSearch"
>搜索</UButton>
</div>
</div>
</div>
</template>
<script setup>
const repos = [
[
{
label: 'keycloak',
slot: 'repo'
},
{
label: 'ViewUIPlus',
slot: 'repo'
}
]
]
const repos = ['keycloak', 'ViewUIPlus']
const selectedRepo = ref(null)
const handleSelectRepo = (repo) => {
selectedRepo.value = repo;
const handleSearch = () => {
}
</script>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册