当前位置:网站首页>uniapp的webview滑动缩放
uniapp的webview滑动缩放
2022-08-03 16:00:00 【spring-java】
直接上代码
<template>
<view>
<web-view :src="svgUrl" @message="message"></web-view>
</view>
</template>
var wv;
export default {
data() {
return {
svgUrl:“”
}
},
onShow() {
plus.navigator.setFullscreen(true)
},
onUnload() {
plus.navigator.setFullscreen(false)
},
onReady() {
let currentWebview = this.$mp.page.$getAppWebview() //获取当前页面的webview对象
setTimeout(function() {
wv = currentWebview.children()[0]
wv.setStyle({
scalable: true
})
}, 1000); //如果是页面初始化调用时,需要延时一下
},
methods: {
}
}
边栏推荐
- STM32 GPIO LED和蜂鸣器实现【第四天】
- 元宇宙系列--Value creation in the metaverse
- 不可忽略!户外LED显示屏的特点及优势
- ffplay视频播放原理分析
- Fortinet产品导入AWS AMI操作文档
- AWS China SDN Connector
- Yuan xiaolin: Volvo focus on travel security, and put it perfectly
- mysql delete execution error: You can't specify target table 'doctor_info' for update in FROM clause
- ReentrantReadWriteLock详解
- JS基础--判断
猜你喜欢
随机推荐
Yii2安装遇到Loading composer repositories with package information
如何将二维空间先验注入到ViT中? UMA&港理工&阿里提出SP-ViT,为视觉Transformer学习2D空间先验知识!...
使用Make/CMake编译ARM裸机程序(基于HT32F52352 Cortex-M0+)
如何使用MATLAB绘制极坐标堆叠柱状图
托尔斯泰:生活中只有两种不幸
#夏日挑战赛# HarmonyOS 实现一个绘画板
"Avnet Embedded Weekly" Issue 276: 2022.07.25--2022.07.31
DAYU200 OpenHarmony标准系统HDMI全屏显示
瞌睡检测系统介绍
想进阿里?先来搞懂一下分布式事务
Small Tools (4) integrated Seata1.5.2 distributed transactions
Not to be ignored!Features and advantages of outdoor LED display
聊聊这个SaaS领域爆火的话题
How Navicat connects to MySQL on a remote server
CS免杀姿势
How to get the 2 d space prior to ViT?UMA & Hong Kong institute of technology & ali SP - ViT, study for visual Transformer 2 d space prior knowledge!.
leetcode: 899. Ordered Queue [Thinking Question]
spark入门学习-2
AI+BI+可视化,Sugar BI架构深度剖析
字典表(还需要输入2个字)