ivue-material-plus
Version:
A high quality UI components Library with Vue.js
176 lines (171 loc) • 8.81 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var index_vue_vue_type_script_lang = require('./index.vue_vue_type_script_lang.js');
var vue = require('vue');
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
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 = vue.resolveComponent("select-head");
const _component_ivue_icon = vue.resolveComponent("ivue-icon");
const _component_ivue_option = vue.resolveComponent("ivue-option");
const _component_drop_down = vue.resolveComponent("drop-down");
const _directive_ivue_loading = vue.resolveDirective("ivue-loading");
const _directive_transfer_dom = vue.resolveDirective("transfer-dom");
const _directive_click_outside = vue.resolveDirective("click-outside");
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
ref: "selectWrapper",
class: vue.normalizeClass(_ctx.classes)
}, [
vue.createElementVNode("div", {
ref: "reference",
class: vue.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] = vue.withKeys(vue.withModifiers((...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args), ["stop", "prevent"]), ["down"])),
_cache[8] || (_cache[8] = vue.withKeys(vue.withModifiers((...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args), ["stop", "prevent"]), ["up"])),
_cache[9] || (_cache[9] = vue.withKeys(vue.withModifiers((...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args), ["stop", "prevent"]), ["enter"])),
_cache[10] || (_cache[10] = vue.withKeys(vue.withModifiers((...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args), ["stop", "prevent"]), ["esc"])),
_cache[11] || (_cache[11] = vue.withKeys((...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args), ["tab"]))
]
}, [
vue.renderSlot(_ctx.$slots, "input", {}, () => [
vue.createElementVNode("input", {
type: "hidden",
name: _ctx.name,
value: _ctx.currentSelectValue
}, null, 8, _hoisted_2),
vue.createCommentVNode(" \u5934\u90E8 "),
vue.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"
}, vue.createSlots({ _: 2 }, [
_ctx.$slots.prefix ? {
name: "prefix",
fn: vue.withCtx(() => [
vue.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),
vue.createCommentVNode(" \u4E0B\u62C9\u83DC\u5355 "),
vue.createVNode(vue.Transition, {
name: "transition-drop",
persisted: ""
}, {
default: vue.withCtx(() => [
vue.withDirectives((vue.openBlock(), vue.createBlock(_component_drop_down, {
transfer: _ctx.transfer,
"data-transfer": _ctx.transfer,
placement: _ctx.placement,
class: vue.normalizeClass(_ctx.dropdownClasses),
key: "IvueSelectDropdown",
ref: "dropdown"
}, {
default: vue.withCtx(() => [
vue.createCommentVNode(" \u6CA1\u6709\u627E\u5230\u6570\u636E\u65F6\u7684\u63D0\u793A "),
vue.withDirectives(vue.createElementVNode("ul", {
class: vue.normalizeClass([`${_ctx.prefixCls}-not-find`])
}, [
vue.createElementVNode("li", null, vue.toDisplayString(_ctx.notFindText), 1)
], 2), [
[vue.vShow, _ctx.showNotFindText && !_ctx.allowCreate && _ctx.notFindText]
]),
vue.createCommentVNode(" \u5217\u8868 "),
!_ctx.isSearchMethod || _ctx.isSearchMethod && !_ctx.loading ? (vue.openBlock(), vue.createElementBlock("ul", {
key: 0,
class: vue.normalizeClass(`${_ctx.prefixCls}-dropdown-list`)
}, [
vue.createCommentVNode(" \u521B\u5EFA\u9009\u9879 "),
_ctx.showCreateItem ? (vue.openBlock(), vue.createBlock(_component_ivue_option, {
key: 0,
class: vue.normalizeClass(_ctx.createItemClasses),
allowCreate: _ctx.allowCreate,
showCreateItem: _ctx.showCreateItem,
filterQuery: _ctx.data.filterQuery,
onOnCreate: _ctx.handleCreateItem
}, {
default: vue.withCtx(() => [
vue.createCommentVNode(" \u641C\u7D22\u5185\u5BB9 "),
vue.createElementVNode("p", _hoisted_3, vue.toDisplayString(_ctx.data.filterQuery), 1),
vue.createCommentVNode(" \u56FE\u6807 "),
vue.createVNode(_component_ivue_icon, null, {
default: vue.withCtx(() => [
vue.createTextVNode(vue.toDisplayString(_ctx.allowCreateIcon), 1)
]),
_: 1
})
]),
_: 1
}, 8, ["class", "allowCreate", "showCreateItem", "filterQuery", "onOnCreate"])) : vue.createCommentVNode("v-if", true),
vue.createCommentVNode(" slot "),
vue.renderSlot(_ctx.$slots, "default")
], 2)) : vue.createCommentVNode("v-if", true),
vue.createCommentVNode(" \u52A0\u8F7D\u4E2D "),
vue.withDirectives(vue.createElementVNode("ul", {
class: vue.normalizeClass(`${_ctx.prefixCls}-loading`)
}, [
vue.createElementVNode("div", {
class: vue.normalizeClass(`${_ctx.prefixCls}-loading--load`)
}, [
vue.withDirectives(vue.createElementVNode("div", _hoisted_4, null, 512), [
[_directive_ivue_loading, true]
]),
vue.createCommentVNode(" loadingText "),
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.loadingText), 1)
], 2)
], 2), [
[vue.vShow, _ctx.loading]
])
]),
_: 3
}, 8, ["transfer", "data-transfer", "placement", "class"])), [
[_directive_transfer_dom],
[vue.vShow, _ctx.dropVisible]
])
]),
_: 3
})
], 2)), [
[_directive_click_outside, _ctx.handleClickOutside, _ctx.capture],
[
_directive_click_outside,
_ctx.handleClickOutside,
_ctx.capture,
{ mousedown: true }
]
]);
}
var IvueSelect = /* @__PURE__ */ _pluginVue_exportHelper["default"](index_vue_vue_type_script_lang["default"], [["render", _sfc_render], ["__file", "D:\\louise\\person\\project\\GitHub\\ivue-ui-plus\\src\\components\\ivue-select\\index.vue"]]);
exports["default"] = IvueSelect;
//# sourceMappingURL=index2.js.map