Browse Source

Docs: Fix cascader dynamically load example (#15352)

Moonhyuk Im 6 năm trước cách đây
mục cha
commit
74105a6de3

+ 4 - 4
examples/docs/en-US/cascader.md

@@ -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'
             }];
           }

+ 4 - 4
examples/docs/es/cascader.md

@@ -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'
             }];
           }

+ 4 - 4
examples/docs/fr-FR/cascader.md

@@ -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'
             }];
           }

+ 4 - 4
examples/docs/zh-CN/cascader.md

@@ -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: '杭州'
             }];
           }