当前位置:网站首页>Comment développer un plug - in d'applet
Comment développer un plug - in d'applet
2022-07-05 22:00:00 【InfoQ】
1、Introduction du plug - in applet
2 Ajouter un plug - in
3 Introduire un paquet de code plug - in
{
"plugins": {
"myPlugin": {
"version": "1.0.0",
"provider": "Plug - in id"
}
}
}4 Introduction d'un paquet de codes plug - in dans la Sous - traitance
{
"subpackages": [
{
"root": "packageA",
"pages": [
"pages/cat",
"pages/dog"
],
"plugins": {
"myPlugin": {
"version": "1.0.0",
"provider": "Plug - in id"
}
}
}
]
}- Ce plug - in ne peut être utilisé que dans le cadre de ce sous - contrat ;
- Le même plug - in ne peut pas être référencé simultanément par plusieurs sous - traitants ;
5Utilisation du plug - in
6Composants personnalisés
{
"usingComponents": {
"hello-component": "plugin://myPlugin/hello-component"
}
}- Par défaut,Dans la page this.selectComponent L'interface n'a pas pu obtenir l'objet d'instance de composant personnalisé du plug - in ;
- ft.createSelectorQuery Attendez l'interface >>> Le sélecteur ne peut pas être sélectionné à l'intérieur du plug - in .
7Page
<navigator url="plugin://myPlugin/hello-page">
Go to pages/hello-page!
</navigator>8 js Interface
var myPluginInterface = requirePlugin('myPlugin');
myPluginInterface.hello();
var myWorld = myPluginInterface.world;var myPluginInterface = requirePlugin('Plug - in id');9 Exporter vers le plug - in
{
"myPlugin": {
"version": "1.0.0",
"provider": "Plug - in id",
"export": "index.js"
}
}// index.js
module.exports = { whoami: 'MiniProgram' }// plugin
requireMiniProgram().whoami // 'MiniProgram'10 Fournir des composants personnalisés pour le plug - in
<!-- miniprogram/page/index.fxml -->
<plugin-view generic:mp-view="comp-from-miniprogram" />{
"myPlugin": {
"provider": "Plug - in id",
"version": "1.0.0",
"genericsImplementation": {
"plugin-index": {
"mp-view": "components/comp-from-miniprogram"
}
}
}
}边栏推荐
- 2.2.5 basic sentences of R language drawing
- KingbaseES V8R3集群维护案例之---在线添加备库管理节点
- Recovery technology with checkpoints
- 每日刷题记录 (十四)
- Daily question brushing record (XIV)
- How to add new fields to mongodb with code (all)
- Serializability of concurrent scheduling
- 从零开始实现lmax-Disruptor队列(四)多线程生产者MultiProducerSequencer原理解析
- 微服务入门(RestTemplate、Eureka、Nacos、Feign、Gateway)
- MySQL连接断开报错MySQLdb._exceptions.OperationalError 4031, The client was disconnected by the server
猜你喜欢

Advantages and disadvantages of the "Chris Richardson microservice series" microservice architecture

DBeaver同时执行多条insert into报错处理

Ad637 notes d'utilisation

MySQL连接断开报错MySQLdb._exceptions.OperationalError 4031, The client was disconnected by the server

多家呼吸机巨头产品近期被一级召回 呼吸机市场仍在增量竞争

Two stage locking protocol for concurrency control

MMAP

The Blue Bridge Cup web application development simulation competition is open for the first time! Contestants fast forward!

1.2 download and installation of the help software rstudio

Getting started with microservices (resttemplate, Eureka, Nacos, feign, gateway)
随机推荐
Server optimization of performance tuning methodology
An exception occurred in Huawei game multimedia calling the room switching method internal system error Reason:90000017
854. String BFS with similarity K
Recursive query of multi-level menu data
Summary of data analysis steps
Yolov5 training custom data set (pycharm ultra detailed version)
大约SQL现场“这包括”与“包括在”字符串的写法
Create a virtual machine on VMware (system not installed)
MySQL disconnection reports an error MySQL ldb_ exceptions. OperationalError 4031, The client was disconnected by the server
1.2 download and installation of the help software rstudio
K210 learning notes (IV) k210 runs multiple models at the same time
POJ 3237 tree (tree chain splitting)
Exercise 1 simple training of R language drawing
Some common processing problems of structural equation model Amos software
Implementation technology of recovery
Database tuning solution
Huawei fast game failed to call the login interface, and returned error code -1
Summary of concurrency control
Storage optimization of performance tuning methodology
Poj3414 extensive search