redeme.md
1.07 KB
弹窗封装
1.在main.js中引入  import Popup from './components/tanchuang/index'
                  Vue.prototype.$popup = Popup.install
2.用法以及参数:
    this.$popup({
          title: '提示', // 弹窗标题
          titleStyle:"", //标题存在的位置  center  left
          width:"", //弹窗的宽度
          height:"", //弹窗的高度
          editItem: 'ywbl/dbx/aa', // 子组件的路径  相当于你平时img取的路径
          formData:this.formData, //父组件传给子组件的参数
          btnShow:false,//按钮显隐 false隐藏 true显示
          confirmText:"" // 确认按钮的文字
          cancelText:"" //取消按钮的文字
          cancel: function () {}, //取消事件的回调
          confirm: function () {}, //确认事件的回调
          iconClass:"",//标题前面icon图标名称
        })
3.子组件的方法名字必须统一为 childFn()
4.子组件切记props接收 父组件传参formData
  以及在使用结束后传loading状态给父组件
5.后续有修改请添加在此处文档说明作用