| 1234567891011121314151617181920212223242526 |
- let dialog = {};
- /**
- * 封装模态框
- */
- dialog.showModal = (content,isShowCancel=true,title='提示')=>{
- return new Promise((resolve,reject)=>{
- uni.showModal({
- title: title,
- content: content,
- showCancel:isShowCancel,
- success: (res)=>{
- if (res.confirm) {
- resolve(res)
- }
- }
- });
- })
- }
- dialog.showLoading=(title="加载中")=>{
- uni.showLoading({
- title
- })
- }
- export default dialog
|