File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed
Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 11< div class ="example ">
22 < pg-json part ="json "> </ pg-json >
3+ < pre part ="output "> </ pre >
34</ div >
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import template from './basic.html';
1010} )
1111export default class XPgJsonBasic extends HTMLElement {
1212 @Part ( ) $json : PgJson ;
13+ @Part ( ) $output : HTMLPreElement ;
1314
1415 connectedCallback ( ) {
1516 this . $json . value = {
@@ -24,7 +25,7 @@ export default class XPgJsonBasic extends HTMLElement {
2425 if ( value !== parent [ key ] ) {
2526 parent [ key ] = value ;
2627 }
27- console . log ( this . $json . value ) ;
28+ this . $output . textContent = JSON . stringify ( this . $json . value ) ;
2829 } ) ;
2930 }
3031}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export default class PgJsonNumber extends HTMLElement {
2424 detail : {
2525 path : [ this . key ] ,
2626 key : this . key ,
27- value : e . detail . value ,
27+ value : Number . parseInt ( e . detail . value , 10 ) ,
2828 }
2929 } )
3030 ) ;
You can’t perform that action at this time.
0 commit comments