UNPKG

various-ui

Version:

This is a test version of the Vue 3 component library

122 lines (117 loc) 4.56 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var vue = require('vue'); var index$1 = require('../icon/index.js'); var component = require('./src/component.js'); var composable = require('./src/composable.js'); require('../../utils/index.js'); var index = require('../../utils/src/node/index.js'); const _hoisted_1 = { class: "ui-form-candidate-container" }; const __default__ = vue.defineComponent({ name: "UiDatePicker" }); var _sfc_main = /* @__PURE__ */ vue.defineComponent({ ...__default__, props: component.UiDatePickerPropsOption, emits: component.UiDatePickerEmits, setup(__props, { expose: __expose, emit: __emit }) { const define = __props; const emits = __emit; const { ons, vars, refs, nodes, binds, methods, analyzes } = composable.useComposable(define, emits); const { visible } = refs; const { components, container, body } = nodes; const { show, clear, update, change } = methods; const { analyzeComponent } = analyzes; vue.onBeforeUnmount(() => { var _a; body.value && index.remove(document.body, body.value); (_a = vars.observer) == null ? void 0 : _a.disconnect(); }); ; __expose({ clear, update, change }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" * \u65F6\u95F4\u9009\u62E9\u5668 "), vue.createElementVNode( "div", vue.mergeProps({ class: "ui-date-picker", ref_key: "container", ref: container }, vue.unref(binds).container), [ vue.createCommentVNode(" * \u9009\u62E9\u5668\u4E3B\u4F53 "), vue.createElementVNode( "input", vue.mergeProps({ class: "ui-form-control", type: "text" }, vue.unref(binds).main, { onClick: _cache[0] || (_cache[0] = //@ts-ignore (...args) => vue.unref(show) && vue.unref(show)(...args)), readonly: "" }), null, 16 /* FULL_PROPS */ ), vue.createCommentVNode(" * \u6E05\u7A7A\u56FE\u6807 "), vue.createVNode(vue.unref(index$1.UiIcon), { class: "ui-date-picker-icons ui-date-picker-clearable", name: "error", onClick: vue.unref(clear) }, null, 8, ["onClick"]), vue.createCommentVNode(" * \u7BAD\u5934\u56FE\u6807 "), vue.createVNode(vue.unref(index$1.UiIcon), { class: "ui-date-picker-icons ui-date-picker-arrow", name: "arrow", onClick: vue.unref(show) }, null, 8, ["onClick"]), vue.createCommentVNode(" * \u5019\u9009\u5217\u8868 "), vue.createVNode( vue.Transition, vue.toHandlers(vue.unref(ons).candidates), { default: vue.withCtx(() => [ vue.unref(visible) ? (vue.openBlock(), vue.createElementBlock( "div", vue.mergeProps({ key: 0, class: "ui-form-candidates", ref_key: "body", ref: body }, vue.unref(binds).body), [ vue.createElementVNode("div", _hoisted_1, [ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(analyzeComponent)), { ref_key: "components", ref: components, onUpdate: vue.unref(update), onChange: vue.unref(change) }, null, 40, ["onUpdate", "onChange"])) ]) ], 16 /* FULL_PROPS */ )) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }, 16 /* FULL_PROPS */ ) ], 16 /* FULL_PROPS */ ) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); }; } }); exports.default = _sfc_main; //# sourceMappingURL=index.vue2.js.map