Blame view

src/utils/popup.js 602 Bytes
1 2 3 4 5
/*
 * @Description: 弹框组件的封装
 * @Autor: renchao
 * @LastEditTime: 2023-04-11 09:31:14
 */
任超 committed
6
import Popup from '@/components/Popup/index'
7
import Popup1 from '@/components/Popup1/index'
8
export function popupDialog (title, url, params, width = '75%', isMain, height, btnShow = false, callback, cancel) {
9 10
  // Popup.install
  Popup1(title, url, {
任超 committed
11 12 13 14
    height: height,
    width: width,
    formData: params,
    btnShow: btnShow,
15
    isMain: isMain,
任超 committed
16
    cancel: () => {
17
      cancel()
任超 committed
18 19
    },
    confirm: () => {
20
      callback()
任超 committed
21 22
    }
  })
23
}
任超 committed
24

25 26
export function popupCacel () {
  Popup1().close()
任超 committed
27
}