1234567891011121314151617181920212223242526272829303132333435363738394041 |
- "use strict";
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
- exports.__esModule = true;
- exports.default = void 0;
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
- var _utils = require("../utils");
- var _TimePicker = _interopRequireDefault(require("./TimePicker"));
- var _DatePicker = _interopRequireDefault(require("./DatePicker"));
- var _createNamespace = (0, _utils.createNamespace)('datetime-picker'),
- createComponent = _createNamespace[0],
- bem = _createNamespace[1];
- var _default = createComponent({
- props: (0, _extends2.default)({}, _TimePicker.default.props, _DatePicker.default.props),
- methods: {
- // @exposed-api
- getPicker: function getPicker() {
- return this.$refs.root.getProxiedPicker();
- }
- },
- render: function render() {
- var h = arguments[0];
- var Component = this.type === 'time' ? _TimePicker.default : _DatePicker.default;
- return h(Component, {
- "ref": "root",
- "class": bem(),
- "scopedSlots": this.$scopedSlots,
- "props": (0, _extends2.default)({}, this.$props),
- "on": (0, _extends2.default)({}, this.$listeners)
- });
- }
- });
- exports.default = _default;
|