dcloudio / uni-app

A cross-platform framework using Vue.js
https://uniapp.dcloud.io
Apache License 2.0
40k stars 3.63k forks source link

H5 刷新后样式未加载 #3038

Closed 734839030 closed 8 months ago

734839030 commented 2 years ago

问题描述 使用hbuild 建的工程,vue3. 本地开发完全正常,打包后运行也正常,主动刷新页面后样式未加载。没有全局样式,纯粹的uni-forms 代码极为普通(也用官方的uni-app的form例子是一样的问题) image

mainfest: image

系统信息:

正常截图: image

fxy060608 commented 2 years ago

升级至 Alpha 3.3.0 版本

734839030 commented 2 years ago

只升级hbuilder 到Alpha 3.3.0 . 又出新的问题,真机出不来。

PC chrome 可以显示,android QQ 浏览器 华为浏览器 微信内打开也不行,ios手机浏览器可以

uni.showToast({ icon: 'error', title: '请签名' })

StrivingRabbit commented 2 years ago

@734839030 使用 alpha 3.3.0 测试 vue3 运行情况。除了 华为浏览器 没有测试,其他均能打开。你说的打不开的情景,可以具体的描述一下吗?

734839030 commented 2 years ago

sorry忘记贴场景了,普通弹出是正常的。 在这个函数里面的不正常 image vconsole 看到节点是有渲染的 image

734839030 commented 2 years ago

最终定位到是none的有问题 uni.showToast({ icon: 'none', title: '请签名' });

这个可以 uni.showToast({ icon: 'error', title: '请签名' });

734839030 commented 2 years ago

@734839030 使用 alpha 3.3.0 测试 vue3 运行情况。除了 华为浏览器 没有测试,其他均能打开。你说的打不开的情景,可以具体的描述一下吗? icon:'none' 的时候应该全是白色,所以看不到哈,麻烦你们关注下哈 uni.showToast({ icon: 'none', title: '请签名' });

StrivingRabbit commented 2 years ago

@734839030 收到,后续会确认

StrivingRabbit commented 2 years ago

@734839030 使用 alpha 3.3.1 ,写有以下代码,然后 uni.request 发送请求,没有复现你说的问题。能否提供一个可复现问题的简单示例

uni.addInterceptor('request', {
    success: (res) => {
        if (res.success) {
            uni.showToast({
                icon: 'success',
                title: '加载成功'
            })
        } else {
            uni.showToast({
                icon: 'none',
                title: '加载失败'
            })
        }
    }
})
734839030 commented 2 years ago

就是icon 为none时候有问题是打包部署后,在hbuilder运行是好的,空页面加上这个可以复现已尝试最新3.3.2依然存在,如果你确定none没问题我再尝试部署一个页面,我用icon:error|success 没有问题

uni.showToast({ icon: 'none', title: '请签名' });

StrivingRabbit commented 2 years ago

可以提供一个使用alpha 3.3.2可复现的示例吗?

发自我的iPhone

在 2021年12月23日,01:07,huangdengfeng @.***> 写道:

 就是icon 为none时候有问题,空页面就这一个,如果你确定none没问题我再尝试部署一个页面,我用icon:error|success 没有问题

uni.showToast({ icon: 'none', title: '请签名' });

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.

734839030 commented 2 years ago

可以提供一个使用alpha 3.3.2可复现的示例吗? 发自我的iPhone 在 2021年12月23日,01:07,huangdengfeng @.***> 写道:  就是icon 为none时候有问题,空页面就这一个,如果你确定none没问题我再尝试部署一个页面,我用icon:error|success 没有问题 uni.showToast({ icon: 'none', title: '请签名' }); — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.

@StrivingRabbit Android QQ浏览器最新版(荣耀和小米)均可以复现,视频https://bear.seezoon.com/1.mp4 测试地址 https://bear.seezoon.com/bug/ 测试二维码 image

<template>
    <view class="content">
        <image class="logo" src="/static/logo.png"></image>
        <view class="text-area">
            <button @click="showSuccess">success</button>
            <button @click="showNone">none</button>
        </view>
    </view>
</template>

<script>
    export default {
        data() {

        },
        onLoad() {

        },
        methods: {
            showSuccess() {
                uni.showToast({
                    icon: 'success',
                    title: '我是成功'
                })
            },
            showNone() {
                uni.showToast({
                    icon: 'none',
                    title: '我是成功'
                })
            }
        }
    }
</script>
StrivingRabbit commented 2 years ago

@734839030 你提供的部署页面确实有问题,但是我使用你提供的代码,3.3.2 运行,实测没有问题。所以你可以提供一个你可以复现问题的工程吗?而不是提供一个部署好的页面,我无法在本地复现问题

StrivingRabbit commented 2 years ago

@734839030 uni.toast 和 uni.previewImage 都是同样的情况