当前位置:网站首页>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 !!!
边栏推荐
- 2 power view
- 2022 Guangxi Autonomous Region secondary vocational group "Cyberspace Security" competition and its analysis (super detailed)
- ClickOnce 不支持请求执行级别“requireAdministrator”
- Flutter Doctor:Xcode 安装不完整
- dried food! Accelerating sparse neural network through hardware and software co design
- Leetcode3, implémenter strstr ()
- Leetcode sum of two numbers
- Get the relevant information of ID card through PHP, get the zodiac, get the constellation, get the age, and get the gender
- PHP error what is an error?
- 剑指 Offer 12. 矩阵中的路径
猜你喜欢
Redis list
[机缘参悟-39]:鬼谷子-第五飞箝篇 - 警示之二:赞美的六种类型,谨防享受赞美快感如同鱼儿享受诱饵。
抓包整理外篇——————状态栏[ 四]
You are using pip version 21.1.1; however, version 22.0.3 is available. You should consider upgradin
【Flask】官方教程(Tutorial)-part1:项目布局、应用程序设置、定义和访问数据库
[detailed] several ways to quickly realize object mapping
Force buckle 1020 Number of enclaves
使用npm发布自己开发的工具包笔记
Extracting key information from TrueType font files
[flask] official tutorial -part2: Blueprint - view, template, static file
随机推荐
[Jiudu OJ 09] two points to find student information
Paddle框架:PaddleNLP概述【飞桨自然语言处理开发库】
【网络攻防实训习题】
Leetcode skimming questions_ Verify palindrome string II
插卡4G工业路由器充电桩智能柜专网视频监控4G转以太网转WiFi有线网速测试 软硬件定制
[flask] official tutorial -part2: Blueprint - view, template, static file
[flask] response, session and message flashing
leetcode-2.回文判断
A Cooperative Approach to Particle Swarm Optimization
dried food! Accelerating sparse neural network through hardware and software co design
Regular expressions: examples (1)
NLP第四范式:Prompt概述【Pre-train,Prompt(提示),Predict】【刘鹏飞】
selenium 等待方式
2 power view
Docker compose configures MySQL and realizes remote connection
NLP fourth paradigm: overview of prompt [pre train, prompt, predict] [Liu Pengfei]
Format code_ What does formatting code mean
Huawei Hrbrid interface and VLAN division based on IP
National intangible cultural heritage inheritor HD Wang's shadow digital collection of "Four Beauties" made an amazing debut!
Unity learning notes -- 2D one-way platform production method