当前位置:网站首页>The u-collapse component of uniapp mobile uview is highly init
The u-collapse component of uniapp mobile uview is highly init
2022-07-25 05:28:00 【spring-java】
1、 When there are no embedded sub components in the panel, directly follow the official website
<u-collapse ref="xxxxxx111">
<u-collapse-item name="basicInform" title="xxx">
<xxxxx></xxxx>
</u-collapse-item>
<u-collapse-item name="collectDetail" title="xxx">
<xxxxx></xxxxx>
</u-collapse-item>
</u-collapse>
Function
this.$nextTick(() => {
this.$refs."xxxxxx111.init()
})
2、 When embedding sub components, the situation is more complicated , Installing the above method will close the sub components , The following methods are sufficient
With the help of sub components, the loading height in the event of passing values to the parent component
<u-collapse ref="test1" accordion :value="foldComponent">
<u-collapse-item name="tt1" >
<mytest title=" test "></mytest>
</u-collapse-item>
<u-collapse-item name="tt2" title=" test ">
<mytest1 @loadHeight="loadHeight"></mytest1>
</u-collapse-item>
The data layer
data() {
return {
foldComponent:"",// Folding assembly
}
},
Method layer
loadHeight(data) {
console.log(" Calculate the height ")
console.log(data)
if (data == 'computeHeight') {
this.foldComponent="tt2"
this.$nextTick(() => {
this.$refs.test1.init()
})
}
}
边栏推荐
- How do novices open accounts for stock speculation? Is it safe for securities companies to open accounts online?
- CSDN编程挑战赛之数组编程问题
- background
- Matter's Unified Smart Home connection standard enables local automatic interaction between smart devices
- JWT(json web token)
- Unity中使用UniRx入门总结
- Uniapp custom application exit execution content
- LCP plug-in creates peer-to-peer physical interface
- ThreadLocal
- Implement is by yourself_ convertible
猜你喜欢

ThreadLocal

Implement is by yourself_ convertible

Go language function

微服务 - 网关Gateway组件

Delivery practice of private PAAS platform based on cloud native

What should testers do if they encounter a bug that is difficult to reproduce?

Game 302 of leetcode

Unity接入ChartAndGraph图表插件

C编程 --“最大子数组的和” 的动态规划的解法

Odoo14 | about the abnormal display of statusbar keyword after use and Its Solutions
随机推荐
AirServer 7.3.0中文版手机设备无线传送电脑屏幕工具
Project management tools - project developer tools
Add transition layer to JS page
Introduction to interface in SystemVerilog
What content does the software test plan include and how to write it. Share test plan template
Necessary skills for mobile terminal test: ADB command and packet capturing
Sword finger offer special shock edition day 9
微信小程序相关操作示例
rhcsa暑假第二天
I have seven schemes to realize web real-time message push, seven!
05. Libavformat Library of ffmpeg
In depth understanding of pre post + +, -- and negative modulus
Performance Optimization: lazy loading of pictures
Vim查找替换及正则表达式的使用
Zhou Chen, vice president of zhanrui market, responded to everything about 5g chip chunteng 510!
Dragon Dragon community released the first Anolis OS Security Guide to escort users' business systems
Odoo14 | about the abnormal display of statusbar keyword after use and Its Solutions
微服务 - 远程调用(Feign组件)
obj文件格式与.mtl文件格式
What should testers do if they encounter a bug that is difficult to reproduce?