@craterapp/vue-sdk
Version:
Embedded Invoicing & Bill Pay for platforms.
55 lines (54 loc) • 1.23 kB
JavaScript
import { e as r } from "./index-IlzZ4Xqv.js";
import { defineComponent as d, computed as i, openBlock as s, createBlock as c, unref as f, isRef as b } from "vue";
const j = /* @__PURE__ */ d({
__name: "DropdownType",
props: {
modelValue: {
type: [String, Object, Number],
default: null
},
options: {
type: Array,
default: () => []
},
valueProp: {
type: String,
default: "name"
},
label: {
type: String,
default: "name"
},
object: {
type: Boolean,
default: !1
},
step: {
type: Object,
required: !0
}
},
emits: ["update:modelValue"],
setup(e, { emit: a }) {
const n = e, u = a, t = i({
get: () => n.modelValue,
set: (l) => {
u("update:modelValue", l);
}
});
return (l, o) => {
const p = r;
return s(), c(p, {
modelValue: f(t),
"onUpdate:modelValue": o[0] || (o[0] = (m) => b(t) ? t.value = m : null),
options: e.options,
label: e.label,
"value-prop": e.valueProp,
object: e.object
}, null, 8, ["modelValue", "options", "label", "value-prop", "object"]);
};
}
});
export {
j as default
};