提交 01b16b8e 编写于 作者: 杜庆泉's avatar 杜庆泉

Merge branch 'dev' of https://gitcode.net/dcloud/hello-uni-app-x into dev

...@@ -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"
......
...@@ -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: 350rpx;"></image> <image src="/static/uni.png" style="margin: 30rpx 200rpx;height:196px;width:196px;"></image>
<button style="margin: 30rpx;" @click="saveImage">将图片保存到手机相册</button> <button style="margin: 30rpx;" @click="saveImage">将图片保存到手机相册</button>
<!-- #ifdef APP --> <!-- #ifdef APP -->
</scroll-view> </scroll-view>
......
...@@ -397,9 +397,14 @@ ...@@ -397,9 +397,14 @@
name: 'storage(key-value存储)', name: 'storage(key-value存储)',
url: 'storage', url: 'storage',
api: ["getStorageInfo", "getStorageInfoSync", "getStorage", "getStorageSync", "setStorage", "setStorageSync", "removeStorage", "removeStorageSync", "clearStorage", "clearStorageSync"] api: ["getStorageInfo", "getStorageInfoSync", "getStorage", "getStorageSync", "setStorage", "setStorageSync", "removeStorage", "removeStorageSync", "clearStorage", "clearStorageSync"]
}, }
] as Page[],
},{
id: 'file',
name: '文件',
pages: [
{ {
name: '沙盒文件管理', name: 'fileSystemManager沙盒文件管理',
url: 'filemanager' url: 'filemanager'
}, },
] as Page[], ] as Page[],
...@@ -426,6 +431,7 @@ ...@@ -426,6 +431,7 @@
}, },
] as Page[], ] as Page[],
}, },
// #ifdef APP
{ {
id: 'login', id: 'login',
name: '登录与认证', name: '登录与认证',
...@@ -440,6 +446,7 @@ ...@@ -440,6 +446,7 @@
} }
] as Page[], ] as Page[],
}, },
// #endif
/* { /* {
id: "rewarded-video-ad", id: "rewarded-video-ad",
url: "rewarded-video-ad", url: "rewarded-video-ad",
......
<template> <template>
<list-view style="flex: 1;" refresher-enabled=true @refresherrefresh="onRefresherrefresh" <list-view style="flex: 1;" refresher-enabled=true @refresherrefresh="onRefresherrefresh"
:refresher-triggered="refresherTriggered"> :refresher-triggered="refresherTriggered">
<list-item class="banner" @click="bannerClick(banner)"> <list-item class="banner" @click="bannerClick(banner)" type=1>
<image class="banner-img" :src="banner.cover"></image> <image class="banner-img" :src="banner.cover"></image>
<text class="banner-title">{{ banner.title }}</text> <text class="banner-title">{{ banner.title }}</text>
</list-item> </list-item>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</text> </text>
</view> </view>
</sticky-header> </sticky-header>
<list-item v-for="(value, index) in listData" :key="index"> <list-item v-for="(value, index) in listData" :key="index" type=2>
<view class="uni-list-cell" hover-class="uni-list-cell-hover" @click="goDetail(value)"> <view class="uni-list-cell" hover-class="uni-list-cell-hover" @click="goDetail(value)">
<view class="uni-media-list"> <view class="uni-media-list">
<image class="uni-media-list-logo" :src="value.cover"></image> <image class="uni-media-list-logo" :src="value.cover"></image>
......
static/uni.png

4.1 KB | W: | H:

static/uni.png

4.2 KB | W: | H:

static/uni.png
static/uni.png
static/uni.png
static/uni.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册