当前位置:网站首页>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 = []
}
}
},
}
边栏推荐
- Actual combat: gateway api-2022.2.13
- 担心侵权?必备无版权素材网站分享,不用担心视频剪辑缺素材
- Flutter can refresh data every time the interface comes in
- 积分商城游戏能够给商家带来什么?怎么搭建积分商城?
- Global and Chinese markets for business weather forecasting 2022-2028: Research Report on technology, participants, trends, market size and share
- Receiving package install and uninstall events
- QDataStream的简单读写验证
- 数字金额加逗号;js给数字加三位一逗号间隔的两种方法;js数据格式化
- Go learning notes (5) basic types and declarations (4)
- Application and principle of ThreadPoolExecutor thread pool
猜你喜欢

Implementation of distributed lock

And search: the suspects (find the number of people related to the nth person)

How to meet the requirements of source code confidentiality and source code security management

CockroachDB: The Resilient Geo-Distributed SQL Database 论文阅读笔记

智慧运维:基于 BIM 技术的可视化管理系统

实战:redux的基本使用

Lock free concurrency of JUC (leguan lock)

Use and principle of wait notify

Copier le matériel de conseils de bébé ne peut pas être vide, comment résoudre?

CockroachDB 分布式事务源码分析之 TxnCoordSender
随机推荐
缓冲流与转换流
如何选择导电滑环材料
Detailed explanation of distributed global unique ID solution
Pytoch (IV) -- visual tool visdom
Simple read / write verification of qdatastream
【暑期每日一题】洛谷 P2026 求一次函数解析式
AcWing 886. Finding combinatorial number II (pretreatment factorial)
And search: the suspects (find the number of people related to the nth person)
Unity drags and modifies scene camera parameters under the editor
el-form表单新增表单项动态校验;el-form校验动态表单v-if不生效;
使用 Nocalhost 开发 Rainbond 上的微服务应用
在Rainbond中一键部署高可用 EMQX 集群
CockroachDB 分布式事务源码分析之 TxnCoordSender
Vérification simple de la lecture et de l'écriture de qdatastream
Global and Chinese markets of Ethernet communication modules 2022-2028: Research Report on technology, participants, trends, market size and share
导电滑环使用的注意事项
How to hide browser network IP address and modify IP internet access?
Design and application of immutable classes
[RootersCTF2019]babyWeb
Manually implement a simple stack
