birdpaper-ui
Version:
一个通用的 vue3 UI组件库。A common vue3 UI component library.
63 lines (62 loc) • 2.77 kB
JavaScript
;
const select_vue_vue_type_script_lang = require("./select.vue2.js");
const vue = require("vue");
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.js");
const _hoisted_1 = {
key: 1,
style: { "text-align": "center", "font-size": "13px", "opacity": "0.6" }
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_IconCloseLine = vue.resolveComponent("IconCloseLine");
const _component_bp_input = vue.resolveComponent("bp-input");
const _component_bp_empty = vue.resolveComponent("bp-empty");
const _component_bp_trigger = vue.resolveComponent("bp-trigger");
return vue.openBlock(), vue.createBlock(_component_bp_trigger, {
"popup-visible": _ctx.isFocus,
"onUpdate:popupVisible": _cache[1] || (_cache[1] = ($event) => _ctx.isFocus = $event),
transition: "fade-dropdown",
class: vue.normalizeClass(_ctx.clsName),
disabled: _ctx.disabled,
"popup-offset": 10,
"auto-fit-width": "",
"update-at-scroll": ""
}, {
content: vue.withCtx(() => [
vue.createElementVNode("ul", {
class: vue.normalizeClass(`${_ctx.name}-option-list`)
}, [
_ctx.hasOptions ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
vue.createVNode(_component_bp_empty)
]))
], 2)
]),
default: vue.withCtx(() => [
vue.createVNode(_component_bp_input, {
ref: "inpRef",
disabled: _ctx.disabled,
modelValue: _ctx.currentSelect.label,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.currentSelect.label = $event),
readonly: "",
placeholder: _ctx.placeholder,
onMouseenter: _ctx.handleMouseEnter,
onMouseleave: _ctx.handleMouseLeave
}, {
suffix: vue.withCtx(() => [
!_ctx.disabled && _ctx.showClear && _ctx.currentSelect.label ? (vue.openBlock(), vue.createBlock(_component_IconCloseLine, {
key: 0,
class: "click-icon",
onClick: vue.withModifiers(_ctx.handleClear, ["stop"])
}, null, 8, ["onClick"])) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.isFocus ? _ctx.IconArrowUpSLine : _ctx.IconArrowDownSLine), {
key: 1,
class: vue.normalizeClass(`${_ctx.name}-icon-inner`),
size: "16px"
}, null, 8, ["class"]))
]),
_: 1
}, 8, ["disabled", "modelValue", "placeholder", "onMouseenter", "onMouseleave"])
]),
_: 3
}, 8, ["popup-visible", "class", "disabled"]);
}
const _select = /* @__PURE__ */ _pluginVue_exportHelper(select_vue_vue_type_script_lang, [["render", _sfc_render]]);
module.exports = _select;