vue_r
所属分类:前端开发
开发工具:Ruby
文件大小:55KB
下载次数:0
上传日期:2023-02-08 20:49:51
上 传 者:
sh-1993
说明: 受Vue.js启发的ruby中的 Reactdom编程
(Reactive dom programming in ruby, Vue.js inspired)
文件列表:
MIT-LICENSE (1047, 2023-02-09)
Rakefile (185, 2023-02-09)
app (0, 2023-02-09)
app\assets (0, 2023-02-09)
app\assets\config (0, 2023-02-09)
app\assets\config\vue_r_manifest.js (45, 2023-02-09)
app\assets\images (0, 2023-02-09)
app\assets\images\vue_r (0, 2023-02-09)
app\assets\images\vue_r\.keep (0, 2023-02-09)
app\assets\stylesheets (0, 2023-02-09)
app\assets\stylesheets\vue_r (0, 2023-02-09)
app\assets\stylesheets\vue_r\application.css (736, 2023-02-09)
app\controllers (0, 2023-02-09)
app\controllers\concerns (0, 2023-02-09)
app\controllers\concerns\.keep (0, 2023-02-09)
app\controllers\vue_r (0, 2023-02-09)
app\controllers\vue_r\application_controller.rb (77, 2023-02-09)
app\helpers (0, 2023-02-09)
app\helpers\vue_r (0, 2023-02-09)
app\helpers\vue_r\application_helper.rb (49, 2023-02-09)
app\jobs (0, 2023-02-09)
app\jobs\vue_r (0, 2023-02-09)
app\jobs\vue_r\application_job.rb (63, 2023-02-09)
app\mailers (0, 2023-02-09)
app\mailers\vue_r (0, 2023-02-09)
app\mailers\vue_r\application_mailer.rb (126, 2023-02-09)
app\models (0, 2023-02-09)
app\models\concerns (0, 2023-02-09)
app\models\concerns\.keep (0, 2023-02-09)
app\models\vue_r (0, 2023-02-09)
app\models\vue_r\application_record.rb (100, 2023-02-09)
app\views (0, 2023-02-09)
app\views\layouts (0, 2023-02-09)
app\views\layouts\vue_r (0, 2023-02-09)
app\views\layouts\vue_r\application.html.erb (212, 2023-02-09)
config (0, 2023-02-09)
config\initializers (0, 2023-02-09)
... ...
# VueR
(pronounced viewer)
VueR is a Vue.js inspired reactive frontend framework in ruby. It allows for the same kind of
declaritive change management as vue, albeit in smaller scope. Many vue-like features
work, and work continues, but the current scope is personal, so it's not meant as
a vue.js replacement.
## Usage
The usage is very close to the original, with off course ruby style.
This means currently working are:
- reactive attributes
- reactive text
- class based data
- class based method
- event dispatch to methods
The current and supported use is for making rails pages dynamic. An application
is defined by deriving from a base class, and can be "mounted" on an element.
There is a syntax to define Event handlers which are methods on the application.
Methods change the data. And any attributes or text that is declared as part of
the html will be updated automatically if needed.
The wiki has more detailed descriptions
## Installation
Installation is straightforward by including the gem and bundling
You can have a main js entry point, or many, it depends a bit.
You can also read the opal-rails to get a feel for how to work with ruby in the frontend.
I use haml, so
the usage is then:
- add the requires to the application.js
- write the application inside the haml template using :opal filter
The wiki has more details on how to use VueR from Haml or Erb
## Contributing
Ask
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
近期下载者:
相关文件:
收藏者: