tdesign-vue
Version:
272 lines (268 loc) • 10.5 kB
JavaScript
/**
* tdesign v1.14.1
* (c) 2025 tdesign
* @license MIT
*/
import { h as helper } from '../../_chunks/dep-6a4dc7bb.js';
import _defineProperty from '@babel/runtime/helpers/defineProperty';
import { defineComponent } from '@vue/composition-api';
import { usePrefixClass } from '../../hooks/useConfig.js';
import TDateHeader from '../base/Header.js';
import TDateTable from '../base/Table.js';
import _TimePickerPanel from '../../time-picker/panel/time-picker-panel.js';
import { getDefaultFormat } from '../../_common/js/date-picker/format.js';
import '../../config-provider/useConfig.js';
import '../../config-provider/context.js';
import 'lodash-es';
import '../../_common/js/global-config/default-config.js';
import '../../_common/js/global-config/locale/zh_CN.js';
import '../../_chunks/dep-ba613a02.js';
import '@babel/runtime/helpers/typeof';
import '../../_chunks/dep-fdb1b253.js';
import 'dayjs';
import '../../_common/js/global-config/t.js';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/toConsumableArray';
import '../../pagination/index.js';
import '../../pagination/pagination.js';
import 'tdesign-icons-vue';
import '../../utils/mixins.js';
import 'vue';
import '../../config-provider/config-receiver.js';
import '../../input-number/index.js';
import '../../input-number/input-number.js';
import '../../button/index.js';
import '../../button/button.js';
import '../../loading/index.js';
import '../../loading/directive.js';
import '../../loading/plugin.js';
import '../../loading/loading.js';
import '../../loading/icon/gradient.js';
import '../../_common/js/loading/circle-adapter.js';
import '../../_common/js/utils/setStyle.js';
import '../../_common/js/utils/helper.js';
import '@babel/runtime/helpers/objectWithoutProperties';
import '../../utils/dom.js';
import 'raf';
import '../../utils/easing.js';
import '../../utils/render-tnode.js';
import '@babel/runtime/helpers/readOnlyError';
import '../../utils/transfer-dom.js';
import '../../loading/props.js';
import '../../config.js';
import '../../utils/withInstall.js';
import '../../button/props.js';
import '../../utils/ripple.js';
import '../../input/index.js';
import '../../input/input.js';
import '../../utils/helper.js';
import '../../utils/event.js';
import '../../input/props.js';
import '../../_common/js/log/log.js';
import '../../input/input-group.js';
import '../../utils/map-props.js';
import '../../input-number/props.js';
import '../../input-number/useInputNumber.js';
import '../../hooks/useCommonClassName.js';
import '../../hooks/useVModel.js';
import '../../_common/js/input-number/number.js';
import '../../_common/js/input-number/large-number.js';
import '../../hooks/useFormDisabled.js';
import '../../hooks/useGlobalIcon.js';
import '../../select/index.js';
import '../../select/select.js';
import '../../hooks/useDefaultValue.js';
import '../../hooks/tnode.js';
import '../../hooks/render-tnode.js';
import '../../select/props.js';
import '../../popup/index.js';
import '../../popup/popup.js';
import '@popperjs/core';
import '../../popup/props.js';
import '../../popup/container.js';
import '../../popup/utils.js';
import '../../popup/plugin.js';
import '../../tag/index.js';
import '../../tag/tag.js';
import 'tinycolor2';
import '../../tag/props.js';
import '../../tag/check-tag.js';
import '../../tag/check-tag-props.js';
import '../../_common/js/common.js';
import '../../tag/check-tag-group.js';
import '../../tag/check-tag-group-props.js';
import '../../select-input/index.js';
import '../../select-input/select-input.js';
import '../../select-input/props.js';
import '../../select-input/useSingle.js';
import '../../select-input/useMultiple.js';
import '../../tag-input/index.js';
import '../../tag-input/tag-input.js';
import '../../tag-input/props.js';
import '../../tag-input/hooks/useTagScroll.js';
import '../../tag-input/useTagList.js';
import '../../tag-input/hooks/useHover.js';
import '../../tag-input/hooks/useDragSorter.js';
import '../../select-input/useOverlayInnerStyle.js';
import '../../common-components/fake-arrow.js';
import '../../select/option.js';
import '../../select/option-props.js';
import '../../checkbox/index.js';
import '../../checkbox/group.js';
import '../../checkbox/checkbox.js';
import '../../checkbox/props.js';
import '../../checkbox/constants.js';
import '../../checkbox/store.js';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import '../../checkbox/hooks/useKeyboardEvent.js';
import '../../hooks/useElementLazyRender.js';
import '../../_common/js/utils/observe.js';
import '../../checkbox/checkbox-group-props.js';
import '../../hooks/slots.js';
import '../../hooks/useLazyLoad.js';
import '../../select/util.js';
import '../../select/select-panel.js';
import '../../select/optionGroup.js';
import '../../select/option-group-props.js';
import '../../hooks/useVirtualScroll.js';
import '../../select/hooks/useSelectOptions.js';
import '../../input-adornment/index.js';
import '../../input-adornment/input-adornment.js';
import '../../input-adornment/props.js';
import '../../pagination/props.js';
import '../../pagination/pagination-mini.js';
import '../../pagination/pagination-mini-props.js';
import '../base/Cell.js';
import '../../_common/js/date-picker/utils.js';
import '@babel/runtime/helpers/objectDestructuringEmpty';
import '@babel/runtime/helpers/extends';
import '../../_chunks/dep-84c94da7.js';
import '../../_chunks/dep-655d809c.js';
import '../../_common/js/time-picker/const.js';
import '../../time-picker/panel/props.js';
import '../../time-picker/props.js';
import '../../time-picker/panel/single-panel.js';
import '../../_common/js/time-picker/utils.js';
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var TPanelContent = defineComponent({
name: "TPanelContent",
props: {
mode: String,
format: String,
enableTimePicker: Boolean,
timePickerProps: {
type: Object,
"default": function _default() {
return {};
}
},
value: [String, Number, Array, Date],
year: Number,
month: Number,
tableData: Array,
time: String,
multiple: Boolean,
popupVisible: Boolean,
firstDayOfWeek: Number,
partial: String,
onYearChange: Function,
onMonthChange: Function,
onJumperClick: Function,
onCellMouseEnter: Function,
onCellClick: Function,
onCellMouseLeave: Function,
onTimePickerChange: Function
},
setup: function setup(props) {
var COMPONENT_NAME = usePrefixClass("date-picker__panel");
var _getDefaultFormat = getDefaultFormat({
mode: props.mode,
format: props.format,
enableTimePicker: props.enableTimePicker
}),
timeFormat = _getDefaultFormat.timeFormat;
return {
COMPONENT_NAME: COMPONENT_NAME,
timeFormat: timeFormat
};
},
render: function render() {
var _this = this;
var h = arguments[0];
var COMPONENT_NAME = this.COMPONENT_NAME,
timeFormat = this.timeFormat;
return h("div", {
"class": "".concat(COMPONENT_NAME, "-content")
}, [h("div", {
"class": "".concat(COMPONENT_NAME, "-").concat(this.mode)
}, [h(TDateHeader, {
"props": _objectSpread({}, {
mode: this.mode,
year: this.year,
month: this.month,
onMonthChange: function onMonthChange(val) {
var _this$onMonthChange;
return (_this$onMonthChange = _this.onMonthChange) === null || _this$onMonthChange === void 0 ? void 0 : _this$onMonthChange.call(_this, val, {
partial: _this.partial
});
},
onYearChange: function onYearChange(val) {
var _this$onYearChange;
return (_this$onYearChange = _this.onYearChange) === null || _this$onYearChange === void 0 ? void 0 : _this$onYearChange.call(_this, val, {
partial: _this.partial
});
},
onJumperClick: function onJumperClick(_ref) {
var _this$onJumperClick;
var trigger = _ref.trigger;
return (_this$onJumperClick = _this.onJumperClick) === null || _this$onJumperClick === void 0 ? void 0 : _this$onJumperClick.call(_this, {
trigger: trigger,
partial: _this.partial
});
}
})
}), h(TDateTable, {
"props": _objectSpread({}, {
mode: this.mode,
data: this.tableData,
time: this.time,
value: this.value,
format: this.format,
multiple: this.multiple,
firstDayOfWeek: this.firstDayOfWeek,
onCellClick: function onCellClick(date, _ref2) {
var _this$onCellClick;
var e = _ref2.e;
return (_this$onCellClick = _this.onCellClick) === null || _this$onCellClick === void 0 ? void 0 : _this$onCellClick.call(_this, date, {
e: e,
partial: _this.partial
});
},
onCellMouseEnter: function onCellMouseEnter(date) {
var _this$onCellMouseEnte;
return (_this$onCellMouseEnte = _this.onCellMouseEnter) === null || _this$onCellMouseEnte === void 0 ? void 0 : _this$onCellMouseEnte.call(_this, date, {
partial: _this.partial
});
},
onCellMouseLeave: this.onCellMouseLeave
})
})]), this.enableTimePicker && h("div", {
"class": "".concat(COMPONENT_NAME, "-time")
}, [h("div", {
"class": "".concat(COMPONENT_NAME, "-time-viewer")
}, [this.time]), h(_TimePickerPanel, helper([{}, {
key: this.partial,
props: _objectSpread({
position: this.partial,
format: timeFormat,
value: this.time,
onChange: this.onTimePickerChange,
isShowPanel: this.popupVisible
}, this.timePickerProps)
}]))])]);
}
});
export { TPanelContent as default };
//# sourceMappingURL=PanelContent.js.map