diff --git a/assets/js/main.ts b/assets/js/main.ts index b13ce2d..d6e7ac7 100644 --- a/assets/js/main.ts +++ b/assets/js/main.ts @@ -1,6 +1,6 @@ import { createApp } from './lib/petite-vue.es.js' -const apiUrl = 'http://localhost:8125/api/system/poll/service/pclt-0001' +const apiUrl = '/api/system/poll/service/pclt-0001' const appdata = { $delimiters: ['{|', '|}'], @@ -8,7 +8,10 @@ const appdata = { poll, newdata: '', data: '', - save + save, + mounted() { + console.log('app mounted') + } } createApp(appdata).mount() diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index b8d710b..17545af 100644 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -2,6 +2,7 @@ title: "example" summary: "" img: +pageid: domains: [] topics: [] date: 2023-02-16 @@ -16,6 +17,6 @@ cyberscopes example site - use petite-vue in Hugo-generated sites. {{< pv-count init="7" expr="count--" label="dec" >}} -{{< pv-count init="99" expr="save('Hello World!')" label="log" >}} +{{< pv-count init="99" expr="save()" label="log" >}} {{< input >}} diff --git a/layouts/partials/js.html b/layouts/partials/js.html index 9da137d..cf937f9 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -1,2 +1,3 @@ +