File tree 2 files changed +13
-6
lines changed
2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ function create (context) {
80
80
const extendedOrder = order . map ( property => groups [ property ] || property )
81
81
const orderMap = getOrderMap ( extendedOrder )
82
82
83
- return utils . executeOnVueComponent ( context , ( properties ) => {
83
+ return utils . executeOnVueInstance ( context , ( properties ) => {
84
84
checkOrder ( properties , orderMap , context )
85
85
} )
86
86
}
Original file line number Diff line number Diff line change @@ -297,6 +297,18 @@ module.exports = {
297
297
node . arguments [ 0 ] . type === 'ObjectExpression'
298
298
} ,
299
299
300
+ executeOnVueInstance ( context , cb ) {
301
+ const _this = this
302
+
303
+ return Object . assign ( { } , {
304
+ 'NewExpression:exit' ( node ) {
305
+ // new Vue({})
306
+ if ( ! _this . isVueInstance ( node ) ) return
307
+ cb ( node . arguments [ 0 ] . properties )
308
+ }
309
+ } , this . executeOnVueComponent ( context , cb ) )
310
+ } ,
311
+
300
312
executeOnVueComponent ( context , cb ) {
301
313
const filePath = context . getFilename ( )
302
314
const _this = this
@@ -311,11 +323,6 @@ module.exports = {
311
323
// Vue.component('xxx', {}) || component('xxx', {})
312
324
if ( ! _this . isVueComponent ( node ) ) return
313
325
cb ( node . arguments . slice ( - 1 ) [ 0 ] . properties )
314
- } ,
315
- 'NewExpression:exit' ( node ) {
316
- // new Vue({})
317
- if ( ! _this . isVueInstance ( node ) ) return
318
- cb ( node . arguments [ 0 ] . properties )
319
326
}
320
327
}
321
328
} ,
You can’t perform that action at this time.
0 commit comments