mirror of https://github.com/veops/cmdb.git
fix 新增类型回车键发送两次请求
This commit is contained in:
parent
093466ef06
commit
95d3b0233a
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="action-btn">
|
||||
<a-button @click="handleCreate" type="primary" style="margin-bottom: 15px">新增关系类型</a-button>
|
||||
<a-button @click="handleCreate" type="primary" style="margin-bottom: 15px;">新增关系类型</a-button>
|
||||
</div>
|
||||
<vxe-table
|
||||
ref="relationTypeTable"
|
||||
|
@ -10,9 +10,6 @@
|
|||
highlight-hover-row
|
||||
:edit-config="{ trigger: 'manual', mode: 'row' }"
|
||||
@edit-closed="handleEditClose"
|
||||
stripe
|
||||
class="ops-stripe-table"
|
||||
bordered
|
||||
>
|
||||
<vxe-table-column
|
||||
field="name"
|
||||
|
@ -20,17 +17,17 @@
|
|||
:edit-render="{ name: 'input', attrs: { type: 'text' }, events: { keyup: customCloseEdit } }"
|
||||
></vxe-table-column>
|
||||
<vxe-table-column field="updateTime" title="更新时间">
|
||||
<template #default="{ row }">
|
||||
<template #default="{row}">
|
||||
{{ row.updated_at || row.created_at }}
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
<vxe-table-column field="operation" title="操作" align="center">
|
||||
<template #default="{ row }">
|
||||
<template #default="{row}">
|
||||
<template>
|
||||
<a><a-icon type="edit" @click="handleEdit(row)" /></a>
|
||||
<a><a-icon type="edit" @click="handleEdit(row)"/></a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="确认删除吗?" @confirm="handleDelete(row)" okText="是" cancelText="否">
|
||||
<a :style="{ color: 'red' }"><a-icon type="delete" /></a>
|
||||
<a :style="{ color: 'red' }"><a-icon type="delete"/></a>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</template>
|
||||
|
@ -122,7 +119,6 @@ export default {
|
|||
if ($event.keyCode === 13) {
|
||||
const $table = this.$refs.relationTypeTable
|
||||
$table.clearActived()
|
||||
this.handleEditClose({ row: value.row })
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue