UNPKG

various-ui

Version:

This is a test version of the Vue 3 component library

122 lines (119 loc) 4.52 kB
import { defineComponent, onBeforeUnmount, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, mergeProps, unref, createVNode, Transition, toHandlers, withCtx, createBlock, resolveDynamicComponent } from 'vue'; import { UiDateRangePickerPropsOption, UiDateRangePickerEmits } from './src/component.mjs'; import { useComposable } from './src/composable.mjs'; const _hoisted_1 = { class: "ui-form-candidate-container" }; const __default__ = defineComponent({ name: "UiDateRangePicker" }); var _sfc_main = /* @__PURE__ */ defineComponent({ ...__default__, props: UiDateRangePickerPropsOption, emits: UiDateRangePickerEmits, setup(__props, { emit: __emit }) { const emits = __emit; const define = __props; const { ons, vars, refs, nodes, binds, watchs, methods, computeds } = useComposable(define, emits); const { view } = computeds; const { show } = methods; const { candidates, components, container } = nodes; const { visible } = refs; onBeforeUnmount(() => { var _a; watchs == null ? void 0 : watchs.stop_watch(); (_a = vars.observer) == null ? void 0 : _a.disconnect(); }); ; return (_ctx, _cache) => { return openBlock(), createElementBlock( Fragment, null, [ createCommentVNode(" * \u65F6\u95F4\u8303\u56F4\u9009\u62E9\u5668 "), createElementVNode( "div", mergeProps({ class: "ui-date-range-picker", ref_key: "container", ref: container }, unref(binds).container), [ createCommentVNode(" * \u9009\u62E9\u5668\u4E3B\u4F53 "), createElementVNode("div", { class: "ui-form-control", onClick: _cache[0] || (_cache[0] = //@ts-ignore (...args) => unref(show) && unref(show)(...args)) }, [ createElementVNode( "input", mergeProps({ class: "ui-date-range-context", type: "text", "aria-name": "start" }, unref(binds).start, { readonly: "" }), null, 16 /* FULL_PROPS */ ), _cache[1] || (_cache[1] = createElementVNode( "div", { class: "ui-date-range-rect" }, null, -1 /* HOISTED */ )), createElementVNode( "input", mergeProps({ class: "ui-date-range-context", type: "text", "aria-name": "end" }, unref(binds).end, { readonly: "" }), null, 16 /* FULL_PROPS */ ) ]), createCommentVNode(" * \u5019\u9009\u5217\u8868 "), createVNode( Transition, toHandlers(unref(ons).candidates), { default: withCtx(() => [ unref(visible) ? (openBlock(), createElementBlock( "div", mergeProps({ key: 0, class: "ui-form-candidates", ref_key: "candidates", ref: candidates }, unref(binds).candidates), [ createElementVNode("div", _hoisted_1, [ (openBlock(), createBlock(resolveDynamicComponent(unref(view)), mergeProps({ ref_key: "components", ref: components, confirm: _ctx.confirm }, toHandlers(unref(ons).components)), null, 16, ["confirm"])) ]) ], 16 /* FULL_PROPS */ )) : createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }, 16 /* FULL_PROPS */ ) ], 16 /* FULL_PROPS */ ) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); }; } }); export { _sfc_main as default }; //# sourceMappingURL=index.vue2.mjs.map