提交 64c6563f authored 作者: 龙菲's avatar 龙菲

修改element-ui升级带来的confirm不兼容的问题

上级 b8c53c79
......@@ -19,7 +19,7 @@
<template v-slot:status="data">
<el-popconfirm
:title="getStatusTitle(data.scope.status)"
@onConfirm="handleChangeStatus(data.scope)"
@confirm="handleChangeStatus(data.scope)"
>
<el-switch
slot="reference"
......
......@@ -32,10 +32,13 @@
</div>
<TablePage :data="list.records" :tableTitle="tableTitle" :operates="tableOperates">
<template v-slot:status="data">
<el-popconfirm :title="getStatusTitle(data.scope.status)" @onConfirm="handleChangeStatus(data.scope)">
<el-popconfirm :title="getStatusTitle(data.scope.status)" @confirm="handleChangeStatus(data.scope)"
v-if="!isDisabledStatusbtn(data.scope.checkStatus)">
<el-switch slot="reference" :disabled="isDisabledStatusbtn(data.scope.checkStatus)"
:value="Boolean(Number(data.scope.status))"></el-switch>
</el-popconfirm>
<el-switch slot="reference" :disabled="isDisabledStatusbtn(data.scope.checkStatus)"
:value="Boolean(Number(data.scope.status))" v-else></el-switch>
</template>
<template v-slot:displayType="data">
{{ dicts.displayType[data.scope.type] }}
......@@ -248,7 +251,7 @@ export default {
isDisabled(checkStatus) {
return (checkStatus) => {
return checkStatus == '0'
return checkStatus == '0'
//在审核中和已通过,则不能使用提交审核、编辑及删除按钮
}
},
......
......@@ -17,7 +17,7 @@
" />
</template>
<template v-slot:status="data">
<el-popconfirm :title="getStatusTitle(data.scope.status)" @onConfirm="handleChangeStatus(data.scope)">
<el-popconfirm :title="getStatusTitle(data.scope.status)" @confirm="handleChangeStatus(data.scope)">
<el-switch slot="reference" :value="Boolean(Number(data.scope.status))"></el-switch>
</el-popconfirm>
</template>
......
......@@ -17,7 +17,7 @@
</div>
<TablePage :data="list.records" :tableTitle="tableTitle" :operates="tableOperates" v-loading="loading">
<template v-slot:status="data">
<el-popconfirm :title="getStatusTitle(data.scope.status)" @onConfirm="handleChangeStatus(data.scope)">
<el-popconfirm :title="getStatusTitle(data.scope.status)" @confirm="handleChangeStatus(data.scope)">
<el-switch slot="reference" :value="Boolean(Number(data.scope.status))"></el-switch>
</el-popconfirm>
</template>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论