You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/api/index.md
+46-36
Original file line number
Diff line number
Diff line change
@@ -365,7 +365,7 @@ Type: api
365
365
366
366
-**Restriction:** Only accepts `Funzione` when used in `Vue.extend()`.
367
367
368
-
-**Details:**
368
+
-**Dettagli:**
369
369
370
370
The data oggetto for the Vue instance. Vue.js will recursively convert its properties into getter/setters to make it "reactive". **The oggetto must be plain**: native oggettos, existing getter/setters and protoTipo properties are ignored. It is not recommended to observe complex oggettos.
371
371
@@ -401,7 +401,7 @@ Type: api
401
401
402
402
-**Tipo:**`Array | Oggetto`
403
403
404
-
-**Details:**
404
+
-**Dettagli:**
405
405
406
406
A list/hash of attributes that are exposed to accept data from the parent component. It has a simple Array-based syntax and an alternative Oggetto-based syntax that allows advanced configurations such as Tipo checking, custom validation and Predefinito valores.
407
407
@@ -433,7 +433,7 @@ Type: api
433
433
434
434
-**Tipo:**`Oggetto`
435
435
436
-
-**Details:**
436
+
-**Dettagli:**
437
437
438
438
Computed properties to be mixed into the Vue instance. All getters and setters have their `this` context automatically bound to the Vue instance.
439
439
@@ -472,7 +472,7 @@ Type: api
472
472
473
473
-**Tipo:**`Oggetto`
474
474
475
-
-**Details:**
475
+
-**Dettagli:**
476
476
477
477
Methods to be mixed into the Vue instance. You can access these methods directly on the VM instance, or use them in directive expressions. All methods will have their `this` context automatically bound to the Vue instance.
478
478
@@ -497,7 +497,7 @@ Type: api
497
497
498
498
-**Tipo:**`Oggetto`
499
499
500
-
-**Details:**
500
+
-**Dettagli:**
501
501
502
502
An oggetto where chiaves are expressions to watch and valores are the corresponding callbacks. The valore can also be a stringa of a method name, or an Oggetto that contains additional opzioni. The Vue instance will call `$watch()` for each entry in the oggetto at instantiation.
503
503
@@ -534,7 +534,7 @@ Type: api
534
534
535
535
-**Restriction:** only accepts Tipo `Funzione` when used in `Vue.extend()`.
536
536
537
-
-**Details:**
537
+
-**Dettagli:**
538
538
539
539
Provide the Vue instance an existing DOM element to mount on. It can be a CSS selector stringa, an actual HTMLElement, or a function that returns an HTMLElement. Note that the provided element merely serves as a mounting point; it will be replaced if a template is also provided, unless `replace` is set to falso. The resolved element will be accessible as `vm.$el`.
540
540
@@ -548,7 +548,7 @@ Type: api
548
548
549
549
-**Tipo:**`Stringa`
550
550
551
-
-**Details:**
551
+
-**Dettagli:**
552
552
553
553
A stringa template to be used as the markup for the Vue instance. By Predefinito, the template will **replace** the mounted element. When the `replace` option is set to `falso`, the template will be inserted into the mounted element instead. In both cases, any existing markup inside the mounted element will be ignored, unless content distribution slots are present in the template.
554
554
@@ -569,7 +569,7 @@ Type: api
569
569
570
570
-**Restriction:** only respected if the **template** option is also present.
571
571
572
-
-**Details:**
572
+
-**Dettagli:**
573
573
574
574
Determines whether to replace the element being mounted on with the template. If set to `falso`, the template will overwrite the element's inner content without replacing the element itself.
575
575
@@ -616,11 +616,21 @@ Type: api
616
616
617
617
## Options / Lifecycle Hooks
618
618
619
+
### init
620
+
621
+
-**Tipo:**`Funzione`
622
+
623
+
-**Dettagli:**
624
+
625
+
Called synchronously after the instance has already been initialized, but not has started processing the options and the data for set up the scope.
626
+
627
+
-**Vedi anche:**[Diagramma del Ciclo di Vita](/guide/instance.html#Lifecycle_Diagram)
628
+
619
629
### created
620
630
621
631
-**Tipo:**`Funzione`
622
632
623
-
-**Details:**
633
+
-**Dettagli:**
624
634
625
635
Called synchronously after the instance is created. At this stage, the instance has finished processing the opzioni which means the following have been set up: data observation, computed properties, methods, watch/event callbacks. However, DOM compilation has not been started, and the `$el` property will not be available yet.
626
636
@@ -630,7 +640,7 @@ Type: api
630
640
631
641
-**Tipo:**`Funzione`
632
642
633
-
-**Details:**
643
+
-**Dettagli:**
634
644
635
645
Called right before the compilation starts.
636
646
@@ -640,7 +650,7 @@ Type: api
640
650
641
651
-**Tipo:**`Funzione`
642
652
643
-
-**Details:**
653
+
-**Dettagli:**
644
654
645
655
Called after the compilation is finished. At this stage all directives have been linked so data changes will trigger DOM updates. However, `$el` is not guaranteed to have been inserted into the document yet.
646
656
@@ -650,7 +660,7 @@ Type: api
650
660
651
661
-**Tipo:**`Funzione`
652
662
653
-
-**Details:**
663
+
-**Dettagli:**
654
664
655
665
Called after compilation **and** the `$el` is **inserted into the document for the first time**, i.e. right after the first `attached` hook. Note this insertion must be executed via Vue (with methods like `vm.$appendTo()` or as a result of a directive update) to trigger the `ready` hook.
656
666
@@ -660,23 +670,23 @@ Type: api
660
670
661
671
-**Tipo:**`Funzione`
662
672
663
-
-**Details:**
673
+
-**Dettagli:**
664
674
665
675
Called when `vm.$el` is attached to DOM by a directive or a VM instance method such as `$appendTo()`. Direct manipulation of `vm.$el` will **not** trigger this hook.
666
676
667
677
### detached
668
678
669
679
-**Tipo:**`Funzione`
670
680
671
-
-**Details:**
681
+
-**Dettagli:**
672
682
673
683
Called when `vm.$el` is removed from the DOM by a directive or a VM instance method. Direct manipulation of `vm.$el` will **not** trigger this hook.
674
684
675
685
### beforeDestroy
676
686
677
687
-**Tipo:**`Funzione`
678
688
679
-
-**Details:**
689
+
-**Dettagli:**
680
690
681
691
Called right before a Vue instance is destroyed. At this stage the instance is still fully functional.
682
692
@@ -686,7 +696,7 @@ Type: api
686
696
687
697
-**Tipo:**`Funzione`
688
698
689
-
-**Details:**
699
+
-**Dettagli:**
690
700
691
701
Called after a Vue instance has been destroyed. When this hook is called, all bindings and directives of the Vue instance have been unbound and all child Vue instances have also been destroyed.
692
702
@@ -700,7 +710,7 @@ Type: api
700
710
701
711
-**Tipo:**`Oggetto`
702
712
703
-
-**Details:**
713
+
-**Dettagli:**
704
714
705
715
A hash of directives to be made available to the Vue instance.
706
716
@@ -712,7 +722,7 @@ Type: api
712
722
713
723
-**Tipo:**`Oggetto`
714
724
715
-
-**Details:**
725
+
-**Dettagli:**
716
726
717
727
A hash of element directives to be made available to the Vue instance.
718
728
@@ -724,7 +734,7 @@ Type: api
724
734
725
735
-**Tipo:**`Oggetto`
726
736
727
-
-**Details:**
737
+
-**Dettagli:**
728
738
729
739
A hash of filters to be made available to the Vue instance.
730
740
@@ -736,7 +746,7 @@ Type: api
736
746
737
747
-**Tipo:**`Oggetto`
738
748
739
-
-**Details:**
749
+
-**Dettagli:**
740
750
741
751
A hash of components to be made available to the Vue instance.
742
752
@@ -747,7 +757,7 @@ Type: api
747
757
748
758
-**Tipo:**`Oggetto`
749
759
750
-
-**Details:**
760
+
-**Dettagli:**
751
761
752
762
A hash of transitions to be made available to the Vue instance.
753
763
@@ -758,7 +768,7 @@ Type: api
758
768
759
769
-**Tipo:**`Oggetto`
760
770
761
-
-**Details:**
771
+
-**Dettagli:**
762
772
763
773
A hash of partial stringas to be made available to the Vue instance.
764
774
@@ -771,7 +781,7 @@ Type: api
771
781
772
782
-**Tipo:**`Vue instance`
773
783
774
-
-**Details:**
784
+
-**Dettagli:**
775
785
776
786
Specify the parent instance for the instance to be created. Establishes a parent-child relationship between the two. The parent will be accessible as `this.$parent` for the child, and the child will be pushed into the parent's `$children` array.
777
787
@@ -781,7 +791,7 @@ Type: api
781
791
782
792
-**Tipo:**`Oggetto`
783
793
784
-
-**Details:**
794
+
-**Dettagli:**
785
795
786
796
An oggetto where chiaves are events to listen for and valores are the corresponding callbacks. Note these are Vue events rather than DOM events. The valore can also be a stringa of a method name. The Vue instance will call `$on()` for each entry in the oggetto at instantiation.
787
797
@@ -817,7 +827,7 @@ Type: api
817
827
818
828
-**Tipo:**`Array`
819
829
820
-
-**Details:**
830
+
-**Dettagli:**
821
831
822
832
The `mixins` option accepts an array of mixin oggettos. These mixin oggettos can contain instance opzioni just like normal instance oggettos, and they will be merged against the eventual opzioni using the same option merging logic in `Vue.extend()`. e.g. If your mixin contains a created hook and the component itself also has one, both functions will be called.
823
833
@@ -845,7 +855,7 @@ Type: api
845
855
846
856
-**Restriction:** only respected when used in `Vue.extend()`.
847
857
848
-
-**Details:**
858
+
-**Dettagli:**
849
859
850
860
Allow the component to recursively invoke itself in its template. Note that when a component is registraed globally with `Vue.component()`, the global ID is automatically set as its name.
851
861
@@ -876,7 +886,7 @@ Type: api
876
886
877
887
-**Tipo:**`Oggetto`
878
888
879
-
-**Details:**
889
+
-**Dettagli:**
880
890
881
891
The data oggetto that the Vue instance is observing. You can swap it with a new oggetto. The Vue instance proxies access to the properties on its data oggetto.
882
892
@@ -886,7 +896,7 @@ Type: api
886
896
887
897
-**Read only**
888
898
889
-
-**Details:**
899
+
-**Dettagli:**
890
900
891
901
The DOM element that the Vue instance is managing. Note that for [Fragment Instances](/guide/components.html#Fragment_Instance), `vm.$el` will return an anchor node that indicates the starting position of the fragment.
892
902
@@ -896,7 +906,7 @@ Type: api
896
906
897
907
-**Read only**
898
908
899
-
-**Details:**
909
+
-**Dettagli:**
900
910
901
911
The instantiation opzioni used for the current Vue instance. This is useful when you want to include custom properties in the opzioni:
902
912
@@ -915,7 +925,7 @@ Type: api
915
925
916
926
-**Read only**
917
927
918
-
-**Details:**
928
+
-**Dettagli:**
919
929
920
930
The parent instance, if the current instance has one.
921
931
@@ -925,7 +935,7 @@ Type: api
925
935
926
936
-**Read only**
927
937
928
-
-**Details:**
938
+
-**Dettagli:**
929
939
930
940
The root Vue instance of the current component tree. If the current instance has no parents this valore will be itself.
931
941
@@ -935,7 +945,7 @@ Type: api
935
945
936
946
-**Read only**
937
947
938
-
-**Details:**
948
+
-**Dettagli:**
939
949
940
950
The direct child components of the current instance.
941
951
@@ -945,7 +955,7 @@ Type: api
945
955
946
956
-**Read only**
947
957
948
-
-**Details:**
958
+
-**Dettagli:**
949
959
950
960
An oggetto that holds child components that have `v-ref` registraed.
951
961
@@ -959,7 +969,7 @@ Type: api
959
969
960
970
-**Read only**
961
971
962
-
-**Details:**
972
+
-**Dettagli:**
963
973
964
974
An oggetto that holds DOM elements that have `v-el` registraed.
965
975
@@ -1423,7 +1433,7 @@ Type: api
1423
1433
1424
1434
-**Expects:**`Stringa`
1425
1435
1426
-
-**Details:**
1436
+
-**Dettagli:**
1427
1437
1428
1438
Updates the element's `textContent`.
1429
1439
@@ -1441,7 +1451,7 @@ Type: api
1441
1451
1442
1452
-**Expects:**`Stringa`
1443
1453
1444
-
-**Details:**
1454
+
-**Dettagli:**
1445
1455
1446
1456
Updates the element's `innerHTML`. The contents are inserted as plain HTML - data bindings are ignored. If you need to reuse template pieces, you should use [partials](#partial).
0 commit comments