bootstrap-vue-wrapper
Version:
Bootstrap 5 components in Vue3 wrapper.
52 lines (51 loc) • 1.85 kB
JavaScript
import s from "./BsSelect.vue2.js";
import { openBlock as l, createElementBlock as n, Fragment as a, toDisplayString as o, createCommentVNode as i, createElementVNode as u, mergeProps as v, renderList as p } from "vue";
import m from "../../_virtual/_plugin-vue_export-helper.js";
const f = ["for", "textContent"], b = ["id", "value", "aria-labelledby"], I = {
key: 0,
value: "",
disabled: "",
hidden: ""
}, g = ["value", "disabled"], h = ["textContent"], k = ["id", "textContent"];
function y(e, d, C, $, B, E) {
return l(), n(a, null, [
e.label !== void 0 ? (l(), n("label", {
key: 0,
for: e.id,
class: "form-label",
textContent: o(e.label)
}, null, 8, f)) : i("", !0),
u("select", v({
id: e.id,
ref: "inputRef",
class: "form-select",
value: e.modelValue,
"aria-labelledby": e.hint !== void 0 ? e.getHintId() : void 0
}, e.$attrs, {
onInput: d[0] || (d[0] = (...t) => e.onInput && e.onInput(...t)),
onInvalid: d[1] || (d[1] = (...t) => e.onInvalid && e.onInvalid(...t))
}), [
e.placeholder !== void 0 ? (l(), n("option", I, o(e.placeholder), 1)) : i("", !0),
(l(!0), n(a, null, p(e.options, (t, r) => (l(), n("option", {
key: r,
value: t.value,
disabled: t.disabled !== void 0 && t.disabled
}, o(t.text), 9, g))), 128))
], 16, b),
e.validatorEnabled && e.validator.getInvalidMessage() !== null ? (l(), n("div", {
key: 1,
class: "invalid-feedback",
textContent: o(e.validator.getInvalidMessage())
}, null, 8, h)) : i("", !0),
e.hint !== void 0 ? (l(), n("div", {
key: 2,
id: e.getHintId(),
class: "form-text",
textContent: o(e.hint)
}, null, 8, k)) : i("", !0)
], 64);
}
const N = /* @__PURE__ */ m(s, [["render", y]]);
export {
N as default
};