调整删除方法 放弃使用el-popover 删除操作使用弹窗提示
This commit is contained in:
@@ -461,31 +461,12 @@
|
||||
:disabled="(scope.$index + 1) === form.fields.length"
|
||||
@click="moveDownField(scope.$index)"
|
||||
>下移</el-button>
|
||||
<el-popover
|
||||
v-model="scope.row.visible"
|
||||
placement="top"
|
||||
>
|
||||
<p>确定删除吗?</p>
|
||||
<div style="text-align: right; margin-top: 8px;">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="scope.row.visible = false"
|
||||
>取消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="deleteField(scope.$index)"
|
||||
>确定</el-button>
|
||||
</div>
|
||||
<template #reference>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
icon="delete"
|
||||
@click="scope.row.visible = true"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-popover>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
icon="delete"
|
||||
@click="deleteField(scope.$index)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -805,7 +786,13 @@ const closeDialog = () => {
|
||||
dialogFlag.value = false
|
||||
}
|
||||
const deleteField = (index) => {
|
||||
form.value.fields.splice(index, 1)
|
||||
ElMessageBox.confirm('确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async() => {
|
||||
form.value.fields.splice(index, 1)
|
||||
})
|
||||
}
|
||||
const autoCodeForm = ref(null)
|
||||
const enterForm = async(isPreview) => {
|
||||
|
Reference in New Issue
Block a user