当前位置:网站首页>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
边栏推荐
- Steam教育的实际问题解决能力
- Learn BeanShell before you dare to say you know JMeter
- Flag bits in assembly language: CF, PF, AF, ZF, SF, TF, if, DF, of
- Learn AI safety monitoring project from zero [attach detailed code]
- Lay the foundation for children's programming to become a basic discipline
- Use of Baidu map
- 培养中小学生对教育机器人的热爱之心
- C # picture display occupancy problem
- Pit encountered in win11 pytorch GPU installation
- geotrust ov多域名ssl證書一年兩千一百元包含幾個域名?
猜你喜欢

Ansible installation and use

将光盘中的cda保存到电脑中

Federal learning: dividing non IID samples according to Dirichlet distribution

VMware installation win10 reports an error: operating system not found

農業生態領域智能機器人的應用

CubeMx DMA笔记
![[common error] the DDR type of FPGA device is selected incorrectly](/img/f3/be66bcfafeed581add6d48654dfe34.jpg)
[common error] the DDR type of FPGA device is selected incorrectly

Detailed process of DC-1 range construction and penetration practice (DC range Series)

正大美欧4的主账户关注什么数据?

Record the bug of unity 2020.3.31f1 once
随机推荐
How to recover deleted data in disk
Super detailed pycharm tutorial
Video cover image setting, put cover images into multiple videos in the simplest way
Beginner crawler - biqu Pavilion crawler
Feign realizes file uploading and downloading
Realize the function of data uploading
Virtual machine installation deepin system
Learn BeanShell before you dare to say you know JMeter
C # picture display occupancy problem
数学问题(数论)试除法做质数的判断、分解质因数,筛质数
Its appearance makes competitors tremble. Interpretation of Sony vision-s 02 products
win10 磁盘管理 压缩卷 无法启动问题
Leetcode basic programming: array
Getting started with pytest -- description of fixture parameters
Go GC garbage collection notes (three color mark)
CubeMx DMA笔记
Precipitate yourself and stay up late to sort out 100 knowledge points of interface testing professional literacy
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
[understand one article] FD_ Use of set
VMware installation win10 reports an error: operating system not found