The applet sets the page style separately.
The applet does not recognize the page tag in scoped, and without scoped, the applet does not pollute the style
<! -- #ifdef MP-WEIXIN --> <style> page{ background-color: #FFFFFF; } </style> <! -- #endif --> <style lang="scss" scoped> page{ background-color: #FFFFFF; } </style>Copy the code
The H5uni.chooseImageFailed to call only camera or album.
Officially, it’s not working. There’s no solution.
Set [‘album’] to capture property for H5 input. Camera can still be used.
View text does not wrap
White-space :pre-line or white-space:pre-wrap doesn’t work. Word-break :break-all; To solve.
Custom top title, uni sets height variable--status-bar-height
.Click to view the official website
.status_bar {
height: var(--status-bar-height);
width: 100%;
}
Copy the code
The close button in the upper right corner of the applet,Capsule buttongetMenuButtonBoundingClientRect()
Upx to PX (now general RPX unit)
Uni.upx2px (100) The received 100 is the upX size and is converted to the device PX size
Liu Hai screen adaptation
Var (–status-bar-height) returns the height of the status bar
padding-top:var(--status-bar-height);
Copy the code
Bottom safe distance
Bottom Safe Distance color: Configure the global app-Plus configuration in the manifest file
"safearea": {" background ", "# CCCCCC", / / safe area outside the background color, the default value is "# FFFFFF" "bottom" : {/ / at the bottom of the safe zone configuration "offset" : "none | auto" / / safety area at the bottom of the migration, "None" said not empty out the safety area, "auto" automatic computing empty out the safety area, the default value is "none"}, "left" : {/ / on the left side of the safe zone configuration landscape display (effective) "offset" : "none | auto"}, "right: {/ / on the right side of the safe zone configuration landscape display (effective) "offset" : "none | auto"}}Copy the code