Skip to content

Commit

Permalink
add missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
infinite-system committed Aug 20, 2024
1 parent 06c5a2d commit a53ef40
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/docs/components/usage/CounterComposablesIvue.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<script setup lang="ts">
import { CustomMouse } from './classes/CustomMouse';
import { ivue, iref } from 'ivue';
class Counter {
count = iref(0);
increment() {
this.count++;
}
mouse = ivue(CustomMouse, 5)
}
const counter = ivue(Counter);
</script>
<template>
<a href="javascript:void(0)" @click="() => counter.increment()">Increment</a>
Count: {{ counter.count }} <br />
Mouse X: {{ counter.mouse.x }}, Y: {{ counter.mouse.y }}
<br />
Total (computed): {{ counter.mouse.total }}
<br />
<button class="button" @click="() => counter.mouse.sum()">Click This Big Sum Button To Total X + Y</button>
</template>

0 comments on commit a53ef40

Please sign in to comment.