Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
support .native modifier for v-stream
support .native modifier for v-stream
  • Loading branch information
Baoyx007 authored Aug 26, 2017
commit ddee876b2c731090c86659ebdd1ea203cd6f34b7
3 changes: 2 additions & 1 deletion src/directives/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default {
let handle = binding.value
const event = binding.arg
const streamName = binding.expression
const modifiers = binding.modifiers

if (isSubject(handle)) {
handle = { subject: handle }
Expand All @@ -26,7 +27,7 @@ export default {
const subject = handle.subject
const next = (subject.next || subject.onNext).bind(subject)

if (vnode.componentInstance) {
if (!modifiers.native && vnode.componentInstance) {
handle.subscription = vnode.componentInstance.$eventToObservable(event).subscribe(e => {
next({
event: e,
Expand Down