收藏
回答

微信小程序web-view怎么设置宽度?

以下为异常展示图:不能自适应手机屏幕,内容会超过屏幕。

以下为完整代码:

<template>
        <view>
		<web-view :src="url"></web-view>
	</view>
</template>


<script>
	export default {
		onShow() {
			this.$setNavigationBarThemeColor();
		},
		onLoad(options) {
			const url = options.url.replace(/\\/g, "/");
			this.url = this.$mConfig.hostUrl+"get/view?filercPath=" +url;
			//this.url = "http://sysyxjy.cn:8080/getoffice/view3?fileSrcPath=" +url;
		},
		data() {
			return {
				url: ''
			}
		}
	}
</script>


<style>


</style>


回答关注问题邀请回答
收藏

1 个回答

  • 🇪 🇱 🇸 🇪
    🇪 🇱 🇸 🇪
    2023-11-20

    不能设置哦,强制全屏的

    2023-11-20
    有用
    回复
登录 后发表内容