Files
it-console/code/web/项目源码/src/hook/dialogHook.js
2023-01-29 09:13:43 +08:00

27 lines
497 B
JavaScript

/** props */
export const propsType = {
flag: {
type: Boolean,
default: false
},
width: {
type: String,
default: "30%"
},
title: {
type: String,
default: "消息"
}
}
/** 自定义hook */
export function dialogHook(emit){
/** dialog关闭 */
const close = (form) => {
emit("update:flag", false)
// 重置表单
form && form.value.handlerFormReset();
};
return {
close
};
}