当前位置:网站首页>Apicloud openframe realizes the transfer and return of parameters to the previous page - basic improvement
Apicloud openframe realizes the transfer and return of parameters to the previous page - basic improvement
2022-07-06 01:46:00 【yehaocheng520】
In writing today apicloud
When , Meet a need , It's about putting A The parameters of the page are passed to B page ,B After a series of operations on the page , Then pass the data to A page .
The implementation of this function will be introduced in detail below :
1. take A The delivery of the page to B page
api.openFrame({
name: 'relationPartNoReview',
url: './relationPartNoReview.html',
rect: {
x:0,
y:0,
w:'auto',
h:'auto'
},
reload:true,
animation:{
type:"none",
duration:1
},
pageParam: {
partNo: this.partNo
}
});
In the above code pageParam
Object partNo
Is to pass on to B Parameters of the page .
2.B Page to receive A Parameters passed by the page
apiready = function () {
var pageParam = api.pageParam;
var vm = new Vue({
el:'#xxx',
data(){
return{
partNo:pageParam.partNo
}
}
})
}
3.B Page passes parameters to A page
You can use sendEvent
and addEventListener
To deal with it .
B How to write the page :
api.sendEvent({
name:'refreshCheck',
extra:{
id:this.xxx.id
}
})
A How to write the page :
api.addEventListener({
name:'refreshCheck',
},function(ret,err){
if(ret.value&&ret.value.id){
// Received B Processing operations after the data transferred from the page
}
})
complete !!!
边栏推荐
- ctf. Show PHP feature (89~110)
- [技术发展-28]:信息通信网大全、新的技术形态、信息通信行业高质量发展概览
- Open source | Ctrip ticket BDD UI testing framework flybirds
- Unity VR solves the problem that the handle ray keeps flashing after touching the button of the UI
- Publish your own toolkit notes using NPM
- 【网络攻防实训习题】
- leetcode刷题_平方数之和
- How to get all sequences in Oracle database- How can I get all sequences in an Oracle database?
- internship:项目代码所涉及陌生注解及其作用
- 02.Go语言开发环境配置
猜你喜欢
Numpy array index slice
dried food! Accelerating sparse neural network through hardware and software co design
UE4 unreal engine, editor basic application, usage skills (IV)
3D视觉——4.手势识别(Gesture Recognition)入门——使用MediaPipe含单帧(Singel Frame)和实时视频(Real-Time Video)
2 power view
It's wrong to install PHP zbarcode extension. I don't know if any God can help me solve it. 7.3 for PHP environment
Folio. Ink is a free, fast and easy-to-use image sharing tool
2022年PMP项目管理考试敏捷知识点(8)
Mongodb problem set
[flask] official tutorial -part3: blog blueprint, project installability
随机推荐
NLP第四范式:Prompt概述【Pre-train,Prompt(提示),Predict】【刘鹏飞】
genius-storage使用文档,一个浏览器缓存工具
dried food! Accelerating sparse neural network through hardware and software co design
Maya hollowed out modeling
Shutter doctor: Xcode installation is incomplete
Crawler request module
使用npm发布自己开发的工具包笔记
ClickOnce does not support request execution level 'requireAdministrator'
C web page open WinForm exe
Selenium element positioning (2)
[flask] official tutorial -part3: blog blueprint, project installability
Huawei converged VLAN principle and configuration
Numpy array index slice
Basic operations of databases and tables ----- unique constraints
500 lines of code to understand the principle of mecached cache client driver
【Flask】响应、session与Message Flashing
Redis-Key的操作
Extracting key information from TrueType font files
抓包整理外篇——————状态栏[ 四]
Initialize MySQL database when docker container starts