UNPKG

dify-components

Version:

This is a modern component library template based on Turborepo+Vue 3.5+TypeScript.

20 lines (15 loc) 276 B
import { ref } from 'vue'; export function useCounter(initialValue = 0) { const count = ref(initialValue); const increment = () => { count.value++; }; const decrement = () => { count.value--; }; return { count, increment, decrement, }; }