You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.2 KiB
41 lines
1.2 KiB
"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.getPicker();
|
|
}
|
|
},
|
|
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; |