UNPKG

ivue-material-plus

Version:

A high quality UI components Library with Vue.js

171 lines (168 loc) 9.52 kB
import _sfc_main from './index.vue_vue_type_script_lang.mjs'; import { normalizeClass, resolveComponent, openBlock, createElementBlock, Fragment, createCommentVNode, normalizeStyle, renderSlot, createElementVNode, withDirectives, toDisplayString, vShow, withKeys, withModifiers, createVNode, withCtx, createTextVNode } from 'vue'; import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs'; const _hoisted_1 = { class: "ivue-icon" }; const _hoisted_2 = ["placeholder", "spellcheck", "type", "disabled", "autocomplete", "readonly", "name", "value", "autofocus", "number", "id", "maxlength"]; const _hoisted_3 = { class: "ivue-icon" }; const _hoisted_4 = { class: "ivue-icon" }; const _hoisted_5 = { class: "ivue-icon" }; const _hoisted_6 = { key: 0, class: /* @__PURE__ */ normalizeClass(["ivue-icon"]) }; const _hoisted_7 = ["id", "name", "disabled", "value", "placeholder", "autofocus", "readonly", "rows", "maxlength", "spellcheck", "wrap"]; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_ivue_icon = resolveComponent("ivue-icon"); return openBlock(), createElementBlock("div", { class: normalizeClass(_ctx.wrapClasses) }, [ _ctx.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ createCommentVNode(" \u524D\u7F6E\u5185\u5BB9\uFF0C\u4EC5\u5728 text \u7C7B\u578B\u4E0B\u6709\u6548 "), _ctx.prepend ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass([`${_ctx.prefixCls}-group-prepend`, ..._ctx.prependColor]), style: normalizeStyle(_ctx.prependStyle) }, [ renderSlot(_ctx.$slots, "prepend") ], 6)) : createCommentVNode("v-if", true), createCommentVNode(" \u8F93\u5165\u6846 "), createElementVNode("div", { class: normalizeClass(_ctx.contentClass) }, [ createCommentVNode(" \u9996\u90E8\u56FE\u6807 "), withDirectives(createElementVNode("span", { class: normalizeClass([`${_ctx.prefixCls}-prefix`]) }, [ renderSlot(_ctx.$slots, "prefix", {}, () => [ createElementVNode("i", _hoisted_1, toDisplayString(_ctx.prefix), 1) ]) ], 2), [ [vShow, _ctx.showPrefix] ]), createElementVNode("input", { class: normalizeClass(_ctx.inputClass), placeholder: _ctx.placeholder, spellcheck: _ctx.spellcheck, type: _ctx.currentType, disabled: _ctx.inputDisabled, autocomplete: _ctx.autocomplete, readonly: _ctx.readonly, name: _ctx.name, value: _ctx.currentValue, autofocus: _ctx.autofocus, number: _ctx.number, id: _ctx.inputId, maxlength: _ctx.maxlength, onKeyup: [ _cache[0] || (_cache[0] = withKeys((...args) => _ctx.handleEnter && _ctx.handleEnter(...args), ["enter"])), _cache[1] || (_cache[1] = (...args) => _ctx.handleKeyup && _ctx.handleKeyup(...args)) ], onKeypress: _cache[2] || (_cache[2] = (...args) => _ctx.handleKeypress && _ctx.handleKeypress(...args)), onKeydown: _cache[3] || (_cache[3] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args)), onInput: _cache[4] || (_cache[4] = (...args) => _ctx.handleInput && _ctx.handleInput(...args)), onFocus: _cache[5] || (_cache[5] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)), onBlur: _cache[6] || (_cache[6] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)), ref: "input" }, null, 42, _hoisted_2), createCommentVNode(" \u91CD\u7F6E\u9009\u62E9 "), _ctx.clearable && _ctx.currentValue && !_ctx.disabled ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass([`${_ctx.prefixCls}-icon`, `${_ctx.prefixCls}-clear`]), onClick: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.handleClear && _ctx.handleClear(...args), ["stop"])) }, [ createVNode(_component_ivue_icon, { class: normalizeClass([`${_ctx.prefixCls}-icon-clear`, _ctx.showSuffix ? "is-suffix" : ""]) }, { default: withCtx(() => [ createTextVNode(toDisplayString(_ctx.clearIcon), 1) ]), _: 1 }, 8, ["class"]) ], 2)) : createCommentVNode("v-if", true), createCommentVNode(" \u5B57\u6570\u7EDF\u8BA1 "), _ctx.showWordLimit ? (openBlock(), createElementBlock("span", { key: 1, class: normalizeClass(`${_ctx.prefixCls}-word-count`) }, toDisplayString(_ctx.textLength) + "/" + toDisplayString(_ctx.upperLimit), 3)) : createCommentVNode("v-if", true), createCommentVNode(" \u662F\u5426\u663E\u793A\u5BC6\u7801 "), _ctx.password ? (openBlock(), createElementBlock("div", { key: 2, class: normalizeClass([`${_ctx.prefixCls}-suffix`, `${_ctx.prefixCls}-password`]), onClick: _cache[8] || (_cache[8] = (...args) => _ctx.handleShowPassword && _ctx.handleShowPassword(...args)) }, [ _ctx.showPassword ? renderSlot(_ctx.$slots, "password-on", { key: 0 }, () => [ createElementVNode("i", _hoisted_3, toDisplayString(_ctx.passwordIcon.on), 1) ]) : renderSlot(_ctx.$slots, "password-off", { key: 1 }, () => [ createElementVNode("i", _hoisted_4, toDisplayString(_ctx.passwordIcon.off), 1) ]) ], 2)) : createCommentVNode("v-if", true), createCommentVNode(" \u5C3E\u90E8\u56FE\u6807 "), _ctx.showSuffix ? (openBlock(), createElementBlock("span", { key: 3, class: normalizeClass([`${_ctx.prefixCls}-suffix`]), onClick: _cache[9] || (_cache[9] = withModifiers((...args) => _ctx.handleSuffix && _ctx.handleSuffix(...args), ["stop"])) }, [ renderSlot(_ctx.$slots, "suffix", {}, () => [ createElementVNode("i", _hoisted_5, toDisplayString(_ctx.suffix), 1) ]) ], 2)) : createCommentVNode("v-if", true) ], 2), createCommentVNode(" \u641C\u7D22\u578B\u8F93\u5165\u6846 "), _ctx.search && _ctx.enterButton === false ? (openBlock(), createElementBlock("i", { key: 1, class: normalizeClass([`${_ctx.prefixCls}-icon`, "ivue-icon"]), onClick: _cache[10] || (_cache[10] = (...args) => _ctx.handleSearch && _ctx.handleSearch(...args)) }, "search", 2)) : _ctx.search && _ctx.enterButton ? (openBlock(), createElementBlock("div", { key: 2, class: normalizeClass([`${_ctx.prefixCls}-group-append`, `${_ctx.prefixCls}-search`]), onClick: _cache[11] || (_cache[11] = (...args) => _ctx.handleSearch && _ctx.handleSearch(...args)) }, [ _ctx.enterButton === true ? (openBlock(), createElementBlock("i", _hoisted_6, "search")) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ createTextVNode(toDisplayString(_ctx.enterButton), 1) ], 64)) ], 2)) : createCommentVNode("v-if", true), createCommentVNode(" \u540E\u7F6E\u5185\u5BB9\uFF0C\u4EC5\u5728 text \u7C7B\u578B\u4E0B\u6709\u6548 "), _ctx.append ? (openBlock(), createElementBlock("div", { key: 3, class: normalizeClass([`${_ctx.prefixCls}-group-append`, ..._ctx.appendColor]), style: normalizeStyle(_ctx.appendStyle) }, [ renderSlot(_ctx.$slots, "append") ], 6)) : createCommentVNode("v-if", true) ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ createElementVNode("textarea", { id: _ctx.inputId, name: _ctx.name, disabled: _ctx.inputDisabled, class: normalizeClass(_ctx.textareaClasses), style: normalizeStyle(_ctx.textareaStyles), value: _ctx.currentValue, placeholder: _ctx.placeholder, autofocus: _ctx.autofocus, readonly: _ctx.readonly, rows: _ctx.rows, maxlength: _ctx.maxlength, spellcheck: _ctx.spellcheck, wrap: _ctx.wrap, onKeyup: [ _cache[12] || (_cache[12] = withKeys((...args) => _ctx.handleEnter && _ctx.handleEnter(...args), ["enter"])), _cache[13] || (_cache[13] = (...args) => _ctx.handleKeyup && _ctx.handleKeyup(...args)) ], onKeypress: _cache[14] || (_cache[14] = (...args) => _ctx.handleKeypress && _ctx.handleKeypress(...args)), onKeydown: _cache[15] || (_cache[15] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args)), onFocus: _cache[16] || (_cache[16] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)), onBlur: _cache[17] || (_cache[17] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)), onInput: _cache[18] || (_cache[18] = (...args) => _ctx.handleInput && _ctx.handleInput(...args)), ref: "textarea" }, null, 46, _hoisted_7), createCommentVNode(" \u5B57\u6570\u7EDF\u8BA1 "), _ctx.showWordLimit ? (openBlock(), createElementBlock("span", { key: 0, class: normalizeClass(`${_ctx.prefixCls}-word-count`) }, toDisplayString(_ctx.textLength) + "/" + toDisplayString(_ctx.upperLimit), 3)) : createCommentVNode("v-if", true) ], 64)) ], 2); } var IvueInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:\\louise\\person\\project\\GitHub\\ivue-ui-plus\\src\\components\\ivue-input\\index.vue"]]); export { IvueInput as default }; //# sourceMappingURL=index2.mjs.map