Commit c526d3a6 authored by 郭铭瑶's avatar 郭铭瑶 🤘

修改标签名称改为输入

parent 469538c9
......@@ -200,7 +200,7 @@
</n-drawer-content>
</n-drawer>
<n-drawer v-model:show="showEditDrawer" :width="340" placement="left">
<n-drawer-content title="编辑节点" closable>
<n-drawer-content title="编辑" closable>
<n-form ref="editFormRef" :model="editData" :rules="rules" size="small">
<template v-if="curNode.nodeLabel === 'Subject'">
<n-form-item path="subjectName" label="名称">
......@@ -232,12 +232,10 @@
</template>
<template v-else-if="curNode.nodeLabel === 'SubjectLabel'">
<n-form-item label="标签名称" path="labelName">
<n-select
<n-input
v-model:value="editData.labelName"
placeholder="请选择"
filterable
tag
:options="tagOptions"
placeholder="请输入"
@keydown.enter.prevent
/>
</n-form-item>
<n-form-item label="标签分类" path="classification">
......@@ -502,10 +500,11 @@ const curNode = ref(null)
function deleteNode(data) {
dialog.error({
title: '删除节点',
content: `确定是否删除 '${
data[data.nodeLabel.toLowerCase() + 'Name']
}' 节点?`,
title: '提示',
content:
data.nodeLabel === 'SubjectLabel'
? `是否删除 '${data.labelName}' 标签`
: `是否删除 '${data[data.nodeLabel.toLowerCase() + 'Name']}' 节点?`,
positiveText: '确定',
negativeText: '取消',
maskClosable: false,
......@@ -524,6 +523,7 @@ function deleteNode(data) {
(link) => link.source.id != data.id && link.target.id != data.id
),
}
fetchTags()
}
message.success('删除成功!')
})
......@@ -537,8 +537,8 @@ function deleteLink(data) {
target.systemName || source.subjectName
}'`
dialog.error({
title: '删除关联',
content: `确定是否删除 ${name} 关联关系?`,
title: '提示',
content: `是否删除 ${name} 关联关系?`,
positiveText: '确定',
negativeText: '取消',
maskClosable: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment