Module @li3/browser - v0.0.7

@li3/browser

Browser APIs used to declare Li3 components

<template component="my-counter">
<div>
Count: {{ count }}
<button on-click="add()">+</button>
<button on-click="remove()">-</button>
</div>
<script setup>
import { ref } from '@li3/browser';

export default function () {
const count = ref(0);

return {
count,
add() { count.value++; },
remove() { count.value--; },
};
}
</script>
</template>
import { ref, createComponent } from '@li3/browser';

export const template = `
<div>
Count: {{ count }}
<button on-click="add()">+</button>
<button on-click="remove()">-</button>
</div>
`

export function setup() {
const count = ref(0);

return {
count,
add() { count.value++; },
remove() { count.value--; },
};
}

createComponent('my-counter', { template, setup });

Namespaces

Component

Interfaces

QueryObject

Functions

computed
createComponent
defineEvent
defineEvents
defineProp
defineProps
defineQuery
inject
mount
onDestroy
onInit
onUpdate
provide
ref
shallowRef