popup.js 773 Bytes
/*
 * @Description:
 * @Autor: renchao
 * @LastEditTime: 2023-05-11 16:31:01
 */
import Popup from '@/components/Popup/index'
/**
 * @description: popupDialog
 * @param {*} title
 * @param {*} url
 * @param {*} params
 * @param {*} width
 * @param {*} height
 * @param {*} btnShow
 * @param {*} callback
 * @author: renchao
 */
export function popupDialog (title, url, params, width = '75%', height, btnShow = false, callback) {
  // Popup.install
  Popup(title, url, {
    height: height,
    width: width,
    formData: params,
    btnShow: btnShow,
    cancel: () => {
      console.log("取消回调");
    },
    confirm: () => {
      callback
    }
  })
}

/**
 * @description: popupCacel
 * @author: renchao
 */
export function popupCacel () {
  Popup1().close()
}