mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
Docs: Fix cascader dynamically load example (#15352)
This commit is contained in:
@@ -1136,12 +1136,12 @@ Load child options when their parent option is clicked or hovered over.
|
||||
handleItemChange(val) {
|
||||
console.log('active item:', val);
|
||||
setTimeout(_ => {
|
||||
if (val.indexOf('California') > -1 && !this.options2[0].cities.length) {
|
||||
this.options2[0].cities = [{
|
||||
if (val.indexOf('California') > -1 && !this.options[0].cities.length) {
|
||||
this.options[0].cities = [{
|
||||
label: 'Los Angeles'
|
||||
}];
|
||||
} else if (val.indexOf('Florida') > -1 && !this.options2[1].cities.length) {
|
||||
this.options2[1].cities = [{
|
||||
} else if (val.indexOf('Florida') > -1 && !this.options[1].cities.length) {
|
||||
this.options[1].cities = [{
|
||||
label: 'Orlando'
|
||||
}];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user