UNPKG

various-ui

Version:

This is a test version of the Vue 3 component library

101 lines (98 loc) 3.5 kB
import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createElementVNode, withDirectives, mergeProps, toHandlers, vModelText, createCommentVNode, createVNode, Transition, withCtx, vShow } from 'vue'; import { UiScopeInputPropsOption, UiScopeInputEmits } from './index.mjs'; import { useComposable } from './src/composable.mjs'; import { UiIcon } from '../../icon/index.mjs'; const _hoisted_1 = { class: "ui-form-control" }; const _hoisted_2 = { key: 0, class: "ui-mask ui-loading" }; const __default__ = defineComponent({ name: "UiScopeInput" }); var _sfc_main = /* @__PURE__ */ defineComponent({ ...__default__, props: UiScopeInputPropsOption, emits: UiScopeInputEmits, setup(__props, { expose: __expose, emit: __emit }) { const define = __props; const emits = __emit; const { status, methods, handlers, computeds } = useComposable(define, emits); const { clear } = methods; const { mainHandler } = handlers; const { style, attrs, className } = computeds; ; __expose({ clear }); return (_ctx, _cache) => { return openBlock(), createElementBlock( "div", { class: normalizeClass(["ui-scope-input", unref(className)]), style: normalizeStyle(unref(style)) }, [ createElementVNode("div", _hoisted_1, [ withDirectives(createElementVNode( "input", mergeProps({ class: "ui-scope-input-control", type: "number" }, toHandlers(unref(mainHandler), true), unref(attrs).start, { "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.modelValue.start = $event) }), null, 16 /* FULL_PROPS */ ), [ [vModelText, _ctx.modelValue.start] ]), _cache[2] || (_cache[2] = createElementVNode( "div", { class: "ui-scope-input-line" }, null, -1 /* HOISTED */ )), withDirectives(createElementVNode( "input", mergeProps({ class: "ui-scope-input-control", type: "number" }, toHandlers(unref(mainHandler), true), unref(attrs).end, { "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.modelValue.end = $event) }), null, 16 /* FULL_PROPS */ ), [ [vModelText, _ctx.modelValue.end] ]) ]), createCommentVNode(" \u906E\u7F69\u5C42 "), createVNode(Transition, null, { default: withCtx(() => [ unref(status).name == "loading" ? (openBlock(), createElementBlock("div", _hoisted_2, [ withDirectives(createVNode( unref(UiIcon), { name: "loading", class: "ui-mask-icon" }, null, 512 /* NEED_PATCH */ ), [ [vShow, unref(status).is] ]) ])) : createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }) ], 6 /* CLASS, STYLE */ ); }; } }); export { _sfc_main as default }; //# sourceMappingURL=index.vue2.mjs.map