Sha256: b9915904c3a6c8112a7f9e496c39c1c61e73041ccee6e32db26096832a00634d

Contents?: true

Size: 1.57 KB

Versions: 1

Compression:

Stored size: 1.57 KB

Contents

# Vue Component Builder
Generate Vue component CRUD from Rails model mapping

### Preview

Default theme

![](./scheenshot/default.png)

Element-plus theme

![](./scheenshot/element-plus.png)


### Compatibility

vue 3.x to element-plus theme

### Install

In development section of your **Gemfile** put:

```ruby
gem 'vue_component_builder'
```

And run

```shell
$ bundle install
```

### Features

 - Generate validate inputs from model validates roles;
 - Generate Vue methods hook with create, show, update, list and destroy javascript methods with Axios api calls template;
 - Recognize model attributes types (string, integer, datetime, date, decimal) and generate form fields according to them;
 - Mapping labels of form component from the i18n model;
 - Generate table list of in the same screen;
 - Exclude attributes models option;
 - Select theme [element-plus](https://element-plus.org/). (is default) 

### Usage

```ruby
model=Fruit
component=MyFruitComponent
theme=default [default or element-plus]
exclude=id,created_at,updated_at [optional]
```

```shell
$ rails g vue_component_builder:new model=Fruit  component=MyFruitComponent theme=default exclude=id,created_at,updated_at
```

The new component will be generated inside in your Rails public folder 
```shell
public/MyFruitComponent.vue
```
Then you can copy this component to your Vue application folder.

### TODO / coming soon

- Implement gem test;
- More theme options like Vuesax, BootstrapVue, Buefy or  PrimeVue;
- Output directory option of generated component.
- Add search option in table;
- Add filter in table.
- Use vuex

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vue_component_builder-0.1.2 README.md