当前位置:网站首页>The El cascader echo only selects the questions that are not displayed
The El cascader echo only selects the questions that are not displayed
2022-07-02 05:00:00 【Out of the autistic bird】
el-cascader Echo only select the questions that are not displayed
Look at the code first
<el-cascader
:options="cityData"
v-model="cityCascader"
@change="handleChange"
class="w500">
</el-cascader>
because el-cascader Of v-model Bound must be an array
So when I click on the corresponding page to make a request , The value that will be required push To cityCascader in
// Click to get the data , Put the data push To cascade for default display
if(this.form.province != ""){
this.cityCascader.push(this.form.province)
}
this.cityCascader.push(this.form.city)
this.cityCascader.push(this.form.district)
At this time, the problem of title will appear , my cityCascader The data is in line with the requirements , But the cascading selection box has no default data , Only by default

The solution is , Without array push Method , Instead, assign values directly
if(this.form.province != ""){
this.cityCascader = [this.form.province,this.form.city,this.form.district]
}else{
this.cityCascader = [this.form.city,this.form.district]
}

At this point, it can be displayed by default
边栏推荐
- Video cover image setting, put cover images into multiple videos in the simplest way
- 6.30年终小结,学生时代结束
- Common errors of dmrman offline backup
- Embedded-c language-9-makefile/ structure / Consortium
- Getting started with pytest -- description of fixture parameters
- What data does the main account of Zhengda Meiou 4 pay attention to?
- Practical problem solving ability of steam Education
- [understand one article] FD_ Use of set
- 10 minute quick start UI automation ----- puppeter
- AcrelEMS高速公路微电网能效管理平台与智能照明解决方案智慧点亮隧道
猜你喜欢

奠定少儿编程成为基础学科的原理

数学知识(欧拉函数)

List of common bugs in software testing

UNET deployment based on deepstream

Research on the security of ognl and El expressions and memory horse

How to configure PostgreSQL 12.9 to allow remote connections
![[Yu Yue education] autumn 2021 reference materials of Tongji University](/img/50/5136359b89a5d047fe648637643ad0.jpg)
[Yu Yue education] autumn 2021 reference materials of Tongji University

Gin framework learning code

Hcip day 17

C case of communication between server and client based on mqttnet
随机推荐
Leetcode basic programming: array
Interview question: do you know the difference between deep copy and shallow copy? What is a reference copy?
ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
C - derived classes and constructors
Fasttext text text classification
[bus interface] Axi interface
面试会问的 Promise.all()
Social media search engine optimization and its importance
Markdown edit syntax
Ansible installation and use
Learn BeanShell before you dare to say you know JMeter
Oracle stored procedure and job task setting
Case sharing | intelligent Western Airport
10 minute quick start UI automation ----- puppeter
How to configure PostgreSQL 12.9 to allow remote connections
Cubemx DMA notes
go实现leetcode旋转数组
About PROFIBUS: communication backbone network of production plant
Virtual machine installation deepin system
C case of communication between server and client based on mqttnet