diff --git a/src/views/components/confirm/index.ts b/src/views/components/confirm/index.ts new file mode 100644 index 0000000..8e99a03 --- /dev/null +++ b/src/views/components/confirm/index.ts @@ -0,0 +1,18 @@ +import { ElMessageBox } from 'element-plus' +const confirm = ({content, type,title, callback}:any) => { + ElMessageBox.confirm( + content, + title, + { + confirmButtonText: 'OK', + cancelButtonText: 'Cancel', + type, + } + ) + .then(() => { + callback && callback() + }) + .catch(() => { + }) +} + diff --git a/src/views/graphite/components/AddLiquid.vue b/src/views/graphite/components/AddLiquid.vue index 3110363..065203f 100644 --- a/src/views/graphite/components/AddLiquid.vue +++ b/src/views/graphite/components/AddLiquid.vue @@ -2,13 +2,19 @@