ForgeComponenti
it

Componenti

j-UIEditor

jComponent 20 · jcomponent@20 component

Il componente apre UI Builder in un iframe. collegare la sua strada ad un oggetto che contiene il design e gli appuntamenti per salvare, pubblicare o prevedere.

Il componente apre il UI Builder nell'ipramma.

Configurazione:

  • url {String} un collegamento al UI Builder (default: https://uibuilder.totaljs.com)
  • Preparazione di top {Number}: 0
  • Preparazione di left {Number}: 0
  • Preparazione di right {Number}: 0
  • Preparazione di bottom {Number}: 0
  • Preparazione di zindex {Number}: 30
  • language {String} standard: eu (in inglese)
  • onsave {String} opzionale, un collegamento a function(data)
  • onpublish {String} opzionale, un collegamento a function(data)
  • onrender {String} opzionale, un collegamento a function(data)
  • Preparazione di closebutton {Boolean}: true

Il modello:

{
	data: { .. UI BUILDER DESIGN .. },
	upload: 'https://.../upload/', // optional
	groups: [{ id: 'group1', name: 'Group 1' }], // optional
	apps: [{ id: 'app1', name: 'App 1' }], // optional
	views: [{ id: 'view1', name: 'View 1' }], // optional
	close: function() {}, // optional, it's executed when the editor is closed
	save: function(data) {}, // optional, it's executed when the user saves design
	publish: function(data) {}, // optional, it's executed when the user compiles design
	render: function(data) {}, // optional, it's executed when the user wants to preview a design
}

Utilizzo

<ui-component name="uieditor" path="editor.current"></ui-component>
<script>
  function openDesign(design) {
    SET('editor.current', {
      data: design,
      save: function(updatedDesign) {
        SET('form.design', updatedDesign);
      }
    });
  }
</script>

La fonte: Componenti di Total.jsCopyright Peter Širka e contribuenti. La mia licenza.