Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
a9c742d4
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6417
Star
113
Fork
189
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
25
列表
看板
标记
里程碑
合并请求
2
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
25
Issue
25
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
a9c742d4
编写于
12月 02, 2023
作者:
DCloud-yyl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
解决logo图圆角毛刺的问题
上级
421fac61
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
3 deletion
+5
-3
pages/API/element-takesnapshot/element-takesnapshot.uvue
pages/API/element-takesnapshot/element-takesnapshot.uvue
+3
-1
pages/API/save-image-to-photos-album/save-image-to-photos-album.uvue
...ave-image-to-photos-album/save-image-to-photos-album.uvue
+2
-2
static/uni.png
static/uni.png
+0
-0
未找到文件。
pages/API/element-takesnapshot/element-takesnapshot.uvue
浏览文件 @
a9c742d4
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<button class="uni-btn btn-TakeSnapshot" type="primary" @tap="takeSnapshotClick">
<button class="uni-btn btn-TakeSnapshot" type="primary" @tap="takeSnapshotClick">
点击截图并替换显示下方图片
点击截图并替换显示下方图片
</button>
</button>
<image style="margin-
top: 20px;" :src="snapImage" mode="aspectFit
" @longpress="saveToAlbum"></image>
<image style="margin-
left:auto;margin-right:auto;margin-top:20px;width:90%;" :src="snapImage" :mode="mode
" @longpress="saveToAlbum"></image>
</view>
</view>
</template>
</template>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
export default {
export default {
data() {
data() {
return {
return {
mode: "center",//aspectFit
snapImage: "/static/uni.png"
snapImage: "/static/uni.png"
}
}
},
},
...
@@ -25,6 +26,7 @@
...
@@ -25,6 +26,7 @@
success: function (res) {
success: function (res) {
console.log(res.tempFilePath)
console.log(res.tempFilePath)
this.snapImage = res.tempFilePath
this.snapImage = res.tempFilePath
this.mode = 'widthFix'
uni.showToast({
uni.showToast({
title: '截图成功,路径:' + res.tempFilePath,
title: '截图成功,路径:' + res.tempFilePath,
icon: "none"
icon: "none"
...
...
pages/API/save-image-to-photos-album/save-image-to-photos-album.uvue
浏览文件 @
a9c742d4
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<!-- #ifdef APP -->
<!-- #ifdef APP -->
<scroll-view style="flex:1">
<scroll-view style="flex:1">
<!-- #endif -->
<!-- #endif -->
<image src="/static/uni.png" style="margin: 30rpx 200rpx;height:
350rpx;width: 350r
px;"></image>
<image src="/static/uni.png" style="margin: 30rpx 200rpx;height:
196px;width:196px
px;"></image>
<button style="margin: 30rpx;" @click="saveImage">将图片保存到手机相册</button>
<button style="margin: 30rpx;" @click="saveImage">将图片保存到手机相册</button>
<!-- #ifdef APP -->
<!-- #ifdef APP -->
</scroll-view>
</scroll-view>
...
@@ -39,4 +39,4 @@
...
@@ -39,4 +39,4 @@
</script>
</script>
<style>
<style>
</style>
</style>
\ No newline at end of file
static/uni.png
查看替换文件 @
421fac61
浏览文件 @
a9c742d4
4.1 KB
|
W:
|
H:
4.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录