vuestic-ui
Version:
Vue 3 UI Framework
19 lines (18 loc) • 516 B
JavaScript
import { computed } from "vue";
const useStringValueProps = {
separator: { type: String, default: ", " }
};
const useStringValue = (props, visibleSelectedOptions, getText) => {
return computed(() => {
var _a;
if (!((_a = visibleSelectedOptions.value) == null ? void 0 : _a.length)) {
return "";
}
return visibleSelectedOptions.value.map(getText).join(props.separator) ?? "";
});
};
export {
useStringValue as a,
useStringValueProps as u
};
//# sourceMappingURL=useStringValue.mjs.map