Files
Wormhole/web/src/components/ClientSelect.vue
T
rose_cat707 0d84b07f68
CI / docker (push) Successful in 1m58s
feat: Wormhole 内网穿透与反向代理网关
Go + Vue 管理台:Agent 隧道、域名反代、IP 安全、访客验证与监控大盘。
Gitea Actions CI 多架构镜像;纯 Go SQLite、无 CGO Docker 构建。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 17:52:43 +08:00

37 lines
819 B
Vue

<template>
<el-select
:model-value="modelValue"
:disabled="disabled"
filterable
:placeholder="t('clientSelect.placeholder')"
class="w-full"
@update:model-value="$emit('update:modelValue', $event)"
>
<el-option
v-for="c in clients"
:key="c.id"
:label="clientLabel(c)"
:value="c.id"
/>
</el-select>
</template>
<script setup>
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
defineProps({
modelValue: { type: Number, default: null },
clients: { type: Array, default: () => [] },
disabled: { type: Boolean, default: false },
})
defineEmits(['update:modelValue'])
function clientLabel(c) {
const status = c.online ? t('common.online') : t('common.offline')
return t('clientSelect.label', { name: c.name, id: c.id, status })
}
</script>