[Pas2js] pas2js with vue

warleyalex warleyalex at yahoo.com.br
Sun Nov 4 23:05:00 CET 2018


This a experimental app with pas2js + vue.JS 

LIVE PREVIEW: https://pas2js.github.io/master/projLForms/index.html

a) Set a ResourceString with vue directive v-on
-----------
ResourceString
 tmpl1 =
'<div class="content-block">'+
'  <p> 01. Alert With Text <#>  </p>'+
'  <p> 02. Alert With Text and Title <#>  </p>'+
'  <p> 03. Alert With Text and Title and Callback <#>  </p>'+
'  <p> 04. Alert With Text and Callback <#>  </p>'+
'  <p> 05. Confirm with text and Ok callback <#>  </p>'+
'  <p> 06. Confirm with text, Ok and Cancel callbacks <#>  </p>'+
'  <p> 07. Confirm with text, title and Ok callback <#>  </p>'+
'  <p> 08. Confirm with text, title, Ok and Cancel callback <#>  </p>'+
'  <p> 09. Prompt with text and Ok callback <#>  </p>'+
'  <p> 10. Prompt with text, Ok and Cancel callbacks <#>  </p>'+
'  <p> 11. Prompt with text, title and Ok callback <#>  </p>'+
'  <p> 12. Prompt with text, title, Ok and Cancel callback <#>  </p>'+
'   <p> 13. Login Modal <#>  </p>'+
'   <p> 14. Password Modal <#>  </p>'+
'   <p> 15. What is your name? <#>  </p>'+
'   <p> 16. Open Preloader <#>  </p>'+
'   <p> 17. Open Preloader with custom title <#>  </p>'+
'   <p> 18. Open Indicator <#>  </p>'+
'</div>';
-----------
Note: to get the same effect, pas2js could support multi-line strings, for
instance:
console.log(#'line1
   line2
   line3
  line4');

b) Create a vue options parameter like this:

Self.opt :=
  new(['methods', new([
                  'a0', @awt,
                  'a1', @awtt,
                  'a2', @awtatc,
                  'a3',  @awtc,
                  'a4',  @cwtaoc,
                  'a5',  @cwocc,
                  'a6',  @cwttoc,
                  'a7',  @cwttocc,
                  'a8',  @pwtoc,
                  'a9', @pwtocc,
                  'a10', @pwttaoc,
                  'a11', @pwttocc,
                  'a12', @lm,
                  'a13', @pm,
                  'a14', @nm,
                  'a15', @op,
                  'a16', @pwct,
                  'a17', @oi
                  ]),
       'template',
TSJHTMLTemplateElement(document.getElementById('J3').firstChild).content,
       'el',    '.swiper-container'
         ]);

  vueInstance:= JVue.New ( opt );

Regards,
warleyalex



--
Sent from: http://pas2js.38893.n8.nabble.com/


More information about the Pas2js mailing list