[Vue-rx] Access Events from Vue.js Templates as RxJS Streams with domStreams
2023-09-14 09:00:50 时间
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] Watch Vue.js v-models as Observable with $watchAsObservable and RxJS
- [Vue-rx] Access Events from Vue.js Templates as RxJS Streams with domStreams
- [Vue] Create Vue.js Layout and Navigation with Nuxt.js
- Vue.js——60分钟快速入门
- 使用vue搭建应用五引入Mock.js
- vue.js语法
- [Vue @Component] Dynamic Vue.js Components with the component element
- [Nuxt] Navigate with nuxt-link and Customize isClient Behavior in Nuxt and Vue.js
- vue.js 3.2.22:平滑回到顶部
- Atitit 常用技能点体系树 os win linux android 前后端 gui h5 vue js jquery bootstrap cocos2d Jafavx wpf
- 常用网络js链接大全(jQuery(3.4.1)、bootstrap、vue、ECharts、easyUI、React、maven、Mybatis、Spring、SpringMVC、Redis)
- 关于vue.js的使用经验总结
- 前端开发:vant在vue中的使用
- vue中使用分页组件、将从数据库中查询出来的数据分页展示(前后端分离SpringBoot+Vue)
- 在Vue中如何修改element UI组件的样式(deep 深度选择器)
- Vue2.x - Vue Router
- .NET MVC第十章 vue axios解析web api接口