当前位置:网站首页>Private collection project practice sharing [Yugong series] February 2022 wechat applet -app Other properties of JSON configuration properties
Private collection project practice sharing [Yugong series] February 2022 wechat applet -app Other properties of JSON configuration properties
2022-06-11 13:55:00 【Yugong moving code】
One 、resizable
stay iPad The applet running on can be set to support screen rotation , stay PC Applet running on , The user can drag the window size in any proportion , You can also maximize the window in the applet menu .
app.json The configuration is as follows ;
{
resizable:true
}
- 1.
- 2.
- 3.
Two 、usingComponents
stay app.json Custom components declared in are regarded as global custom components , It can be used directly in a page or custom component within an applet without having to declare .
app.json The configuration is as follows ;
{
usingComponents:
' Global component path '
}
- 1.
- 2.
- 3.
3、 ... and 、permission
Applet interface permission related settings . Field type is Object.
app.json The configuration is as follows ;
{
"pages": [
"pages/index/index"],
"permission": {
"scope.userLocation": {
"desc":
" Your location information will be used to show the effect of the applet location interface "
// Continuous background positioning of Expressway driving
}
}
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
Four 、sitemapLocation
In the applet root directory sitemap.json This file is used to configure whether the applet and its page can be indexed by wechat , The content of the document is a JSON object , without sitemap.json , All pages are allowed to be indexed by default .
sitemapLocation The function of is to specify sitemap.json The path of
app.json The configuration is as follows ;
{
"pages": [
"pages/index/index"],
"sitemapLocation":
"sitemap.json"
}
- 1.
- 2.
- 3.
- 4.
5、 ... and 、style
"style": "v2" Indicates that a new version of the component style is enabled .
app.json The configuration is as follows ;
{
"style":
"v2"
}
- 1.
- 2.
- 3.
6、 ... and 、useExtendedLib
Specify the extension library to reference . At present, the following projects are supported :
- kbone: Multi terminal development framework
- weui: WeUI Component library
After designation , It is equivalent to introducing the latest version of the corresponding extension library npm package , At the same time, it does not occupy the package volume of the applet .
app.json The configuration is as follows ;
{
"useExtendedLib": {
"kbone":
true,
"weui":
true
}
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
7、 ... and 、entranceDeclare
Chat location messages are opened with a taxi applet , Details refer to .
app.json The configuration is as follows ;
"entranceDeclare": {
"locationMessage": {
"path":
"pages/index/index",
"query":
"foo=bar"
}
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
Page get message
//app.js
App({
onLaunch:
function (
options){
console.
log(
options)
var
scene
=
options.
scene
if (
scene
==
1146) {
// Location message scene value
var
location
=
options.
locationInfo
var
x
=
location.
latitude
var
y
=
location.
longitude
var
name
=
location.
name
}
},
})
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
8、 ... and 、darkmode and themeLocation
1.darkmode
stay app.json Middle configuration darkmode by true, This means that the current applet has been adapted to DarkMode, All basic components will display different default styles according to the system theme ,navigation bar and tab bar It will also switch automatically according to the following configuration .
2.themeLocation
Customize theme.json The path of , When configuring "darkmode":true when , Current profile is required .
{
"darkmode":
true,
"themeLocation":
"/path/to/theme.json"
}
- 1.
- 2.
- 3.
- 4.
Nine 、lazyCodeLoading
At present, only the value requiredComponents, On behalf of opening the applet 「 Inject... As needed 」 characteristic .
{
"lazyCodeLoading":
"requiredComponents"
}
- 1.
- 2.
- 3.
Ten 、singlePage
Now share with the circle of friends (Beta) After opening, it will enter single page mode
Single page mode related configuration
attribute | type | Required | The default value is | describe |
navigationBarFit | String | no | Auto adjust by default , If the original page is a custom navigation bar , Then for float, Otherwise squeezed | The intersection state between the navigation bar and the page , The value is float Indicates that the navigation bar is floating on the page , Intersect with page ; The value is squeezed Indicates that the page is squeezed by the navigation bar , Does not intersect the page |
11、 ... and 、embeddedAppIdList
Specify that the applet can pass through wx.openEmbeddedMiniProgram List of open applets .
{
"embeddedAppIdList": [
"wxe5f52902cf4de896"]
}
- 1.
- 2.
- 3.
Twelve 、halfPage
The full screen state of the first page uses a custom top , Support default / custom
{
"halfPage": {
"firstPageNavigationStyle":
"custom"
}
}
- 1.
- 2.
- 3.
- 4.
- 5.
边栏推荐
- Shader shader
- Powerful full text search tool anytxt searcher
- Solve the circular dependency bug. Relying upon circular references is discouraged and they are prohibited by default.
- Unity detects whether the object is within the viewing cone of the camera
- About PHP: the original deployment environment written by PHP is deployed in phpstudy, PHP + MySQL + Apache. However, the computer must be turned on every time
- Code comparison tool, I use these six
- SAP Spartacus checkout process uses URL paste to directly jump to delivery mode. Why the page cannot be opened
- Terraformer importing cloud resources
- cadence SPB17.4 - group operation(add to group, view group list, delete group)
- Setting tcp/ip network in Debian
猜你喜欢

Implementation of VGA protocol based on FPGA

Energy storage operation and configuration analysis of high proportion wind power system (realized by Matlab)

Ecplise cannot connect to SQL Server

代码对比工具,我就用这6个

Just after the college entrance examination, I was confused and didn't know what to do? Tell me what I think

cadence SPB17.4 - group operation(add to group, view group list, delete group)

AGV robot RFID sensor ck-g06a and Siemens 1200plc Application Manual

论文导读 | 机器学习在数据库基数估计中的应用

Learning notes of yolov3: model structure of yolov3

The application of machine learning in database cardinality estimation
随机推荐
Can't understand kotlin source code? Starting with the contracts function~
SQL must know and know
The application of machine learning in database cardinality estimation
Pond (topology + priority queue)
Ecplise cannot connect to SQL Server
Musk says he doesn't like being a CEO, but rather wants to do technology and design; Wu Enda's "machine learning" course is about to close its registration | geek headlines
Kubernetes certificate collection
/usr/bin/gzip: 1: ELF : not found /usr/bin/gzip: 3: : not found /usr/bin/gzip: 4: Syntax erro
小米9线刷ROM
SAP Spartacus checkout process uses URL paste to directly jump to delivery mode. Why the page cannot be opened
Some transformation thoughts of programmers after they are 35 years old
Terraformer importing cloud resources
CVPR 2022 | 神经辐射场几何编辑方法NeRF-Editing
JDBC连接池去做批量导入,每次运行500万数据,但是在中间就会出各种问题
How to manage the server to make the website stable and smooth
LNMP deployment
VIM secondary replacement
JSTL 自定义标签
优化调度(火电、风、储能)(Matlab实现)
Question bank and answers for 2022 tool fitter (intermediate) operation certificate examination