class Matestack::Ui::VueJs::Components::Cable
Attributes
block_content[RW]
Public Instance Methods
component_attributes()
click to toggle source
Calls superclass method
Matestack::Ui::VueJs::Vue#component_attributes
# File lib/matestack/ui/vue_js/components/cable.rb, line 25 def component_attributes super.merge('v-bind:initial-template': "#{self.block_content.to_json}") end
container_attributes()
click to toggle source
# File lib/matestack/ui/vue_js/components/cable.rb, line 37 def container_attributes { class: 'matestack-cable-component-container', 'v-bind:class': '{ loading: loading === true }' } end
content(&block)
click to toggle source
# File lib/matestack/ui/vue_js/components/cable.rb, line 19 def content(&block) Matestack::Ui::Core::Base.new(:without_parent, nil, nil) do div(class: 'matestack-cable-component-root', id: ctx.id, &block) end end
create_children(&block)
click to toggle source
Calls superclass method
Matestack::Ui::VueJs::Vue#create_children
# File lib/matestack/ui/vue_js/components/cable.rb, line 13 def create_children(&block) # first render block content self.block_content = content(&block).render_content if block_given? super end
response()
click to toggle source
# File lib/matestack/ui/vue_js/components/cable.rb, line 29 def response div container_attributes do div wrapper_attributes do Matestack::Ui::Core::Base.new('v-runtime-template', ':template': 'cableTemplate') end end end
vue_props()
click to toggle source
# File lib/matestack/ui/vue_js/components/cable.rb, line 52 def vue_props { id: ctx.id, component_key: ctx.id, # events append_on: ctx.append_on, prepend_on: ctx.prepend_on, delete_on: ctx.delete_on, update_on: ctx.update_on, replace_on: ctx.replace_on, } end
wrapper_attributes()
click to toggle source
# File lib/matestack/ui/vue_js/components/cable.rb, line 44 def wrapper_attributes { class: 'matestack-cable-component-wrapper', 'v-if': 'cableTemplate != null', 'v-bind:class': '{ loading: loading === true }' } end