Commit 74105a6d authored by Moonhyuk Im's avatar Moonhyuk Im Committed by iamkun

Docs: Fix cascader dynamically load example (#15352)

parent 340da2ff
......@@ -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'
}];
}
......
......@@ -1141,12 +1141,12 @@ Se puede hacer una carga dinamica de elementos hijos cuando se hace clic en el e
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'
}];
}
......
......@@ -1136,12 +1136,12 @@ Il est possible de charger dynamiquement les options quand on clique ou passe la
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'
}];
}
......
......@@ -1136,12 +1136,12 @@
handleItemChange(val) {
console.log('active item:', val);
setTimeout(_ => {
if (val.indexOf('江苏') > -1 && !this.options2[0].cities.length) {
this.options2[0].cities = [{
if (val.indexOf('江苏') > -1 && !this.options[0].cities.length) {
this.options[0].cities = [{
label: '南京'
}];
} else if (val.indexOf('浙江') > -1 && !this.options2[1].cities.length) {
this.options2[1].cities = [{
} else if (val.indexOf('浙江') > -1 && !this.options[1].cities.length) {
this.options[1].cities = [{
label: '杭州'
}];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment