uniapp package H5 style invalid and hide the top navigation bar of H5

one .

When we modify the component style locally through :: v-deep, the local operation can take effect, but the style becomes invalid after packaging and publishing.

::v-deep .u-icon__icon[data-v-2ee87dc9] {
	color: #fff !important;
}

Later, I found out that there is no problem if you delete the following [data-v-2ee87dc9]. Because the local runtime is [data-v-2ee87dc9], after it is packaged online, it is [data-v-21287dc7] and our local is Different, so there will be a problem of style failure.

::v-deep .u-icon__icon {
	color: #fff !important;
}

two.

Hide the top navigation bar of H5: Add the following code in the App.vue file

<style lang="scss">
	// 隐藏顶部导航栏(一定要写在 @import 的前面,否则报错!!!)
    uni-page-head {
        display: none;
	}
	@import "@/uni_modules/uview-ui/index.scss";
	@import '@/static/scss/index.scss'
</style>

Guess you like

Origin blog.csdn.net/m0_58293192/article/details/131781706