UNPKG

ivue-material-plus

Version:

A high quality UI components Library with Vue.js

142 lines (139 loc) 6.98 kB
import _sfc_main from './select-head.vue_vue_type_script_lang.mjs'; import { resolveComponent, openBlock, createElementBlock, normalizeClass, createCommentVNode, renderSlot, createBlock, withCtx, createTextVNode, toDisplayString, Fragment, renderList, createElementVNode, withModifiers, withDirectives, normalizeStyle, withKeys, vModelText, createVNode, Transition } from 'vue'; import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs'; const _hoisted_1 = ["value", "disabled", "id"]; const _hoisted_2 = ["placeholder", "disabled", "id"]; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_ivue_icon = resolveComponent("ivue-icon"); return openBlock(), createElementBlock("div", { class: normalizeClass(_ctx.wrapperClasses), ref: "wrapper" }, [ createCommentVNode(" \u56FE\u6807 "), _ctx.$slots.prefix || _ctx.prefix ? (openBlock(), createElementBlock("span", { key: 0, class: normalizeClass(`${_ctx.prefixCls}-prefix`) }, [ renderSlot(_ctx.$slots, "prefix", {}, () => [ _ctx.prefix ? (openBlock(), createBlock(_component_ivue_icon, { key: 0 }, { default: withCtx(() => [ createTextVNode(toDisplayString(_ctx.prefix), 1) ]), _: 1 })) : createCommentVNode("v-if", true) ]) ], 2)) : createCommentVNode("v-if", true), createCommentVNode(" \u591A\u9009\u548C\u8BBE\u7F6E\u4E86\u6700\u5927\u663E\u793A\u6570\u65F6\u7684\u65B9\u6846 "), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selectedMultiple, (item, index) => { return openBlock(), createElementBlock(Fragment, null, [ _ctx.maxTagCount === void 0 || index < _ctx.maxTagCount ? (openBlock(), createElementBlock("div", { class: normalizeClass(`${_ctx.prefixCls}-tag`), key: item.value }, [ createElementVNode("span", { class: normalizeClass({ [`${_ctx.prefixCls}-tag-text`]: true, [`${_ctx.prefixCls}-multiple-tag-hidden`]: item.disabled }) }, toDisplayString(item.label), 3), !item.disabled ? (openBlock(), createBlock(_component_ivue_icon, { key: 0, class: normalizeClass(_ctx.multipleIcon), onClick: withModifiers(($event) => _ctx.handleRemoveSelectItem(item), ["stop"]) }, { default: withCtx(() => [ createTextVNode(toDisplayString(_ctx.multipleIcon), 1) ]), _: 2 }, 1032, ["class", "onClick"])) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true) ], 64); }), 256)), createCommentVNode(" \u591A\u9009\u8FBE\u5230\u6700\u5927\u503C\u7701\u7565 "), _ctx.maxTagCount !== void 0 && _ctx.selectedMultiple.length > _ctx.maxTagCount ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(`${_ctx.prefixCls}-tag`) }, [ createElementVNode("span", { class: normalizeClass(`${_ctx.prefixCls}-tag-text ${_ctx.prefixCls}-max-tag`) }, [ _ctx.maxTagPlaceholder ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ createTextVNode(toDisplayString(_ctx.maxTagPlaceholder(_ctx.selectedMultiple.length - _ctx.maxTagCount)), 1) ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ createTextVNode("+" + toDisplayString(_ctx.selectedMultiple.length - _ctx.maxTagCount) + "...", 1) ], 64)) ], 2) ], 2)) : createCommentVNode("v-if", true), createCommentVNode(" \u666E\u901A\u6E32\u67D3 "), _ctx.defaultDisplayValue ? (openBlock(), createElementBlock("input", { key: 2, class: normalizeClass(_ctx.defaultDisplayClasses), value: _ctx.defaultDisplayValue, type: "text", tabindex: "0", readonly: "", spellcheck: "false", autocomplete: "off", disabled: _ctx.disabled, id: _ctx.id, onFocus: _cache[0] || (_cache[0] = (...args) => _ctx.handleInputFocus && _ctx.handleInputFocus(...args)), onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.handleInputBlur && _ctx.handleInputBlur(...args)) }, null, 42, _hoisted_1)) : createCommentVNode("v-if", true), createCommentVNode(" \u8F93\u5165\u6846 "), _ctx.filterable ? withDirectives((openBlock(), createElementBlock("input", { key: 3, type: "text", "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.data.filterQuery = $event), class: normalizeClass(_ctx.inputClasses), style: normalizeStyle(_ctx.inputStyles), placeholder: _ctx.showPlaceholder ? _ctx.placeholder : "", disabled: _ctx.disabled, id: _ctx.id, spellcheck: "false", autocomplete: "off", onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.handleInputFocus && _ctx.handleInputFocus(...args)), onBlur: _cache[4] || (_cache[4] = (...args) => _ctx.handleInputBlur && _ctx.handleInputBlur(...args)), onInput: _cache[5] || (_cache[5] = (...args) => _ctx.handleResetInputState && _ctx.handleResetInputState(...args)), onKeydown: [ _cache[6] || (_cache[6] = withKeys((...args) => _ctx.handleInputDelete && _ctx.handleInputDelete(...args), ["delete"])), _cache[7] || (_cache[7] = withKeys((...args) => _ctx.handleInputEnter && _ctx.handleInputEnter(...args), ["enter"])) ], ref: "input" }, null, 46, _hoisted_2)), [ [vModelText, _ctx.data.filterQuery] ]) : createCommentVNode("v-if", true), createCommentVNode(" \u4E0B\u62C9\u56FE\u6807 "), createVNode(Transition, { name: "ivue-select-fade" }, { default: withCtx(() => [ !_ctx.resetSelect && !_ctx.isSearchMethod ? (openBlock(), createBlock(_component_ivue_icon, { key: 0, class: normalizeClass([`${_ctx.prefixCls}-arrow`]) }, { default: withCtx(() => [ createTextVNode(toDisplayString(_ctx.arrowDownIcon), 1) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true) ]), _: 1 }), createVNode(Transition, { name: "ivue-select-fade" }, { default: withCtx(() => [ _ctx.resetSelect ? (openBlock(), createBlock(_component_ivue_icon, { key: 0, class: normalizeClass([`${_ctx.prefixCls}-arrow`, `${_ctx.prefixCls}-clear`]), onClick: withModifiers(_ctx.handleClear, ["stop"]) }, { default: withCtx(() => [ createTextVNode(toDisplayString(_ctx.resetSelectIcon), 1) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true) ]), _: 1 }) ], 2); } var SelectHead = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:\\louise\\person\\project\\GitHub\\ivue-ui-plus\\src\\components\\ivue-select\\select-head.vue"]]); export { SelectHead as default }; //# sourceMappingURL=select-head.mjs.map