当前位置:网站首页>el-cascader 代码取消选择,手动删除某项
el-cascader 代码取消选择,手动删除某项
2022-06-09 03:03:00 【StrongerIrene】
首先,是数组splice(index,1)
但是这样发现数据已经没有那一条了,视图却还保持选中状态
参考这个issue :
https://github.com/ElemeFE/element/issues/18669
解决:(不是下拉框,直接是级联面板,那么,panel这个获取稍有不同)
this.$nextTick(()=>{
this.cascaderValue.splice(recIndex, 1);
this.$refs.cascaderAddr.$refs.menu[1].panel.checkedValue = []
// this.$refs.cascaderAddr.$refs.menu[1].panel.calculateCheckedNodePaths()
// this.$refs.cascaderAddr.$refs.menu[1].panel.syncActivePath();
})
issue原内容:(有改动因为级别不同)
Try this:<el-cascader ref="cascader"/>
this.$refs.cascader.$refs.panel.checkedValue = [];//也可以是指定的值
this.$refs.cascader.$refs.panel.activePath = [];
this.$refs.cascader.$refs.panel.syncActivePath();
边栏推荐
- vins feature_ track
- vins estimator ProcessImage
- Leetcode 974. And K divisible subarray prefix sum
- Go Technology Daily (2022 - 06 - 07) - go programer Development Efficiency God Summary
- [detailed explanation of kubernetes 12] - Security Certification
- Tamidog information | Maersk completed another large-scale enterprise acquisition
- K splitting of dynamic programming /n maximum addend K splitting of n
- Introduction to AI computing power
- Ccf-csp 202112-5 extreme path violence 12 points
- Fight the high vision medical service of HKEx again, the gospel of short-sighted partners?
猜你喜欢

FPGA first try

Leetcode 238. Product of arrays other than itself

Implementation of hash table of Telephone Query System for C language project (project requirements + operation interface + code analysis + complete code)

Ccf-csp 201803-3 URL mapping 100 points

Optimization of static file size by rtsp/onvif protocol video platform easynvr

Ccf-csp 202109-3 pulse neural network, sometimes 100 points..

Reflection principle and application in C #
![Generation of random numbers in C language [detailed explanation]](/img/a7/a7530074efa3e9bd92b9f049556f2a.png)
Generation of random numbers in C language [detailed explanation]

À propos de JS console. Log () est un problème de synchronisation ou asynchrone

Ccf-csp 201903-2 24:00
随机推荐
贪心法/哈夫曼编码
Comprehensive description of network transformer (function, factory, type, model, principle, etc.)
ERP总体介绍
The difference between single chip and chip
Definition and basic terms of tree
Ccf-csp 201903-1 small, medium and large
Ccp-csp 201912-5 magic number violence 25
Ccf-csp 202203-1 uninitialized warning
STM32 flash erase crash
ClassNotFoundException vs NoClassDefFoundError
Dynamic programming / memo method n's K splitting n's maximum addend K splitting
The latest investment report of animoca brands: 340+ investment projects, with a total investment of US $1.5 billion and a total reserve capital of more than 5billion
vins feature_ track
Date tool class - conversion of operation string to date and localdate, time difference between two dates, etc
In unity, inherit the lifecycle of monobehavior game objects
The easynvr hardware of the video edge computing gateway always reports an error when it is started in the service mode. How to troubleshoot and solve it?
Qt: get sender in slot (the control that triggers signal)
C # process control statement
How does JVM handle exceptions? The principle that finally blocks must execute?
Formatting and parsing of simpledateformat time