UNPKG

portalis-component

Version:

Component Library for Nuxt 3 using TailwindCSS

21 lines (20 loc) 437 B
import { computed } from "vue-demi"; export function useOptionsProp(props) { return computed(() => { if (Array.isArray(props.options)) { return props.options.map((item) => { if (typeof item === "string") { return { text: item, value: item }; } return item; }); } return []; }); } export function defineAdapter(adapter) { return adapter; }