birdpaper-ui
Version:
一个通用的 vue3 UI组件库。A common vue3 UI component library.
50 lines (49 loc) • 2.38 kB
JavaScript
import _sfc_main from "./textarea.vue2.js";
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, createBlock, createCommentVNode, toDisplayString, renderSlot } from "vue";
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
const _hoisted_1 = ["rows", "disabled", "readonly", "cursor", "placeholder", "maxlength", "value"];
const _hoisted_2 = { class: "suffix" };
const _hoisted_3 = ["textContent"];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
var _a;
const _component_IconCloseLine = resolveComponent("IconCloseLine");
return openBlock(), createElementBlock("div", {
class: normalizeClass(_ctx.inpClass)
}, [
createElementVNode("textarea", {
ref: "inpRef",
class: "bp-textarea-inner",
rows: _ctx.rows,
spellcheck: false,
disabled: _ctx.disabled,
readonly: _ctx.readonly,
cursor: (_a = _ctx.modelValue) == null ? void 0 : _a.length,
placeholder: _ctx.placeholder,
maxlength: _ctx.maxlength,
value: _ctx.modelValue,
onFocus: _cache[0] || (_cache[0] = (...args) => _ctx.onFocus && _ctx.onFocus(...args)),
onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
onKeypress: _cache[2] || (_cache[2] = (...args) => _ctx.onKeypress && _ctx.onKeypress(...args)),
onKeyup: _cache[3] || (_cache[3] = (...args) => _ctx.onKeyup && _ctx.onKeyup(...args)),
onInput: _cache[4] || (_cache[4] = (...args) => _ctx.onInput && _ctx.onInput(...args))
}, null, 40, _hoisted_1),
createElementVNode("div", _hoisted_2, [
!_ctx.slots.suffix ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
_ctx.showClear ? (openBlock(), createBlock(_component_IconCloseLine, {
key: 0,
class: "click-icon",
onClick: _ctx.handleClear
}, null, 8, ["onClick"])) : createCommentVNode("", true),
_ctx.showWordLimit ? (openBlock(), createElementBlock("span", {
key: 1,
textContent: toDisplayString(_ctx.limitText)
}, null, 8, _hoisted_3)) : createCommentVNode("", true)
], 64)) : createCommentVNode("", true),
renderSlot(_ctx.$slots, "suffix")
])
], 2);
}
const _textarea = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
_textarea as default
};