当前位置:网站首页>El cascade echo failed; El cascader does not echo
El cascade echo failed; El cascader does not echo
2022-07-01 05:16:00 【i_ am_ a_ div_ Accumulate over time_】
— Mine is provincial and municipal linkage , It is normal to choose , The resulting binding value is an array [‘ anhui ’,‘ huangshan ’], That's all right. ;
But when checking the details , Anaphylaxis [‘ anhui ’,‘ huangshan ’], The drop-down box does not display the echo value .— reason : although data The initialization declaration variable in is an array , But when assigning values, it must be declared as an array again [ ], And then assign a value . Or just insert values directly into the array .
<el-cascader v-model="shengshi" :options="areaOptions2" placeholder=" Provinces " ></el-cascader>
export default {
data () {
return {
shengshi: [],
}
},
methods: {
getInfo () {
if (res.data.province && res.data.city) {
// el-cascader The echo Don't define an empty array first Then the subscript is assigned Or just stuff the values into the array
// Direct assignment does not work
// this.shengshi[0] = res.data.province
// this.shengshi[1] = res.data.city
// First declare an array Reassignment is also possible
// this.shengshi = []
// this.shengshi[0] = res.data.province
// this.shengshi[1] = res.data.city
// You can also insert values directly into the array
this.shengshi = [res.data.province, res.data.city]
} else {
this.shengshi = []
}
}
},
}
边栏推荐
- [RootersCTF2019]babyWeb
- 云原生存储解决方案Rook-Ceph与Rainbond结合的实践
- Lock free concurrency of JUC (leguan lock)
- Serialization and deserialization of objects
- Thread safety issues
- Print stream and system setout();
- C WPF uses dockpanel to realize screenshot box
- Tar command
- 对象的序列化与反序列化
- Software intelligence: the "world" and "boundary" of AI sentient beings in AAAs system
猜你喜欢
LevelDB源码分析之memtable
busybox生成的东西
el-cascader回显失败;el-cascader回显不出来
Pytoch (III) -- function optimization
Application and principle of ThreadPoolExecutor thread pool
[data recovery in North Asia] a data recovery case of raid crash caused by hard disk drop during data synchronization of hot spare disk of RAID5 disk array
LeetCode1497-检查数组对是否可以被 k 整除-数组-哈希表-计数
Copier le matériel de conseils de bébé ne peut pas être vide, comment résoudre?
[RootersCTF2019]babyWeb
CockroachDB 分布式事务源码分析之 TxnCoordSender
随机推荐
Global and Chinese market of protection circuit modules 2022-2028: Research Report on technology, participants, trends, market size and share
FileInputStream
[daily question in summer] letter delivery by p1629 postman in Luogu (to be continued...)
el-cascader回显失败;el-cascader回显不出来
轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
Data loading and preprocessing
STM32 expansion board digital tube display
Introduction of 3D Modeling and Processing Software Liu Ligang, Chinese University of Science and Technology
More than one file was found with OS independent path ‘lib/armeabi-v7a/libyuv. so‘.
Rainbond结合NeuVector实践容器安全管理
How to traverse massive data in redis
Go learning notes (5) basic types and declarations (4)
Explanation of characteristics of hydraulic slip ring
Vmware workstation network card settings and three common network modes
每日一题-LeetCode1175-质数排列-数学
Global and Chinese markets of InGaAs APD arrays 2022-2028: Research Report on technology, participants, trends, market size and share
Distributed architecture system splitting principles, requirements and microservice splitting steps
And search: the suspects (find the number of people related to the nth person)
More than one file was found with OS independent path ‘lib/armeabi-v7a/libyuv.so‘.
导电滑环短路的原因以及应对措施