弹窗使用文档
Showing
1 changed file
with
21 additions
and
0 deletions
src/components/tanchuang/redeme.md
0 → 100644
| 1 | 弹窗封装 | ||
| 2 | 1.在main.js中引入 import Popup from './components/tanchuang/index' | ||
| 3 | Vue.prototype.$popup = Popup.install | ||
| 4 | 2.用法以及参数: | ||
| 5 | this.$popup({ | ||
| 6 | title: '提示', // 弹窗标题 | ||
| 7 | titleStyle:"", //标题存在的位置 center left | ||
| 8 | width:"", //弹窗的宽度 | ||
| 9 | height:"", //弹窗的高度 | ||
| 10 | editItem: 'ywbl/dbx/aa', // 子组件的路径 相当于你平时img取的路径 | ||
| 11 | formData:this.formData, //父组件传给子组件的参数 | ||
| 12 | confirmText:"" // 确认按钮的文字 | ||
| 13 | cancelText:"" //取消按钮的文字 | ||
| 14 | cancel: function () {}, //取消事件的回调 | ||
| 15 | confirm: function () {}, //确认事件的回调 | ||
| 16 | }) | ||
| 17 | 3.子组件的方法名字必须统一为 childFn() | ||
| 18 | 4.子组件切记props接收 父组件传参formData | ||
| 19 | 以及在使用结束后传loading状态给父组件 | ||
| 20 | |||
| 21 | 5.后续有修改请添加在此处文档说明作用 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or sign in to post a comment