feat: 按UI图调整设备点位交互
parent
d22275bffb
commit
0900103bf6
@ -1,81 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: donghao donghao@supervision.ltd
|
|
||||||
* @Date: 2024-02-22 13:38:04
|
|
||||||
* @LastEditors: donghao donghao@supervision.ltd
|
|
||||||
* @LastEditTime: 2024-08-22 17:46:27
|
|
||||||
* @FilePath: \General-AI-Platform-Web-Client\src\components\TableActionCard\isDelete.tsx
|
|
||||||
* @Description: 是否删除
|
|
||||||
*/
|
|
||||||
import { defineComponent, PropType } from "vue";
|
|
||||||
import { ElDialog, ElButton } from "element-plus";
|
|
||||||
// TODO 完善删除交互
|
|
||||||
export default defineComponent({
|
|
||||||
name: "IsDelete",
|
|
||||||
props: {
|
|
||||||
title: {
|
|
||||||
type: String as PropType<string>,
|
|
||||||
default: "提示"
|
|
||||||
},
|
|
||||||
message: {
|
|
||||||
type: String as PropType<string>,
|
|
||||||
default: "确定要删除吗?"
|
|
||||||
},
|
|
||||||
visible: {
|
|
||||||
type: Boolean as PropType<boolean>,
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
emits: ["update:visible", "confirm"],
|
|
||||||
setup(props, { emit }) {
|
|
||||||
// const visible = ref(props.visible);
|
|
||||||
|
|
||||||
const handleConfirm = () => {
|
|
||||||
emit("confirm");
|
|
||||||
// visible.value = false;
|
|
||||||
// emit("update:visible", false);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleCancel = () => {
|
|
||||||
// visible.value = false;
|
|
||||||
emit("update:visible", false);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleClose = () => {
|
|
||||||
// visible.value = false;
|
|
||||||
emit("update:visible", false);
|
|
||||||
// done();
|
|
||||||
};
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => props.visible,
|
|
||||||
val => {
|
|
||||||
visible.value = val;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return () => (
|
|
||||||
<ElDialog
|
|
||||||
visible={props.visible}
|
|
||||||
width="30%"
|
|
||||||
before-close={handleClose}
|
|
||||||
show-close={false}
|
|
||||||
header={false}
|
|
||||||
v-slots={{
|
|
||||||
header: () => <>123</>
|
|
||||||
}}
|
|
||||||
v-slots={{
|
|
||||||
footer: () => (
|
|
||||||
<>
|
|
||||||
<ElButton onClick={handleCancel}>取消</ElButton>
|
|
||||||
<ElButton type="danger" onClick={handleConfirm}>
|
|
||||||
删除
|
|
||||||
</ElButton>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<span>{props.message}</span>
|
|
||||||
</ElDialog>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
Loading…
Reference in New Issue