当前位置:网站首页>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
边栏推荐
- One step implementation of yolox helmet detection (combined with oak intelligent depth camera)
- LM09丨费雪逆变换反转网格策略
- 数学问题(数论)试除法做质数的判断、分解质因数,筛质数
- Go GC garbage collection notes (three color mark)
- Application d'un robot intelligent dans le domaine de l'agroécologie
- Analyze the space occupied by the table according to segments, clusters and pages
- Summary of common string processing functions in C language
- 数学知识——快速幂的理解及例题
- Practical problem solving ability of steam Education
- Change deepin to Alibaba image source
猜你喜欢
LM09丨费雪逆变换反转网格策略
Application d'un robot intelligent dans le domaine de l'agroécologie
Application of intelligent robot in agricultural ecology
Save the CDA from the disc to the computer
Vmware安装win10报错:operating system not found
[common error] the DDR type of FPGA device is selected incorrectly
Cultivate primary and secondary school students' love for educational robots
Common errors of dmrman offline backup
记录一次Unity 2020.3.31f1的bug
Lay the foundation for children's programming to become a basic discipline
随机推荐
Oracle和MySQL的基本区别(入门级)
AcrelEMS高速公路微电网能效管理平台与智能照明解决方案智慧点亮隧道
Acelems Expressway microgrid energy efficiency management platform and intelligent lighting solution intelligent lighting tunnel
初学爬虫-笔趣阁爬虫
go实现leetcode旋转数组
Record the bug of unity 2020.3.31f1 once
Mapping settings in elk (8) es
VMware installation win10 reports an error: operating system not found
Hcip day 17
What data does the main account of Zhengda Meiou 4 pay attention to?
Line by line explanation of yolox source code of anchor free series network (7) -- obj in head_ loss、Cls_ Loss and reg_ Calculation and reverse transmission of loss I
Comp 250 parsing
fastText文本分类
数据库问题汇总
Starting from the classification of database, I understand the map database
Mouse events in JS
Leetcode basic programming: array
Idea automatic package import and automatic package deletion settings
Video cover image setting, put cover images into multiple videos in the simplest way
ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification