当前位置:网站首页>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
边栏推荐
- 6.30 year end summary, end of student age
- Acelems Expressway microgrid energy efficiency management platform and intelligent lighting solution intelligent lighting tunnel
- 数学知识(欧拉函数)
- C# 基于MQTTNet的服务端与客户端通信案例
- js面试收藏试题1
- Mysql database learning
- GeoTrust ov multi domain SSL certificate is 2100 yuan a year. How many domain names does it contain?
- Cultivate primary and secondary school students' love for educational robots
- AcrelEMS高速公路微电网能效管理平台与智能照明解决方案智慧点亮隧道
- Analyzing the hands-on building tutorial in children's programming
猜你喜欢
Keil compilation code of CY7C68013A
MySQL table insert Chinese change? Solution to the problem of No
Practical problem solving ability of steam Education
Save the CDA from the disc to the computer
[bus interface] Axi interface
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
Tawang food industry insight | current situation, consumption data and trend analysis of domestic infant complementary food market
Solution of DM database unable to open graphical interface
Go Chan's underlying principles
DMA Porter
随机推荐
National all Chinese Automatic Test Software apifox
Super detailed pycharm tutorial
Solution: the agent throws an exception error
Lay the foundation for children's programming to become a basic discipline
Pytest learning ----- pytest assertion of interface automation testing
数学问题(数论)试除法做质数的判断、分解质因数,筛质数
A new attribute value must be added to the entity entity class in the code, but there is no corresponding column in the database table
I sorted out some basic questions about opencv AI kit.
解析少儿编程中的动手搭建教程
List of common bugs in software testing
js面试收藏试题1
Oracle和MySQL的基本区别(入门级)
Beginner crawler - biqu Pavilion crawler
Summary of MySQL key challenges (2)
geotrust ov多域名ssl证书一年两千一百元包含几个域名?
Use of Baidu map
Record the bug of unity 2020.3.31f1 once
Go Chan's underlying principles
Analyze the space occupied by the table according to segments, clusters and pages
06 decorator mode