开放溯源接口

This commit is contained in:
BBIT-Kai
2026-07-08 10:20:46 +08:00
parent 73c47bee88
commit c4e24a29da
6 changed files with 543 additions and 1 deletions
@@ -456,6 +456,15 @@ async function copyTemplate(id: string) {
}
}
async function copyTemplateId(id: string) {
try {
await navigator.clipboard.writeText(id);
message.success('模板ID已复制');
} catch {
message.warning('当前浏览器不支持自动复制,请手动复制模板ID');
}
}
async function createLibraryNode(category: 'business' | 'public') {
const node: EditableTemplateNode = {
...createEmptyNode(category),
@@ -1040,6 +1049,13 @@ onMounted(async () => {
<span>{{ item.nodeCount }} 节点</span>
<span>{{ item.batchCount }} 批次</span>
</div>
<div class="template-card__id">
<span>模板ID</span>
<code :title="item.id">{{ item.id }}</code>
<Button size="small" type="link" @click.stop="copyTemplateId(item.id)">
复制ID
</Button>
</div>
<p class="template-card__remark">
{{ item.remark || '暂无备注' }}
</p>
@@ -2816,6 +2832,34 @@ onMounted(async () => {
margin: 8px 0 6px;
}
.template-card__id {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
align-items: center;
gap: 8px;
margin: 8px 0;
padding: 8px 10px;
border: 1px solid #dbe7ff;
border-radius: 10px;
background: #f3f7ff;
}
.template-card__id code {
min-width: 0;
overflow: hidden;
color: #1f4fd6;
font-size: 12px;
line-height: 1.4;
text-overflow: ellipsis;
white-space: nowrap;
}
.template-card__id :deep(.ant-btn) {
height: auto;
padding: 0;
font-size: 12px;
}
.template-card__remark {
margin: 6px 0 0;
color: #556070;
+1 -1
View File
@@ -1,7 +1,7 @@
# push_docker.ps1
# Set version
$env:VERSION = "1.5.6"
$env:VERSION = "1.5.7"
# Docker registry/repository
$registry = "docker.bbitcn.net/bbit_ai/ce_vue"