[Vue-rx] Access Events from Vue.js Templates as RxJS Streams with domStreams

Posted Answer1215

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Vue-rx] Access Events from Vue.js Templates as RxJS Streams with domStreams相关的知识,希望对你有一定的参考价值。

The domStreams component property enables you to access Events from your Vue.js templates as Streams insides your subscriptions function. You can then map the Events to other values and stream them back into your Vue.js templates.

 

<template>
  <section class="section">
    <button class="button" v-stream:click="click$">Click</button>
    <h1 class="title">{{random$}}</h1>
  </section>
</template>

<script>
import { Observable } from "rxjs"

export default {
  domStreams: ["click$"],
  subscriptions() {
    const random$ = this.click$.map(() =>
      Math.random()
    )

    return {
      random$
    }
  }
}
</script>

 

以上是关于[Vue-rx] Access Events from Vue.js Templates as RxJS Streams with domStreams的主要内容,如果未能解决你的问题,请参考以下文章

python 可打印的pandas组(来自http://stackoverflow.com/questions/14734533/how-to-access-pandas-groupby-datafr

cdh权限测试示例

MS Access“更新后”事件:引发错误

如何在 Excel 中显示来自 Access 的二维数组记录集?

Rails capybara 功能规范没有“Access-Control-Allow-Origin”

Nginx配置