初始提交:OCI 面板前端(含 GenAI 网关一期)

This commit is contained in:
Wang Defa
2026-07-09 15:31:29 +08:00
commit db45a669e3
135 changed files with 25220 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
<script setup lang="ts">
import { NButton, NIcon, useMessage } from 'naive-ui'
import { truncOcid } from '@/composables/useFormat'
const props = defineProps<{ ocid: string }>()
const message = useMessage()
async function copy() {
await navigator.clipboard.writeText(props.ocid)
message.success('已复制 OCID')
}
</script>
<template>
<span class="inline-flex min-w-0 items-center gap-1">
<span class="mono truncate whitespace-nowrap" :title="ocid">{{ truncOcid(ocid) }}</span>
<NButton size="tiny" quaternary aria-label="复制 OCID" @click="copy">
<template #icon>
<NIcon size="14">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<rect x="9" y="9" width="13" height="13" rx="2" />
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
</svg>
</NIcon>
</template>
</NButton>
</span>
</template>