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

add repo select

上级 e6c56712
export default defineAppConfig({
ui: {
primary: '#ff6600',
primary: 'green',
gray: 'cool'
}
})
......@@ -7,6 +7,7 @@
"name": "nuxt-app",
"hasInstallScript": true,
"dependencies": {
"@iconify-json/simple-icons": "^1.1.101",
"@nuxt/ui": "^2.16.0",
"@vite-pwa/nuxt": "^0.7.0",
"nuxt": "^3.11.2",
......@@ -2345,6 +2346,14 @@
"@iconify/types": "*"
}
},
"node_modules/@iconify-json/simple-icons": {
"version": "1.1.101",
"resolved": "https://registry.npmjs.org/@iconify-json/simple-icons/-/simple-icons-1.1.101.tgz",
"integrity": "sha512-7h7iUvCok031UcYUt2+wPD21tOwu/AzFB2I2PzzoC3R1jsNJjn5YV3v1q0g2CXcMYAzcsCyH00RbpFPFAiqjcw==",
"dependencies": {
"@iconify/types": "*"
}
},
"node_modules/@iconify/collections": {
"version": "1.0.421",
"resolved": "https://registry.npmjs.org/@iconify/collections/-/collections-1.0.421.tgz",
......@@ -16705,6 +16714,14 @@
"@iconify/types": "*"
}
},
"@iconify-json/simple-icons": {
"version": "1.1.101",
"resolved": "https://registry.npmjs.org/@iconify-json/simple-icons/-/simple-icons-1.1.101.tgz",
"integrity": "sha512-7h7iUvCok031UcYUt2+wPD21tOwu/AzFB2I2PzzoC3R1jsNJjn5YV3v1q0g2CXcMYAzcsCyH00RbpFPFAiqjcw==",
"requires": {
"@iconify/types": "*"
}
},
"@iconify/collections": {
"version": "1.0.421",
"resolved": "https://registry.npmjs.org/@iconify/collections/-/collections-1.0.421.tgz",
......
......@@ -10,6 +10,7 @@
"postinstall": "nuxt prepare"
},
"dependencies": {
"@iconify-json/simple-icons": "^1.1.101",
"@nuxt/ui": "^2.16.0",
"@vite-pwa/nuxt": "^0.7.0",
"nuxt": "^3.11.2",
......
<template>
<div class="flex items-center justify-center h-full max-w-full">
<div class="max-w-screen-sm w-full">
<div class="max-w-screen-sm w-full flex flex-col space-y-4">
<UTextarea
autoresize
placeholder="输入搜索内容..."
/>
<UDropdown
:items="repos"
:popper="{ placement: 'bottom-start' }"
>
<UButton
color="white"
:label="selectedRepo ? selectedRepo : '选择 GitHub 项目'"
trailing-icon="i-heroicons-chevron-down-20-solid"
/>
<template #repo="{ item }">
<div @click="handleSelectRepo(item.label)">{{ item.label }}</div>
</template>
</UDropdown>
</div>
</div>
</template>
<script setup>
const repos = [
[
{
label: 'keycloak',
slot: 'repo'
},
{
label: 'ViewUIPlus',
slot: 'repo'
}
]
]
const selectedRepo = ref(null)
const handleSelectRepo = (repo) => {
selectedRepo.value = repo;
}
</script>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册