ข้ามไปยังเนื้อหาหลัก
เนื้อหานี้ยังไม่มีในภาษาของคุณ และกำลังแสดงเป็นภาษาอังกฤษ

Create Adaptable Composable

Plugin ยืนยันแล้ว
95
เป็นส่วนหนึ่งของ:Vue.js Skills

Create a library-grade Vue composable that accepts maybe-reactive inputs (MaybeRef / MaybeRefOrGetter) so callers can pass a plain value, ref, or getter. Normalize inputs with toValue()/toRef() inside reactive effects (watch/watchEffect) to keep behavior predictable and reactive. Use this skill when user asks for creating adaptable or reusable composables.

สรุปโดย AI

This skill details how to create reusable Vue composables that can accept both reactive and non-reactive inputs using Vue's `MaybeRef` and `MaybeRefOrGetter` types, normalized with `toValue()` and `toRef()`. It includes type definitions and code examples for implementing this pattern.

Maintenance

  • warning:Commit recencyNo commits found in the last 90 days (last commit date is unavailable).

การติดตั้ง

เพิ่ม marketplace ก่อน

/plugin marketplace add vuejs-ai/skills
/plugin install create-adaptable-composable@vue-skills
about 1 month ago
2.4k stars
MIT
อัปเดตเมื่อ about 19 hours ago
ดูซอร์สโค้ด