Blame view

src/components/tanchuang/redeme.md 975 Bytes
liangyifan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
弹窗封装
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, //父组件传给子组件的参数  
          confirmText:"" // 确认按钮的文字
          cancelText:"" //取消按钮的文字
          cancel: function () {}, //取消事件的回调
          confirm: function () {}, //确认事件的回调
        })    
3.子组件的方法名字必须统一为 childFn()
4.子组件切记props接收 父组件传参formData  
  以及在使用结束后传loading状态给父组件

5.后续有修改请添加在此处文档说明作用