UNPKG

ivue-material-plus

Version:

A high quality UI components Library with Vue.js

172 lines (169 loc) 8.6 kB
import _sfc_main from './index.vue_vue_type_script_lang.mjs'; import { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, createElementVNode, withKeys, withModifiers, renderSlot, createCommentVNode, createVNode, createSlots, withCtx, Transition, createBlock, toDisplayString, vShow, createTextVNode } from 'vue'; import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs'; const _hoisted_1 = ["tabindex"]; const _hoisted_2 = ["name", "value"]; const _hoisted_3 = { class: "text" }; const _hoisted_4 = { class: "load" }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_select_head = resolveComponent("select-head"); const _component_ivue_icon = resolveComponent("ivue-icon"); const _component_ivue_option = resolveComponent("ivue-option"); const _component_drop_down = resolveComponent("drop-down"); const _directive_ivue_loading = resolveDirective("ivue-loading"); const _directive_transfer_dom = resolveDirective("transfer-dom"); const _directive_click_outside = resolveDirective("click-outside"); return withDirectives((openBlock(), createElementBlock("div", { ref: "selectWrapper", class: normalizeClass(_ctx.classes) }, [ createElementVNode("div", { ref: "reference", class: normalizeClass(_ctx.selectionClasses), tabindex: _ctx.selectTabindex, onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.handleHeaderFocus && _ctx.handleHeaderFocus(...args)), onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.handleHeaderFocus && _ctx.handleHeaderFocus(...args)), onClick: _cache[4] || (_cache[4] = (...args) => _ctx.handleToggleMenu && _ctx.handleToggleMenu(...args)), onMouseenter: _cache[5] || (_cache[5] = ($event) => _ctx.data.hasMouseHover = true), onMouseleave: _cache[6] || (_cache[6] = ($event) => _ctx.data.hasMouseHover = false), onKeydown: [ _cache[7] || (_cache[7] = withKeys(withModifiers((...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args), ["stop", "prevent"]), ["down"])), _cache[8] || (_cache[8] = withKeys(withModifiers((...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args), ["stop", "prevent"]), ["up"])), _cache[9] || (_cache[9] = withKeys(withModifiers((...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args), ["stop", "prevent"]), ["enter"])), _cache[10] || (_cache[10] = withKeys(withModifiers((...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args), ["stop", "prevent"]), ["esc"])), _cache[11] || (_cache[11] = withKeys((...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args), ["tab"])) ] }, [ renderSlot(_ctx.$slots, "input", {}, () => [ createElementVNode("input", { type: "hidden", name: _ctx.name, value: _ctx.currentSelectValue }, null, 8, _hoisted_2), createCommentVNode(" \u5934\u90E8 "), createVNode(_component_select_head, { id: _ctx.inputId, prefix: _ctx.prefix, filterable: _ctx.filterable, multiple: _ctx.multiple, maxTagCount: _ctx.maxTagCount, multipleIcon: _ctx.multipleIcon, maxTagPlaceholder: _ctx.maxTagPlaceholder, placeholder: _ctx.placeholder, arrowDownIcon: _ctx.arrowDownIcon, clearable: _ctx.canClearable, values: _ctx.data.values, isSearchMethod: _ctx.isSearchMethod, resetSelectIcon: _ctx.resetSelectIcon, disabled: _ctx.inputDisabled, filterQueryProp: _ctx.data.filterQuery, allowCreate: _ctx.allowCreate, showCreateItem: _ctx.showCreateItem, onOnClear: _ctx.clearSingleSelect, onOnFilterQueryChange: _ctx.handleFilterQueryChange, onOnInputFocus: _cache[0] || (_cache[0] = ($event) => _ctx.data.isFocused = true), onOnInputBlur: _cache[1] || (_cache[1] = ($event) => _ctx.data.isFocused = false), onOnEnter: _ctx.handleCreateItem, ref: "selectHead" }, createSlots({ _: 2 }, [ _ctx.$slots.prefix ? { name: "prefix", fn: withCtx(() => [ renderSlot(_ctx.$slots, "prefix") ]), key: "0" } : void 0 ]), 1032, ["id", "prefix", "filterable", "multiple", "maxTagCount", "multipleIcon", "maxTagPlaceholder", "placeholder", "arrowDownIcon", "clearable", "values", "isSearchMethod", "resetSelectIcon", "disabled", "filterQueryProp", "allowCreate", "showCreateItem", "onOnClear", "onOnFilterQueryChange", "onOnEnter"]) ]) ], 42, _hoisted_1), createCommentVNode(" \u4E0B\u62C9\u83DC\u5355 "), createVNode(Transition, { name: "transition-drop", persisted: "" }, { default: withCtx(() => [ withDirectives((openBlock(), createBlock(_component_drop_down, { transfer: _ctx.transfer, "data-transfer": _ctx.transfer, placement: _ctx.placement, class: normalizeClass(_ctx.dropdownClasses), key: "IvueSelectDropdown", ref: "dropdown" }, { default: withCtx(() => [ createCommentVNode(" \u6CA1\u6709\u627E\u5230\u6570\u636E\u65F6\u7684\u63D0\u793A "), withDirectives(createElementVNode("ul", { class: normalizeClass([`${_ctx.prefixCls}-not-find`]) }, [ createElementVNode("li", null, toDisplayString(_ctx.notFindText), 1) ], 2), [ [vShow, _ctx.showNotFindText && !_ctx.allowCreate && _ctx.notFindText] ]), createCommentVNode(" \u5217\u8868 "), !_ctx.isSearchMethod || _ctx.isSearchMethod && !_ctx.loading ? (openBlock(), createElementBlock("ul", { key: 0, class: normalizeClass(`${_ctx.prefixCls}-dropdown-list`) }, [ createCommentVNode(" \u521B\u5EFA\u9009\u9879 "), _ctx.showCreateItem ? (openBlock(), createBlock(_component_ivue_option, { key: 0, class: normalizeClass(_ctx.createItemClasses), allowCreate: _ctx.allowCreate, showCreateItem: _ctx.showCreateItem, filterQuery: _ctx.data.filterQuery, onOnCreate: _ctx.handleCreateItem }, { default: withCtx(() => [ createCommentVNode(" \u641C\u7D22\u5185\u5BB9 "), createElementVNode("p", _hoisted_3, toDisplayString(_ctx.data.filterQuery), 1), createCommentVNode(" \u56FE\u6807 "), createVNode(_component_ivue_icon, null, { default: withCtx(() => [ createTextVNode(toDisplayString(_ctx.allowCreateIcon), 1) ]), _: 1 }) ]), _: 1 }, 8, ["class", "allowCreate", "showCreateItem", "filterQuery", "onOnCreate"])) : createCommentVNode("v-if", true), createCommentVNode(" slot "), renderSlot(_ctx.$slots, "default") ], 2)) : createCommentVNode("v-if", true), createCommentVNode(" \u52A0\u8F7D\u4E2D "), withDirectives(createElementVNode("ul", { class: normalizeClass(`${_ctx.prefixCls}-loading`) }, [ createElementVNode("div", { class: normalizeClass(`${_ctx.prefixCls}-loading--load`) }, [ withDirectives(createElementVNode("div", _hoisted_4, null, 512), [ [_directive_ivue_loading, true] ]), createCommentVNode(" loadingText "), createElementVNode("span", null, toDisplayString(_ctx.loadingText), 1) ], 2) ], 2), [ [vShow, _ctx.loading] ]) ]), _: 3 }, 8, ["transfer", "data-transfer", "placement", "class"])), [ [_directive_transfer_dom], [vShow, _ctx.dropVisible] ]) ]), _: 3 }) ], 2)), [ [_directive_click_outside, _ctx.handleClickOutside, _ctx.capture], [ _directive_click_outside, _ctx.handleClickOutside, _ctx.capture, { mousedown: true } ] ]); } var IvueSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:\\louise\\person\\project\\GitHub\\ivue-ui-plus\\src\\components\\ivue-select\\index.vue"]]); export { IvueSelect as default }; //# sourceMappingURL=index2.mjs.map