UNPKG

various-ui

Version:

This is a test version of the Vue 3 component library

86 lines (81 loc) 2.77 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var vue = require('vue'); var index = require('./index.js'); var composable = require('./src/composable.js'); var index$1 = require('../../icon/index.js'); const _hoisted_1 = { key: 0, class: "ui-mask ui-loading" }; const __default__ = vue.defineComponent({ name: "UiTextarea" }); var _sfc_main = /* @__PURE__ */ vue.defineComponent({ ...__default__, props: index.UiTextareaPropsOption, emits: index.UiTextareaEmits, setup(__props, { expose: __expose, emit: __emit }) { const define = __props; const emits = __emit; const { refs, methods, handlers, computeds } = composable.useComposable(define, emits); const { className, status, style, attrs } = computeds; const { inputHandler } = handlers; const { enter, clear, focus, blur } = methods; const { inputNode } = refs; ; __expose({ clear, focus, blur }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "div", { class: vue.normalizeClass(["ui-textarea", vue.unref(className)]), style: vue.normalizeStyle(vue.unref(style)) }, [ vue.createCommentVNode(" * \u8F93\u5165\u6846\u4E3B\u4F53 "), vue.createElementVNode( "textarea", vue.mergeProps({ class: "ui-form-control", ref_key: "inputNode", ref: inputNode }, vue.toHandlers(vue.unref(inputHandler), true), vue.unref(attrs), { onKeydown: _cache[0] || (_cache[0] = vue.withKeys( //@ts-ignore (...args) => vue.unref(enter) && vue.unref(enter)(...args), ["enter"] )) }), null, 16 /* FULL_PROPS */ ), vue.createCommentVNode(" \u906E\u7F69\u5C42 "), vue.createVNode(vue.Transition, null, { default: vue.withCtx(() => [ vue.unref(status).name == "loading" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [ vue.withDirectives(vue.createVNode( vue.unref(index$1.UiIcon), { name: "loading", class: "ui-mask-icon" }, null, 512 /* NEED_PATCH */ ), [ [vue.vShow, vue.unref(status).is] ]) ])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }) ], 6 /* CLASS, STYLE */ ); }; } }); exports.default = _sfc_main; //# sourceMappingURL=index.vue2.js.map