提交 b9f8f924 编写于 作者: 张磊

修改提示显示不全的问题

上级 cb3411c9
<template>
<!-- #ifdef APP -->
<scroll-view style="flex:1">
<!-- #endif -->
<!-- #endif -->
<image src="/static/uni.png" style="margin: 30rpx 200rpx;height:350rpx;width: 350rpx;"></image>
<button style="margin: 30rpx;" @click="saveImage">将图片保存到相册</button>
<!-- #ifdef APP -->
<!-- #ifdef APP -->
</scroll-view>
<!-- #endif -->
</template>
......@@ -13,23 +13,24 @@
export default {
data() {
return {
}
},
methods: {
saveImage() {
uni.saveImageToPhotosAlbum({
filePath:"/static/uni.png",
filePath: "/static/uni.png",
success() {
uni.showToast({
icon:"none",
title:"图片保存成功,请到相册查看"
position: "center",
icon: "none",
title: "图片保存成功,请到相册查看"
})
},
fail(e) {
uni.showToast({
icon:"none",
title:"图片保存失败,"+JSON.stringify(e)
position: "center",
icon: "none",
title: "图片保存失败,code:" + e.errCode + ",message:" + e.errMsg
})
}
})
......@@ -39,5 +40,4 @@
</script>
<style>
</style>
</style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册