当前位置:网站首页>uniapp手机端uView的u-collapse组件高度init
uniapp手机端uView的u-collapse组件高度init
2022-07-25 05:27:00 【spring-java】
1、当面板内无嵌入子组件直接按照官网方式
<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>
函数中
this.$nextTick(() => {
this.$refs."xxxxxx111.init()
})
2、当嵌入子组件时情况比较复杂,安装上述方式会关闭子组件,如下方式即可
借助子组件给父组件传值事件里面加载高度
<u-collapse ref="test1" accordion :value="foldComponent">
<u-collapse-item name="tt1" >
<mytest title="测试"></mytest>
</u-collapse-item>
<u-collapse-item name="tt2" title="测试">
<mytest1 @loadHeight="loadHeight"></mytest1>
</u-collapse-item>
数据层
data() {
return {
foldComponent:"",//折叠组件
}
},
方法层
loadHeight(data) {
console.log("计算高度")
console.log(data)
if (data == 'computeHeight') {
this.foldComponent="tt2"
this.$nextTick(() => {
this.$refs.test1.init()
})
}
}
边栏推荐
- Airserver 7.3.0 Chinese version mobile device wireless transmission computer screen tool
- Dragon Dragon community released the first Anolis OS Security Guide to escort users' business systems
- Sword finger offer special shock edition day 9
- Implement is by yourself_ base_ of
- Introduction to kubernetes
- Unity接入ChartAndGraph图表插件
- VPP cannot load up status interface
- 编程大杂烩(一)
- Easyrecovery free data recovery tool is easy to operate and restore data with one click
- JS common code questions array de duplication - Custom New throttling and anti shake - deep copy - instanceof URL parameter extraction - thousand separator - array to tree structure - array flattening
猜你喜欢

RHCE first day

Introduction to kubernetes
[email protected] R & D effectiveness measurement indicators"/>Learning records [email protected] R & D effectiveness measurement indicators

自己实现is_class

Dragon Dragon community released the first Anolis OS Security Guide to escort users' business systems

Necessary skills for mobile terminal test: ADB command and packet capturing

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

JWT(json web token)

编程大杂烩(一)

"Niuke | daily question" inverse Polish expression
随机推荐
Continuous maximum sum and judgement palindrome
Powering 5g notebook market, Wentai technology joined the "Honghu plan"
LCP plug-in creates peer VLAN interface
Teach you three ways to optimize the performance from 20s to 500ms
微服务 - Hystrix 熔断器
The difference between $write and $display in SystemVerilog
Deep error
使用getifaddrs获取本机网口IP地址
Solution of win11 blue screen code 0x0000001a
C Programming -- the solution of dynamic programming of "the sum of the largest subarray"
Introduction to interface in SystemVerilog
Introduction to base ring tree
ThreadLocal
Sword finger offer II 012. the sum of the left and right subarrays is equal
接口幂等性
rhcsa暑假第三天
CSDN编程挑战赛之数组编程问题
学习记录[email protected]研发效能度量指标
STL notes (V): iterator
OpenFegin远程调用丢失请求头问题