fix: dialog强制刷新(:key)+el-button去text属性+Props对齐
This commit is contained in:
@@ -58,14 +58,14 @@
|
||||
<!-- 空状态占位提示 -->
|
||||
<div v-if="objectives.length === 0" class="layer-empty">
|
||||
<el-empty description="暂无目标" :image-size="60">
|
||||
<el-button text type="primary" size="small" @click="$emit('add-objective', layerKey)">
|
||||
<el-button type="primary" size="small" @click="$emit('add-objective', layerKey)">
|
||||
点击 + 添加目标
|
||||
</el-button>
|
||||
</el-empty>
|
||||
</div>
|
||||
|
||||
<!-- 底部添加按钮 -->
|
||||
<el-button text type="primary" size="small" class="layer-add-btn" @click="$emit('add-objective', layerKey)">
|
||||
<el-button type="primary" size="small" class="layer-add-btn" @click="$emit('add-objective', layerKey)">
|
||||
+ 添加目标
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
:all-kpis="allKpis"
|
||||
:get-node-level="getNodeLevel"
|
||||
:get-node-progress="getNodeProgress"
|
||||
@add-objective="(k: string) => openAddDialog(k)"
|
||||
@add-objective="openAddDialog"
|
||||
@edit-objective="(p: any) => openEditDialog(p.dimKey, p.idx, p.obj)"
|
||||
@delete-objective="(p: any) => deleteNode(p.dimKey, p.idx)"
|
||||
@start-link="(p: any) => { const ps = p.key.split('-'); startLink(ps[0], parseInt(ps[ps.length-1]), p.obj) }"
|
||||
@@ -114,6 +114,7 @@
|
||||
|
||||
<!-- 节点编辑弹窗 -->
|
||||
<NodeEditDialog
|
||||
:key="'ned-' + dialogRefreshKey"
|
||||
:visible="showNodeDialog"
|
||||
:form="editingNodeData || { name: '', description: '', icon: 'target', kpis: [] }"
|
||||
:dim-key="editingLayerKey"
|
||||
@@ -122,7 +123,7 @@
|
||||
/>
|
||||
|
||||
<!-- 版本历史弹窗 -->
|
||||
<div v-if="showVersions" class="mc-dialog-overlay" @click.self="showVersions=false">
|
||||
<div v-if="showVersions" :key="'ver-' + dialogRefreshKey" class="mc-dialog-overlay" @click.self="showVersions=false">
|
||||
<div class="mc-dialog-box" style="width:620px;">
|
||||
<div class="mc-dialog-header">
|
||||
<span>版本历史</span>
|
||||
@@ -278,6 +279,7 @@ const kpiProgressMap = reactive<Record<string, KpiProgressItem>>({})
|
||||
const showNodeDialog = ref(false)
|
||||
const editingNodeData = ref<any>(null)
|
||||
const editingLayerKey = ref('')
|
||||
const dialogRefreshKey = ref(0)
|
||||
const showVersions = ref(false)
|
||||
const versions = ref<any[]>([])
|
||||
|
||||
@@ -559,6 +561,7 @@ function onDeleteConnection(idx: number) {
|
||||
function openAddDialog(layerKey: string) {
|
||||
editingLayerKey.value = layerKey
|
||||
editingNodeData.value = null
|
||||
dialogRefreshKey.value++
|
||||
showNodeDialog.value = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user