8 Star 151 Fork 108

开源字节/相亲小程序

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
tip.js 1.11 KB
Copy Edit Raw Blame History
1099264057@qq,com authored 2022-03-13 19:49 +08:00 . 1
// 不含icon提示框
const toast = str => {
return new Promise((resolve, reject) => {
uni.showToast({
title: str,
icon: "none",
duration: 2000,
success: () => {
setTimeout(() => {
resolve
}, 2000)
}
})
})
};
// 成功提示框
const successToast = str => {
return new Promise((resolve, reject) => {
uni.showToast({
title: str,
icon: "success",
duration: 2000,
success: () => {
setTimeout(() => {
resolve()
}, 2000)
}
})
})
};
// loading
const showLoading = () => {
return new Promise((resolve, reject) => {
uni.showLoading({
success: () => {
resolve()
}
})
})
};
// tipLoading ==>提示loading
const tipLoading = str => {
return new Promise((resolve, reject) => {
uni.showLoading({
title: str,
success: () => {
resolve()
}
})
})
};
// 隐藏loading
const hideLoading = () => {
return new Promise((resolve, reject) => {
uni.hideLoading({
success: () => {
resolve()
}
})
})
};
export default {
toast: toast,
successToast: successToast,
showLoading: showLoading,
tipLoading: tipLoading,
hideLoading: hideLoading,
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/open-source-byte/source-love.git
git@gitee.com:open-source-byte/source-love.git
open-source-byte
source-love
相亲小程序
master

Search