UNPKG

various-ui

Version:

This is a test version of the Vue 3 component library

105 lines (100 loc) 3.5 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 = { class: "ui-form-control" }; const _hoisted_2 = { key: 0, class: "ui-mask ui-loading" }; const __default__ = vue.defineComponent({ name: "UiScopeInput" }); var _sfc_main = /* @__PURE__ */ vue.defineComponent({ ...__default__, props: index.UiScopeInputPropsOption, emits: index.UiScopeInputEmits, setup(__props, { expose: __expose, emit: __emit }) { const define = __props; const emits = __emit; const { status, methods, handlers, computeds } = composable.useComposable(define, emits); const { clear } = methods; const { mainHandler } = handlers; const { style, attrs, className } = computeds; ; __expose({ clear }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "div", { class: vue.normalizeClass(["ui-scope-input", vue.unref(className)]), style: vue.normalizeStyle(vue.unref(style)) }, [ vue.createElementVNode("div", _hoisted_1, [ vue.withDirectives(vue.createElementVNode( "input", vue.mergeProps({ class: "ui-scope-input-control", type: "number" }, vue.toHandlers(vue.unref(mainHandler), true), vue.unref(attrs).start, { "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.modelValue.start = $event) }), null, 16 /* FULL_PROPS */ ), [ [vue.vModelText, _ctx.modelValue.start] ]), _cache[2] || (_cache[2] = vue.createElementVNode( "div", { class: "ui-scope-input-line" }, null, -1 /* HOISTED */ )), vue.withDirectives(vue.createElementVNode( "input", vue.mergeProps({ class: "ui-scope-input-control", type: "number" }, vue.toHandlers(vue.unref(mainHandler), true), vue.unref(attrs).end, { "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.modelValue.end = $event) }), null, 16 /* FULL_PROPS */ ), [ [vue.vModelText, _ctx.modelValue.end] ]) ]), vue.createCommentVNode(" \u906E\u7F69\u5C42 "), vue.createVNode(vue.Transition, null, { default: vue.withCtx(() => [ vue.unref(status).name == "loading" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [ 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