2024-02-28 14:50:04 +00:00
|
|
|
import modalConfirm from "./confirm";
|
|
|
|
|
import _extends from 'babel-runtime/helpers/extends';
|
|
|
|
|
import Vue from "vue";
|
|
|
|
|
|
|
|
|
|
var confirm = function confirmFn(props) {
|
|
|
|
|
var config = _extends({
|
|
|
|
|
type: '',
|
|
|
|
|
okCancel: false,
|
|
|
|
|
footer: null
|
|
|
|
|
}, props);
|
|
|
|
|
return modalConfirm(config);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Vue.prototype.$open = function (vNode, props, dialogProps) {
|
2024-03-08 15:41:54 +00:00
|
|
|
const { screenType, ...otherProps } = dialogProps
|
2024-02-28 14:50:04 +00:00
|
|
|
return confirm({
|
2024-02-28 15:38:04 +00:00
|
|
|
centered: true,
|
2024-03-08 15:41:54 +00:00
|
|
|
prefixCls: ` ${screenType || ''} visual-dialog ant-modal`,
|
2024-02-28 14:50:04 +00:00
|
|
|
content: (h) => h(vNode, { props }),
|
2024-03-08 15:41:54 +00:00
|
|
|
...otherProps
|
2024-02-28 14:50:04 +00:00
|
|
|
})
|
|
|
|
|
}
|