Skip to content

Commit 7566420

Browse files
committed
support rx observable bindings
1 parent 01da868 commit 7566420

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

src/backend/index.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ function getInstanceDetails (id) {
276276
processComputed(instance),
277277
processRouteContext(instance),
278278
processVuexGetters(instance),
279-
processFirebaseBindings(instance)
279+
processFirebaseBindings(instance),
280+
processObservables(instance)
280281
)
281282
}
282283
}
@@ -471,6 +472,28 @@ function processFirebaseBindings (instance) {
471472
}
472473
}
473474

475+
/**
476+
* Process vue-rx observable bindings.
477+
*
478+
* @param {Vue} instance
479+
* @return {Array}
480+
*/
481+
482+
function processObservables (instance) {
483+
var obs = instance.$observables
484+
if (obs) {
485+
return Object.keys(obs).map(key => {
486+
return {
487+
type: 'observable',
488+
key,
489+
value: instance[key]
490+
}
491+
})
492+
} else {
493+
return []
494+
}
495+
}
496+
474497
/**
475498
* Sroll a node into view.
476499
*

src/devtools/components/DataField.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ export default {
169169
border-radius 3px
170170
margin 2px 0
171171
position relative
172+
background-color #eee
172173
&.prop
173174
background-color #b3cbf7
174175
&:hover
@@ -181,6 +182,8 @@ export default {
181182
background-color #5dd5d5
182183
&.firebase-binding
183184
background-color #ffcc00
185+
&.observable
186+
background-color #ff9999
184187
.meta
185188
display none
186189
position absolute

0 commit comments

Comments
 (0)