djledda.de main
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 line
588 B

  1. import { defineComponent, computed, ref } from "vue";
  2. import Test from '@/test.tsx';
  3. export default defineComponent({
  4. name: "app-root",
  5. setup() {
  6. const count = ref(0);
  7. const countDouble = computed(() => count.value * 2);
  8. count.value++;
  9. return () => (
  10. <div class="app-main">
  11. <button class="test" onClick={() => count.value++}>Click me!</button>
  12. <div>Count: {count.value}</div>
  13. <div>Count Double: {countDouble.value}</div>
  14. <Test />
  15. </div>
  16. );
  17. },
  18. });