birdpaper-ui
Version:
一个通用的 vue3 UI组件库。A common vue3 UI component library.
49 lines (48 loc) • 2.39 kB
JavaScript
;
const textarea_vue_vue_type_script_lang = require("./textarea.vue2.js");
const vue = require("vue");
const _pluginVue_exportHelper = require("../../_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 = vue.resolveComponent("IconCloseLine");
return vue.openBlock(), vue.createElementBlock("div", {
class: vue.normalizeClass(_ctx.inpClass)
}, [
vue.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),
vue.createElementVNode("div", _hoisted_2, [
!_ctx.slots.suffix ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
_ctx.showClear ? (vue.openBlock(), vue.createBlock(_component_IconCloseLine, {
key: 0,
class: "click-icon",
onClick: _ctx.handleClear
}, null, 8, ["onClick"])) : vue.createCommentVNode("", true),
_ctx.showWordLimit ? (vue.openBlock(), vue.createElementBlock("span", {
key: 1,
textContent: vue.toDisplayString(_ctx.limitText)
}, null, 8, _hoisted_3)) : vue.createCommentVNode("", true)
], 64)) : vue.createCommentVNode("", true),
vue.renderSlot(_ctx.$slots, "suffix")
])
], 2);
}
const _textarea = /* @__PURE__ */ _pluginVue_exportHelper(textarea_vue_vue_type_script_lang, [["render", _sfc_render]]);
module.exports = _textarea;