@@ -11,139 +11,177 @@ import {
11
11
const helpers = createNamespacedHelpers ( 'foo' ) ;
12
12
13
13
new Vue ( {
14
- computed : Object . assign ( { } ,
15
- mapState ( [ "a" ] ) ,
16
- mapState ( 'foo' , [ "a " ] ) ,
17
- mapState ( {
18
- b : "b "
14
+ computed : {
15
+ ... mapState ( [ "a" ] ) ,
16
+ ... mapState ( 'foo' , [ "b " ] ) ,
17
+ ... mapState ( {
18
+ c : "c "
19
19
} ) ,
20
- mapState ( 'foo' , {
21
- b : "b "
20
+ ... mapState ( 'foo' , {
21
+ d : "d "
22
22
} ) ,
23
- mapState ( {
24
- c : ( state : any , getters : any ) => state . c + getters . c
23
+ ... mapState ( {
24
+ e : ( state : any , getters : any ) => state . a + getters . g
25
25
} ) ,
26
- mapState ( 'foo' , {
27
- c : ( state : any , getters : any ) => state . c + getters . c
26
+ ... mapState ( 'foo' , {
27
+ f : ( state : any , getters : any ) => state . a + getters . g
28
28
} ) ,
29
29
30
- mapGetters ( [ "d " ] ) ,
31
- mapGetters ( 'foo' , [ "d " ] ) ,
32
- mapGetters ( {
33
- e : "e "
30
+ ... mapGetters ( [ "g " ] ) ,
31
+ ... mapGetters ( 'foo' , [ "h " ] ) ,
32
+ ... mapGetters ( {
33
+ i : "i "
34
34
} ) ,
35
- mapGetters ( 'foo' , {
36
- e : "e "
35
+ ... mapGetters ( 'foo' , {
36
+ j : "j "
37
37
} ) ,
38
38
39
- helpers . mapState ( [ "k" ] ) ,
40
- helpers . mapState ( {
41
- k : "k "
42
- } ) ,
43
- helpers . mapState ( {
44
- k : ( state : any , getters : any ) => state . k + getters . k ,
45
- useThis ( state : any , getters : any ) {
46
- return state . k + getters . k + this . whatever
39
+ ... helpers . mapState ( [ "k" ] ) ,
40
+ ... helpers . mapState ( {
41
+ l : "l "
42
+ } ) ,
43
+ ... helpers . mapState ( {
44
+ m : ( state : any , getters : any ) => state . a + getters . g ,
45
+ useThis ( state : any , getters : any ) : any {
46
+ return state . a + getters . g + this . whatever
47
47
}
48
48
} ) ,
49
49
50
- helpers . mapGetters ( [ "l " ] ) ,
51
- helpers . mapGetters ( {
52
- l : "l "
50
+ ... helpers . mapGetters ( [ "n " ] ) ,
51
+ ... helpers . mapGetters ( {
52
+ o : "o "
53
53
} ) ,
54
54
55
- {
56
- otherComputed ( ) {
57
- return "f" ;
58
- }
55
+
56
+ otherComputed ( ) {
57
+ return "" ;
59
58
}
60
- ) ,
59
+ } ,
61
60
62
- methods : Object . assign ( { } ,
63
- mapActions ( [ "g " ] ) ,
64
- mapActions ( {
65
- h : "h "
66
- } ) ,
67
- mapActions ( {
68
- g ( dispatch , a : string , b : number , c : boolean ) : void {
69
- dispatch ( 'g ' , { a, b, c } )
61
+ methods : {
62
+ ... mapActions ( [ "p " ] ) ,
63
+ ... mapActions ( {
64
+ q : "q "
65
+ } ) ,
66
+ ... mapActions ( {
67
+ r ( dispatch , a : string , b : number , c : boolean ) {
68
+ dispatch ( 'p ' , { a, b, c } )
70
69
dispatch ( {
71
- type : 'g ' ,
70
+ type : 'p ' ,
72
71
a,
73
72
b,
74
73
c
75
74
} )
76
75
}
77
76
} ) ,
78
- mapActions ( 'foo' , [ "g " ] ) ,
79
- mapActions ( 'foo' , {
80
- h : "h "
77
+ ... mapActions ( 'foo' , [ "s " ] ) ,
78
+ ... mapActions ( 'foo' , {
79
+ t : "t "
81
80
} ) ,
82
- mapActions ( 'foo' , {
83
- g ( dispatch , a : string , b : number , c : boolean ) : void {
84
- dispatch ( 'g ' , { a, b, c } )
81
+ ... mapActions ( 'foo' , {
82
+ u ( dispatch , a : string , b : number , c : boolean ) {
83
+ dispatch ( 'p ' , { a, b, c } )
85
84
dispatch ( {
86
- type : 'g ' ,
85
+ type : 'p ' ,
87
86
a,
88
87
b,
89
88
c
90
89
} )
91
90
}
92
91
} ) ,
93
92
94
- mapMutations ( [ "i " ] ) ,
95
- mapMutations ( {
96
- j : "j "
93
+ ... mapMutations ( [ "v " ] ) ,
94
+ ... mapMutations ( {
95
+ w : "w "
97
96
} ) ,
98
- mapMutations ( {
99
- i ( commit , a : string , b : number , c : boolean ) : void {
100
- commit ( 'i ' , { a, b, c } )
97
+ ... mapMutations ( {
98
+ x ( commit , a : string , b : number , c : boolean ) {
99
+ commit ( 'v ' , { a, b, c } )
101
100
commit ( {
102
- type : 'i ' ,
101
+ type : 'v ' ,
103
102
a,
104
103
b,
105
104
c
106
105
} )
107
106
}
108
107
} ) ,
109
- mapMutations ( 'foo' , [ "i " ] ) ,
110
- mapMutations ( 'foo' , {
111
- j : "j "
108
+ ... mapMutations ( 'foo' , [ "y " ] ) ,
109
+ ... mapMutations ( 'foo' , {
110
+ z : "z "
112
111
} ) ,
113
- mapMutations ( 'foo' , {
114
- i ( commit , a : string , b : number , c : boolean ) : void {
115
- commit ( 'i ' , { a, b, c } )
112
+ ... mapMutations ( 'foo' , {
113
+ aa ( commit , a : string , b : number , c : boolean ) {
114
+ commit ( 'v ' , { a, b, c } )
116
115
commit ( {
117
- type : 'i ' ,
116
+ type : 'v ' ,
118
117
a,
119
118
b,
120
119
c
121
120
} )
122
121
}
123
122
} ) ,
124
123
125
- helpers . mapActions ( [ "m " ] ) ,
126
- helpers . mapActions ( {
127
- m : "m "
124
+ ... helpers . mapActions ( [ "ab " ] ) ,
125
+ ... helpers . mapActions ( {
126
+ ac : "ac "
128
127
} ) ,
129
- helpers . mapActions ( {
130
- m ( dispatch , value : string ) {
131
- dispatch ( 'm ' , value )
128
+ ... helpers . mapActions ( {
129
+ ad ( dispatch , value : string ) {
130
+ dispatch ( 'p ' , value )
132
131
}
133
132
} ) ,
134
133
135
- helpers . mapMutations ( [ "n " ] ) ,
136
- helpers . mapMutations ( {
137
- n : "n "
134
+ ... helpers . mapMutations ( [ "ae " ] ) ,
135
+ ... helpers . mapMutations ( {
136
+ af : "af "
138
137
} ) ,
139
- helpers . mapMutations ( {
140
- n ( commit , value : string ) {
141
- commit ( 'm ' , value )
138
+ ... helpers . mapMutations ( {
139
+ ag ( commit , value : string ) {
140
+ commit ( 'v ' , value )
142
141
}
143
142
} ) ,
144
143
145
- {
146
- otherMethod ( ) { }
147
- }
148
- )
144
+ otherMethod ( ) { }
145
+ } ,
146
+
147
+ created ( ) {
148
+ // Computed
149
+ this . a
150
+ this . b
151
+ this . c
152
+ this . d
153
+ this . e
154
+ this . f
155
+ this . g
156
+ this . h
157
+ this . i
158
+ this . j
159
+ this . k
160
+ this . l
161
+ this . m
162
+ this . n
163
+ this . o
164
+ this . otherComputed
165
+
166
+ // Methods
167
+ this . p ( )
168
+ this . q ( )
169
+ this . r ( '' , 0 , true )
170
+ this . s ( )
171
+ this . t ( )
172
+ this . u ( '' , 0 , true )
173
+ this . v ( )
174
+ this . w ( )
175
+ this . x ( '' , 0 , true )
176
+ this . y ( )
177
+ this . z ( )
178
+ this . aa ( '' , 0 , true )
179
+ this . ab ( )
180
+ this . ac ( )
181
+ this . ad ( '' )
182
+ this . ae ( )
183
+ this . af ( )
184
+ this . ag ( '' )
185
+ this . otherMethod ( )
186
+ }
149
187
} ) ;
0 commit comments