23 lines
		
	
	
		
			565 B
		
	
	
	
		
			JavaScript
		
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			565 B
		
	
	
	
		
			JavaScript
		
	
	
	
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) {
 | 
						|
  const { screenType, ...otherProps } = dialogProps
 | 
						|
  return confirm({
 | 
						|
    centered: true,
 | 
						|
    prefixCls: ` ${screenType || ''} visual-dialog ant-modal`,
 | 
						|
    content: (h) => h(vNode, { props }),
 | 
						|
    ...otherProps
 | 
						|
  })
 | 
						|
}
 |