hugo-theme-cyberscopes/assets/js/main.ts

22 lines
465 B
TypeScript

import { createApp } from './lib/petite-vue.es.js'
createApp({
$delimiters: ['{|', '|}'],
urlParams: new URL(location.href).searchParams,
mydata: Data(),
}).mount()
function Data() {
return {
data: '',
save(txt: string) {
this.data += '\n' + txt
}
}
}
// p = new URL(location.href).searchParams
// id = p.get('id')
// fetch('http://localhost:8125/api/system/poll/service/pclt-0001').
// then((res) => res.json()).then((data) => console.log(data))