@dfsj/components 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +203 -0
- package/LICENSE +22 -0
- package/README.md +27 -0
- package/dist/components/Boards/index.d.ts +4 -0
- package/dist/components/Boards/src/Boards.vue.d.ts +33 -0
- package/dist/components/Boards/src/Boards.vue.js +5 -0
- package/dist/components/Boards/src/Boards.vue2.js +113 -0
- package/dist/components/Boards/src/props.d.ts +27 -0
- package/dist/components/Boards/src/props.js +18 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/src/composables/use-month-range-header.d.ts +16 -0
- package/dist/components/DatePicker/src/composables/use-month-range-header.js +52 -0
- package/dist/components/DatePicker/src/composables/use-range-picker.d.ts +100 -0
- package/dist/components/DatePicker/src/composables/use-range-picker.js +99 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.d.ts +19 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.js +5 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue2.js +564 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.d.ts +16 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.js +5 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue2.js +210 -0
- package/dist/components/DatePicker/src/index.d.ts +196 -0
- package/dist/components/DatePicker/src/index.js +87 -0
- package/dist/components/DatePicker/src/panel-utils.d.ts +2 -0
- package/dist/components/DatePicker/src/panel-utils.js +25 -0
- package/dist/components/Editor/index.d.ts +6 -0
- package/dist/components/Editor/src/Editor.vue.d.ts +50 -0
- package/dist/components/Editor/src/Editor.vue.js +5 -0
- package/dist/components/Editor/src/Editor.vue2.js +138 -0
- package/dist/components/Form/index.d.ts +16 -0
- package/dist/components/Form/src/Form.vue.d.ts +164 -0
- package/dist/components/Form/src/Form.vue.js +5 -0
- package/dist/components/Form/src/Form.vue2.js +378 -0
- package/dist/components/Form/src/components/useRenderCheckbox.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderCheckbox.js +33 -0
- package/dist/components/Form/src/components/useRenderRadio.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderRadio.js +33 -0
- package/dist/components/Form/src/components/useRenderSelect.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderSelect.js +52 -0
- package/dist/components/Form/src/helper/componentMap.d.ts +5 -0
- package/dist/components/Form/src/helper/componentMap.js +35 -0
- package/dist/components/Form/src/helper/index.d.ts +7 -0
- package/dist/components/Form/src/helper/index.js +109 -0
- package/dist/components/Form/src/types/index.d.ts +533 -0
- package/dist/components/Form/src/types/index.js +31 -0
- package/dist/components/Form/src/useForm.d.ts +1 -0
- package/dist/components/Form/src/useForm.js +290 -0
- package/dist/components/Highlight/index.d.ts +2 -0
- package/dist/components/Highlight/src/Highlight.vue.d.ts +41 -0
- package/dist/components/Highlight/src/Highlight.vue.js +5 -0
- package/dist/components/Highlight/src/Highlight.vue2.js +62 -0
- package/dist/components/Icon/index.d.ts +3 -0
- package/dist/components/Icon/src/Icon.vue.d.ts +49 -0
- package/dist/components/Icon/src/Icon.vue.js +5 -0
- package/dist/components/Icon/src/Icon.vue2.js +123 -0
- package/dist/components/Icon/src/SvgIcon.vue.d.ts +45 -0
- package/dist/components/Icon/src/SvgIcon.vue.js +7 -0
- package/dist/components/Icon/src/SvgIcon.vue2.js +45 -0
- package/dist/components/Icon/src/SvgIcon.vue3.js +14 -0
- package/dist/components/InputPassword/index.d.ts +2 -0
- package/dist/components/InputPassword/src/InputPassword.vue.d.ts +27 -0
- package/dist/components/InputPassword/src/InputPassword.vue.js +5 -0
- package/dist/components/InputPassword/src/InputPassword.vue2.js +58 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/src/BasicModal.vue.d.ts +280 -0
- package/dist/components/Modal/src/BasicModal.vue.js +5 -0
- package/dist/components/Modal/src/BasicModal.vue2.js +150 -0
- package/dist/components/Modal/src/components/ModalFooter.vue.d.ts +86 -0
- package/dist/components/Modal/src/components/ModalFooter.vue.js +5 -0
- package/dist/components/Modal/src/components/ModalFooter.vue2.js +30 -0
- package/dist/components/Modal/src/components/ModalHeader.vue.d.ts +142 -0
- package/dist/components/Modal/src/components/ModalHeader.vue.js +5 -0
- package/dist/components/Modal/src/components/ModalHeader.vue2.js +63 -0
- package/dist/components/Modal/src/config.d.ts +24 -0
- package/dist/components/Modal/src/config.js +25 -0
- package/dist/components/Modal/src/hooks/useModalDrag.d.ts +24 -0
- package/dist/components/Modal/src/hooks/useModalDrag.js +108 -0
- package/dist/components/Modal/src/hooks/useTimeout.d.ts +15 -0
- package/dist/components/Modal/src/hooks/useTimeout.js +53 -0
- package/dist/components/Modal/src/props.d.ts +131 -0
- package/dist/components/Modal/src/props.js +107 -0
- package/dist/components/Modal/src/utils/index.d.ts +3 -0
- package/dist/components/Modal/src/utils/index.js +86 -0
- package/dist/components/Stateful/index.d.ts +4 -0
- package/dist/components/Stateful/src/State.d.ts +20 -0
- package/dist/components/Stateful/src/State.js +82 -0
- package/dist/components/Stateful/src/Stateful.vue.d.ts +44 -0
- package/dist/components/Stateful/src/Stateful.vue.js +5 -0
- package/dist/components/Stateful/src/Stateful.vue2.js +46 -0
- package/dist/components/Stateful/src/props.d.ts +39 -0
- package/dist/components/Stateful/src/props.js +29 -0
- package/dist/components/Table/index.d.ts +14 -0
- package/dist/components/Table/src/Table.vue.d.ts +537 -0
- package/dist/components/Table/src/Table.vue.js +5 -0
- package/dist/components/Table/src/Table.vue2.js +582 -0
- package/dist/components/Table/src/components/ColumnSetting.vue.d.ts +30 -0
- package/dist/components/Table/src/components/ColumnSetting.vue.js +5 -0
- package/dist/components/Table/src/components/ColumnSetting.vue2.js +264 -0
- package/dist/components/Table/src/components/TableActions.vue.d.ts +20 -0
- package/dist/components/Table/src/components/TableActions.vue.js +5 -0
- package/dist/components/Table/src/components/TableActions.vue2.js +108 -0
- package/dist/components/Table/src/helper/index.d.ts +2 -0
- package/dist/components/Table/src/helper/index.js +11 -0
- package/dist/components/Table/src/types/index.d.ts +87 -0
- package/dist/components/Table/src/useTable.d.ts +1 -0
- package/dist/components/Table/src/useTable.js +284 -0
- package/dist/components/UnifyChart/index.d.ts +4 -0
- package/dist/components/UnifyChart/src/ChartToolbox.vue.d.ts +63 -0
- package/dist/components/UnifyChart/src/ChartToolbox.vue.js +5 -0
- package/dist/components/UnifyChart/src/ChartToolbox.vue2.js +83 -0
- package/dist/components/UnifyChart/src/UnifyChart.vue.d.ts +185 -0
- package/dist/components/UnifyChart/src/UnifyChart.vue.js +5 -0
- package/dist/components/UnifyChart/src/UnifyChart.vue2.js +54 -0
- package/dist/components/UnifyChart/src/hooks/useLoader.d.ts +11 -0
- package/dist/components/UnifyChart/src/hooks/useRender.d.ts +24 -0
- package/dist/components/UnifyChart/src/hooks/useRender.js +49 -0
- package/dist/components/UnifyChart/src/props.d.ts +145 -0
- package/dist/components/UnifyChart/src/props.js +33 -0
- package/dist/components/Video/index.d.ts +2 -0
- package/dist/components/Video/src/VideoPlayer.vue.d.ts +60 -0
- package/dist/components/Video/src/VideoPlayer.vue.js +5 -0
- package/dist/components/Video/src/VideoPlayer.vue2.js +107 -0
- package/dist/components/Video/src/VideoPlayerToolbar.vue.d.ts +34 -0
- package/dist/components/Video/src/VideoPlayerToolbar.vue.js +5 -0
- package/dist/components/Video/src/VideoPlayerToolbar.vue2.js +65 -0
- package/dist/components/Video/src/abstract/AbstractVideoControl.d.ts +7 -0
- package/dist/components/Video/src/abstract/Observable.d.ts +6 -0
- package/dist/components/Video/src/abstract/Observable.js +89 -0
- package/dist/components/Video/src/abstract/VideoControl.d.ts +32 -0
- package/dist/components/Video/src/abstract/VideoControl.js +50 -0
- package/dist/components/Video/src/control/DaHua.d.ts +12 -0
- package/dist/components/Video/src/control/DaHua.js +156 -0
- package/dist/components/Video/src/control/Hikvision.d.ts +28 -0
- package/dist/components/Video/src/control/Hikvision.js +251 -0
- package/dist/components/Video/src/control/VideoFactory.d.ts +3 -0
- package/dist/components/Video/src/control/VideoFactory.js +32 -0
- package/dist/components/Video/src/enums/CommonEnum.d.ts +26 -0
- package/dist/components/Video/src/enums/CommonEnum.js +31 -0
- package/dist/components/Windows/index.d.ts +4 -0
- package/dist/components/Windows/src/ModalWrap.vue.d.ts +14 -0
- package/dist/components/Windows/src/ModalWrap.vue.js +5 -0
- package/dist/components/Windows/src/ModalWrap.vue2.js +90 -0
- package/dist/components/Windows/src/Windows.vue.d.ts +18 -0
- package/dist/components/Windows/src/Windows.vue.js +7 -0
- package/dist/components/Windows/src/Windows.vue2.js +51 -0
- package/dist/components/Windows/src/Windows.vue3.js +22 -0
- package/dist/components/Windows/src/props.d.ts +20 -0
- package/dist/components/Windows/src/props.js +9 -0
- package/dist/directives/clickOutside.d.ts +3 -0
- package/dist/directives/index.d.ts +2 -0
- package/dist/directives/repeatClick.d.ts +3 -0
- package/dist/helper/lang.d.ts +1 -0
- package/dist/helper/lang.js +546 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +36 -0
- package/dist/index.min.css +6 -0
- package/dist/node_modules/.pnpm/@vueuse_core@10.7.2_vue@3.4.21/node_modules/@vueuse/core/index.js +268 -0
- package/dist/node_modules/.pnpm/@vueuse_shared@10.7.2_vue@3.4.21/node_modules/@vueuse/shared/index.js +34 -0
- package/dist/themes/index.d.ts +1 -0
- package/dist/themes/index.js +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.js +24 -0
- package/dist/utils/is.d.ts +25 -0
- package/dist/utils/is.js +36 -0
- package/dist/utils/propTypes.d.ts +10 -0
- package/dist/utils/propTypes.js +35 -0
- package/dist/utils/tsxHelper.d.ts +5 -0
- package/dist/utils/tsxHelper.js +18 -0
- package/package.json +64 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
2
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
|
+
import { defineComponent, inject, ref, computed, toRef, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, Fragment, renderList, toDisplayString, createCommentVNode, createVNode, withCtx, createTextVNode } from 'vue';
|
|
4
|
+
import dayjs from 'dayjs';
|
|
5
|
+
import { useLocale } from 'element-plus';
|
|
6
|
+
import { DArrowLeft, DArrowRight } from '@element-plus/icons-vue';
|
|
7
|
+
import { panelMonthRangeEmits } from 'element-plus/es/components/date-picker/src/props/panel-month-range';
|
|
8
|
+
import MonthTable from 'element-plus/es/components/date-picker/src/date-picker-com/basic-month-table.mjs';
|
|
9
|
+
import { useMonthRangeHeader } from '../composables/use-month-range-header.js';
|
|
10
|
+
import { useRangePicker } from '../composables/use-range-picker.js';
|
|
11
|
+
import { definePropType } from 'element-plus/es/utils/index.mjs';
|
|
12
|
+
import { cloneDeep } from 'lodash-es';
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
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; }
|
|
16
|
+
var _hoisted_1 = ["onClick"];
|
|
17
|
+
var _hoisted_2 = ["disabled"];
|
|
18
|
+
var _hoisted_3 = ["disabled"];
|
|
19
|
+
var _hoisted_4 = {
|
|
20
|
+
"class": "flex justify-end my-2 mr-5"
|
|
21
|
+
};
|
|
22
|
+
var unit = 'year';
|
|
23
|
+
var script = defineComponent(_objectSpread(_objectSpread({}, {
|
|
24
|
+
name: 'DatePickerMonthRange'
|
|
25
|
+
}), {}, {
|
|
26
|
+
__name: 'panel-month-range',
|
|
27
|
+
props: {
|
|
28
|
+
unlinkPanels: Boolean,
|
|
29
|
+
visible: Boolean,
|
|
30
|
+
parsedValue: definePropType(Array)
|
|
31
|
+
},
|
|
32
|
+
emits: [].concat(_toConsumableArray(panelMonthRangeEmits), ["hide"]),
|
|
33
|
+
setup: function setup(__props, _ref) {
|
|
34
|
+
var _props$parsedValue, _props$parsedValue2;
|
|
35
|
+
var __emit = _ref.emit;
|
|
36
|
+
var props = __props;
|
|
37
|
+
var emit = __emit;
|
|
38
|
+
var _useLocale = useLocale(),
|
|
39
|
+
lang = _useLocale.lang;
|
|
40
|
+
var pickerBase = inject('EP_PICKER_BASE');
|
|
41
|
+
var _pickerBase$props = pickerBase.props,
|
|
42
|
+
shortcuts = _pickerBase$props.shortcuts,
|
|
43
|
+
disabledDate = _pickerBase$props.disabledDate,
|
|
44
|
+
format = _pickerBase$props.format;
|
|
45
|
+
var leftDate = ref(((_props$parsedValue = props.parsedValue) === null || _props$parsedValue === void 0 ? void 0 : _props$parsedValue[0]) || dayjs().locale(lang.value));
|
|
46
|
+
var rightDate = ref(((_props$parsedValue2 = props.parsedValue) === null || _props$parsedValue2 === void 0 ? void 0 : _props$parsedValue2[1]) || dayjs().locale(lang.value).add(1, unit));
|
|
47
|
+
var parsedValue = ref([cloneDeep(leftDate.value), cloneDeep(rightDate.value)]);
|
|
48
|
+
var _useRangePicker = useRangePicker(props, {
|
|
49
|
+
leftDate: leftDate,
|
|
50
|
+
rightDate: rightDate,
|
|
51
|
+
unit: unit,
|
|
52
|
+
parsedValue: parsedValue,
|
|
53
|
+
disabledDate: disabledDate
|
|
54
|
+
}),
|
|
55
|
+
ppNs = _useRangePicker.ppNs,
|
|
56
|
+
drpNs = _useRangePicker.drpNs,
|
|
57
|
+
handleRangeConfirm = _useRangePicker.handleRangeConfirm,
|
|
58
|
+
leftDisableDate = _useRangePicker.leftDisableDate,
|
|
59
|
+
rightDisableDate = _useRangePicker.rightDisableDate,
|
|
60
|
+
t = _useRangePicker.t,
|
|
61
|
+
handleShortcutClick = _useRangePicker.handleShortcutClick;
|
|
62
|
+
var hasShortcuts = computed(function () {
|
|
63
|
+
return !!shortcuts.length;
|
|
64
|
+
});
|
|
65
|
+
var _useMonthRangeHeader = useMonthRangeHeader({
|
|
66
|
+
unlinkPanels: toRef(props, 'unlinkPanels'),
|
|
67
|
+
leftDate: leftDate,
|
|
68
|
+
rightDate: rightDate
|
|
69
|
+
}),
|
|
70
|
+
leftPrevYear = _useMonthRangeHeader.leftPrevYear,
|
|
71
|
+
rightNextYear = _useMonthRangeHeader.rightNextYear,
|
|
72
|
+
leftNextYear = _useMonthRangeHeader.leftNextYear,
|
|
73
|
+
rightPrevYear = _useMonthRangeHeader.rightPrevYear,
|
|
74
|
+
leftLabel = _useMonthRangeHeader.leftLabel,
|
|
75
|
+
rightLabel = _useMonthRangeHeader.rightLabel,
|
|
76
|
+
leftYear = _useMonthRangeHeader.leftYear,
|
|
77
|
+
rightYear = _useMonthRangeHeader.rightYear;
|
|
78
|
+
var enableYearArrow = computed(function () {
|
|
79
|
+
return props.unlinkPanels && rightYear.value > leftYear.value;
|
|
80
|
+
});
|
|
81
|
+
var handleRangePick = function handleRangePick(month, type) {
|
|
82
|
+
if (type == 1) {
|
|
83
|
+
leftDate.value = leftDate.value.startOf('month').month(month);
|
|
84
|
+
parsedValue.value[0] = cloneDeep(leftDate.value);
|
|
85
|
+
} else {
|
|
86
|
+
rightDate.value = rightDate.value.startOf("month").month(month);
|
|
87
|
+
parsedValue.value[1] = cloneDeep(rightDate.value);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
var formatToString = function formatToString(days) {
|
|
91
|
+
return days.map(function (day) {
|
|
92
|
+
return day.format(format);
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
emit('set-picker-option', ['formatToString', formatToString]);
|
|
96
|
+
return function (_ctx, _cache) {
|
|
97
|
+
var _component_el_icon = resolveComponent("el-icon");
|
|
98
|
+
var _component_el_button = resolveComponent("el-button");
|
|
99
|
+
return openBlock(), createElementBlock("div", {
|
|
100
|
+
"class": normalizeClass([unref(ppNs).b(), unref(drpNs).b(), {
|
|
101
|
+
'has-sidebar': Boolean(_ctx.$slots.sidebar) || hasShortcuts.value,
|
|
102
|
+
'custom-month-range': true
|
|
103
|
+
}])
|
|
104
|
+
}, [createElementVNode("div", {
|
|
105
|
+
"class": normalizeClass(unref(ppNs).e('body-wrapper'))
|
|
106
|
+
}, [renderSlot(_ctx.$slots, "sidebar", {
|
|
107
|
+
"class": normalizeClass(unref(ppNs).e('sidebar'))
|
|
108
|
+
}), hasShortcuts.value ? (openBlock(), createElementBlock("div", {
|
|
109
|
+
key: 0,
|
|
110
|
+
"class": normalizeClass(unref(ppNs).e('sidebar'))
|
|
111
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(shortcuts), function (shortcut, key) {
|
|
112
|
+
return openBlock(), createElementBlock("button", {
|
|
113
|
+
key: key,
|
|
114
|
+
type: "button",
|
|
115
|
+
"class": normalizeClass(unref(ppNs).e('shortcut')),
|
|
116
|
+
onClick: function onClick($event) {
|
|
117
|
+
return unref(handleShortcutClick)(shortcut);
|
|
118
|
+
}
|
|
119
|
+
}, toDisplayString(shortcut.text), 11, _hoisted_1);
|
|
120
|
+
}), 128))], 2)) : createCommentVNode("v-if", true), createElementVNode("div", {
|
|
121
|
+
"class": normalizeClass(unref(ppNs).e('body'))
|
|
122
|
+
}, [createElementVNode("div", {
|
|
123
|
+
"class": normalizeClass([[unref(ppNs).e('content'), unref(drpNs).e('content')], "is-left"])
|
|
124
|
+
}, [createElementVNode("div", {
|
|
125
|
+
"class": normalizeClass(unref(drpNs).e('header'))
|
|
126
|
+
}, [createElementVNode("button", {
|
|
127
|
+
type: "button",
|
|
128
|
+
"class": normalizeClass([unref(ppNs).e('icon-btn'), "d-arrow-left"]),
|
|
129
|
+
onClick: _cache[0] || (_cache[0] = function () {
|
|
130
|
+
return unref(leftPrevYear) && unref(leftPrevYear).apply(void 0, arguments);
|
|
131
|
+
})
|
|
132
|
+
}, [createVNode(_component_el_icon, null, {
|
|
133
|
+
"default": withCtx(function () {
|
|
134
|
+
return [createVNode(unref(DArrowLeft))];
|
|
135
|
+
}),
|
|
136
|
+
_: 1
|
|
137
|
+
})], 2), __props.unlinkPanels ? (openBlock(), createElementBlock("button", {
|
|
138
|
+
key: 0,
|
|
139
|
+
type: "button",
|
|
140
|
+
disabled: !enableYearArrow.value,
|
|
141
|
+
"class": normalizeClass([[unref(ppNs).e('icon-btn'), _defineProperty({}, unref(ppNs).is('disabled'), !enableYearArrow.value)], "d-arrow-right"]),
|
|
142
|
+
onClick: _cache[1] || (_cache[1] = function () {
|
|
143
|
+
return unref(leftNextYear) && unref(leftNextYear).apply(void 0, arguments);
|
|
144
|
+
})
|
|
145
|
+
}, [createVNode(_component_el_icon, null, {
|
|
146
|
+
"default": withCtx(function () {
|
|
147
|
+
return [createVNode(unref(DArrowRight))];
|
|
148
|
+
}),
|
|
149
|
+
_: 1
|
|
150
|
+
})], 10, _hoisted_2)) : createCommentVNode("v-if", true), createElementVNode("div", null, toDisplayString(unref(leftLabel)), 1)], 2), createVNode(unref(MonthTable), {
|
|
151
|
+
date: leftDate.value,
|
|
152
|
+
"disabled-date": unref(leftDisableDate),
|
|
153
|
+
"parsed-value": parsedValue.value[0],
|
|
154
|
+
onPick: _cache[2] || (_cache[2] = function ($event) {
|
|
155
|
+
return handleRangePick($event, 1);
|
|
156
|
+
})
|
|
157
|
+
}, null, 8, ["date", "disabled-date", "parsed-value"])], 2), createElementVNode("div", {
|
|
158
|
+
"class": normalizeClass([[unref(ppNs).e('content'), unref(drpNs).e('content')], "is-right"])
|
|
159
|
+
}, [createElementVNode("div", {
|
|
160
|
+
"class": normalizeClass(unref(drpNs).e('header'))
|
|
161
|
+
}, [__props.unlinkPanels ? (openBlock(), createElementBlock("button", {
|
|
162
|
+
key: 0,
|
|
163
|
+
type: "button",
|
|
164
|
+
disabled: !enableYearArrow.value,
|
|
165
|
+
"class": normalizeClass([[unref(ppNs).e('icon-btn'), {
|
|
166
|
+
'is-disabled': !enableYearArrow.value
|
|
167
|
+
}], "d-arrow-left"]),
|
|
168
|
+
onClick: _cache[3] || (_cache[3] = function () {
|
|
169
|
+
return unref(rightPrevYear) && unref(rightPrevYear).apply(void 0, arguments);
|
|
170
|
+
})
|
|
171
|
+
}, [createVNode(_component_el_icon, null, {
|
|
172
|
+
"default": withCtx(function () {
|
|
173
|
+
return [createVNode(unref(DArrowLeft))];
|
|
174
|
+
}),
|
|
175
|
+
_: 1
|
|
176
|
+
})], 10, _hoisted_3)) : createCommentVNode("v-if", true), createElementVNode("button", {
|
|
177
|
+
type: "button",
|
|
178
|
+
"class": normalizeClass([unref(ppNs).e('icon-btn'), "d-arrow-right"]),
|
|
179
|
+
onClick: _cache[4] || (_cache[4] = function () {
|
|
180
|
+
return unref(rightNextYear) && unref(rightNextYear).apply(void 0, arguments);
|
|
181
|
+
})
|
|
182
|
+
}, [createVNode(_component_el_icon, null, {
|
|
183
|
+
"default": withCtx(function () {
|
|
184
|
+
return [createVNode(unref(DArrowRight))];
|
|
185
|
+
}),
|
|
186
|
+
_: 1
|
|
187
|
+
})], 2), createElementVNode("div", null, toDisplayString(unref(rightLabel)), 1)], 2), createVNode(unref(MonthTable), {
|
|
188
|
+
date: rightDate.value,
|
|
189
|
+
"disabled-date": unref(rightDisableDate),
|
|
190
|
+
"parsed-value": parsedValue.value[1],
|
|
191
|
+
onPick: _cache[5] || (_cache[5] = function ($event) {
|
|
192
|
+
return handleRangePick($event, 2);
|
|
193
|
+
})
|
|
194
|
+
}, null, 8, ["date", "disabled-date", "parsed-value"])], 2)], 2)], 2), createElementVNode("div", _hoisted_4, [createCommentVNode(" <el-button @click=\"closePanel\" size=\"small\">{{ t('el.datepicker.clear') }}</el-button>"), createVNode(_component_el_button, {
|
|
195
|
+
type: "primary",
|
|
196
|
+
onClick: _cache[6] || (_cache[6] = function ($event) {
|
|
197
|
+
return unref(handleRangeConfirm)();
|
|
198
|
+
}),
|
|
199
|
+
size: "small"
|
|
200
|
+
}, {
|
|
201
|
+
"default": withCtx(function () {
|
|
202
|
+
return [createTextVNode(toDisplayString(unref(t)('el.datepicker.confirm')), 1)];
|
|
203
|
+
}),
|
|
204
|
+
_: 1
|
|
205
|
+
})])], 2);
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
}));
|
|
209
|
+
|
|
210
|
+
export { script as default };
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => "date" | "year" | "years" | "month" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange") | (() => import("element-plus/es/components/date-picker/src/date-picker.type").IDatePickerType) | ((new (...args: any[]) => "date" | "year" | "years" | "month" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange") | (() => import("element-plus/es/components/date-picker/src/date-picker.type").IDatePickerType))[], unknown, unknown, "date", boolean>;
|
|
3
|
+
readonly disabledDate: {
|
|
4
|
+
readonly type: import("vue").PropType<Function>;
|
|
5
|
+
readonly required: false;
|
|
6
|
+
readonly validator: (val: unknown) => boolean;
|
|
7
|
+
__epPropKey: true;
|
|
8
|
+
};
|
|
9
|
+
readonly cellClassName: {
|
|
10
|
+
readonly type: import("vue").PropType<Function>;
|
|
11
|
+
readonly required: false;
|
|
12
|
+
readonly validator: (val: unknown) => boolean;
|
|
13
|
+
__epPropKey: true;
|
|
14
|
+
};
|
|
15
|
+
readonly shortcuts: import("element-plus/es/utils").EpPropFinalized<ArrayConstructor, unknown, unknown, () => never[], boolean>;
|
|
16
|
+
readonly arrowControl: BooleanConstructor;
|
|
17
|
+
readonly label: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
18
|
+
readonly tabindex: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown, 0, boolean>;
|
|
19
|
+
readonly validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
20
|
+
readonly unlinkPanels: BooleanConstructor;
|
|
21
|
+
readonly disabledHours: {
|
|
22
|
+
readonly type: import("vue").PropType<import("element-plus/es/components/time-picker/src/props/shared").GetDisabledHours>;
|
|
23
|
+
readonly required: false;
|
|
24
|
+
readonly validator: (val: unknown) => boolean;
|
|
25
|
+
__epPropKey: true;
|
|
26
|
+
};
|
|
27
|
+
readonly disabledMinutes: {
|
|
28
|
+
readonly type: import("vue").PropType<import("element-plus/es/components/time-picker/src/props/shared").GetDisabledMinutes>;
|
|
29
|
+
readonly required: false;
|
|
30
|
+
readonly validator: (val: unknown) => boolean;
|
|
31
|
+
__epPropKey: true;
|
|
32
|
+
};
|
|
33
|
+
readonly disabledSeconds: {
|
|
34
|
+
readonly type: import("vue").PropType<import("element-plus/es/components/time-picker/src/props/shared").GetDisabledSeconds>;
|
|
35
|
+
readonly required: false;
|
|
36
|
+
readonly validator: (val: unknown) => boolean;
|
|
37
|
+
__epPropKey: true;
|
|
38
|
+
};
|
|
39
|
+
readonly id: {
|
|
40
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() => import("element-plus").SingleOrRange<string>) | ((new (...args: any[]) => string | [string, string]) | (() => import("element-plus").SingleOrRange<string>))[], unknown, unknown>>;
|
|
41
|
+
readonly required: false;
|
|
42
|
+
readonly validator: (val: unknown) => boolean;
|
|
43
|
+
__epPropKey: true;
|
|
44
|
+
};
|
|
45
|
+
readonly name: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | [string, string]) | (() => import("element-plus").SingleOrRange<string>) | ((new (...args: any[]) => string | [string, string]) | (() => import("element-plus").SingleOrRange<string>))[], unknown, unknown, "", boolean>;
|
|
46
|
+
readonly popperClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
47
|
+
readonly format: StringConstructor;
|
|
48
|
+
readonly valueFormat: StringConstructor;
|
|
49
|
+
readonly dateFormat: StringConstructor;
|
|
50
|
+
readonly timeFormat: StringConstructor;
|
|
51
|
+
readonly clearable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
52
|
+
readonly clearIcon: {
|
|
53
|
+
readonly type: import("vue").PropType<unknown>;
|
|
54
|
+
readonly required: false;
|
|
55
|
+
readonly validator: (val: unknown) => boolean;
|
|
56
|
+
__epPropKey: true;
|
|
57
|
+
};
|
|
58
|
+
readonly editable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
59
|
+
readonly prefixIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown, "", boolean>;
|
|
60
|
+
readonly size: {
|
|
61
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
62
|
+
readonly required: false;
|
|
63
|
+
readonly validator: (val: unknown) => boolean;
|
|
64
|
+
__epPropKey: true;
|
|
65
|
+
};
|
|
66
|
+
readonly readonly: BooleanConstructor;
|
|
67
|
+
readonly disabled: BooleanConstructor;
|
|
68
|
+
readonly placeholder: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
69
|
+
readonly popperOptions: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>) | ((new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>))[], unknown, unknown, () => {}, boolean>;
|
|
70
|
+
readonly modelValue: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | number | Date | [import("element-plus").DateModelType, import("element-plus").DateModelType]) | (() => import("element-plus").ModelValueType) | ((new (...args: any[]) => string | number | Date | [import("element-plus").DateModelType, import("element-plus").DateModelType]) | (() => import("element-plus").ModelValueType))[], unknown, unknown, "", boolean>;
|
|
71
|
+
readonly rangeSeparator: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "-", boolean>;
|
|
72
|
+
readonly startPlaceholder: StringConstructor;
|
|
73
|
+
readonly endPlaceholder: StringConstructor;
|
|
74
|
+
readonly defaultValue: {
|
|
75
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>))[], unknown, unknown>>;
|
|
76
|
+
readonly required: false;
|
|
77
|
+
readonly validator: (val: unknown) => boolean;
|
|
78
|
+
__epPropKey: true;
|
|
79
|
+
};
|
|
80
|
+
readonly defaultTime: {
|
|
81
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>))[], unknown, unknown>>;
|
|
82
|
+
readonly required: false;
|
|
83
|
+
readonly validator: (val: unknown) => boolean;
|
|
84
|
+
__epPropKey: true;
|
|
85
|
+
};
|
|
86
|
+
readonly isRange: BooleanConstructor;
|
|
87
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
88
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => "date" | "year" | "years" | "month" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange") | (() => import("element-plus/es/components/date-picker/src/date-picker.type").IDatePickerType) | ((new (...args: any[]) => "date" | "year" | "years" | "month" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange") | (() => import("element-plus/es/components/date-picker/src/date-picker.type").IDatePickerType))[], unknown, unknown, "date", boolean>;
|
|
89
|
+
readonly disabledDate: {
|
|
90
|
+
readonly type: import("vue").PropType<Function>;
|
|
91
|
+
readonly required: false;
|
|
92
|
+
readonly validator: (val: unknown) => boolean;
|
|
93
|
+
__epPropKey: true;
|
|
94
|
+
};
|
|
95
|
+
readonly cellClassName: {
|
|
96
|
+
readonly type: import("vue").PropType<Function>;
|
|
97
|
+
readonly required: false;
|
|
98
|
+
readonly validator: (val: unknown) => boolean;
|
|
99
|
+
__epPropKey: true;
|
|
100
|
+
};
|
|
101
|
+
readonly shortcuts: import("element-plus/es/utils").EpPropFinalized<ArrayConstructor, unknown, unknown, () => never[], boolean>;
|
|
102
|
+
readonly arrowControl: BooleanConstructor;
|
|
103
|
+
readonly label: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
104
|
+
readonly tabindex: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown, 0, boolean>;
|
|
105
|
+
readonly validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
106
|
+
readonly unlinkPanels: BooleanConstructor;
|
|
107
|
+
readonly disabledHours: {
|
|
108
|
+
readonly type: import("vue").PropType<import("element-plus/es/components/time-picker/src/props/shared").GetDisabledHours>;
|
|
109
|
+
readonly required: false;
|
|
110
|
+
readonly validator: (val: unknown) => boolean;
|
|
111
|
+
__epPropKey: true;
|
|
112
|
+
};
|
|
113
|
+
readonly disabledMinutes: {
|
|
114
|
+
readonly type: import("vue").PropType<import("element-plus/es/components/time-picker/src/props/shared").GetDisabledMinutes>;
|
|
115
|
+
readonly required: false;
|
|
116
|
+
readonly validator: (val: unknown) => boolean;
|
|
117
|
+
__epPropKey: true;
|
|
118
|
+
};
|
|
119
|
+
readonly disabledSeconds: {
|
|
120
|
+
readonly type: import("vue").PropType<import("element-plus/es/components/time-picker/src/props/shared").GetDisabledSeconds>;
|
|
121
|
+
readonly required: false;
|
|
122
|
+
readonly validator: (val: unknown) => boolean;
|
|
123
|
+
__epPropKey: true;
|
|
124
|
+
};
|
|
125
|
+
readonly id: {
|
|
126
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() => import("element-plus").SingleOrRange<string>) | ((new (...args: any[]) => string | [string, string]) | (() => import("element-plus").SingleOrRange<string>))[], unknown, unknown>>;
|
|
127
|
+
readonly required: false;
|
|
128
|
+
readonly validator: (val: unknown) => boolean;
|
|
129
|
+
__epPropKey: true;
|
|
130
|
+
};
|
|
131
|
+
readonly name: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | [string, string]) | (() => import("element-plus").SingleOrRange<string>) | ((new (...args: any[]) => string | [string, string]) | (() => import("element-plus").SingleOrRange<string>))[], unknown, unknown, "", boolean>;
|
|
132
|
+
readonly popperClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
133
|
+
readonly format: StringConstructor;
|
|
134
|
+
readonly valueFormat: StringConstructor;
|
|
135
|
+
readonly dateFormat: StringConstructor;
|
|
136
|
+
readonly timeFormat: StringConstructor;
|
|
137
|
+
readonly clearable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
138
|
+
readonly clearIcon: {
|
|
139
|
+
readonly type: import("vue").PropType<unknown>;
|
|
140
|
+
readonly required: false;
|
|
141
|
+
readonly validator: (val: unknown) => boolean;
|
|
142
|
+
__epPropKey: true;
|
|
143
|
+
};
|
|
144
|
+
readonly editable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
145
|
+
readonly prefixIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown, "", boolean>;
|
|
146
|
+
readonly size: {
|
|
147
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
148
|
+
readonly required: false;
|
|
149
|
+
readonly validator: (val: unknown) => boolean;
|
|
150
|
+
__epPropKey: true;
|
|
151
|
+
};
|
|
152
|
+
readonly readonly: BooleanConstructor;
|
|
153
|
+
readonly disabled: BooleanConstructor;
|
|
154
|
+
readonly placeholder: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
155
|
+
readonly popperOptions: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>) | ((new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>))[], unknown, unknown, () => {}, boolean>;
|
|
156
|
+
readonly modelValue: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | number | Date | [import("element-plus").DateModelType, import("element-plus").DateModelType]) | (() => import("element-plus").ModelValueType) | ((new (...args: any[]) => string | number | Date | [import("element-plus").DateModelType, import("element-plus").DateModelType]) | (() => import("element-plus").ModelValueType))[], unknown, unknown, "", boolean>;
|
|
157
|
+
readonly rangeSeparator: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "-", boolean>;
|
|
158
|
+
readonly startPlaceholder: StringConstructor;
|
|
159
|
+
readonly endPlaceholder: StringConstructor;
|
|
160
|
+
readonly defaultValue: {
|
|
161
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>))[], unknown, unknown>>;
|
|
162
|
+
readonly required: false;
|
|
163
|
+
readonly validator: (val: unknown) => boolean;
|
|
164
|
+
__epPropKey: true;
|
|
165
|
+
};
|
|
166
|
+
readonly defaultTime: {
|
|
167
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>))[], unknown, unknown>>;
|
|
168
|
+
readonly required: false;
|
|
169
|
+
readonly validator: (val: unknown) => boolean;
|
|
170
|
+
__epPropKey: true;
|
|
171
|
+
};
|
|
172
|
+
readonly isRange: BooleanConstructor;
|
|
173
|
+
}>> & {
|
|
174
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
175
|
+
}, {
|
|
176
|
+
readonly name: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() => import("element-plus").SingleOrRange<string>) | ((new (...args: any[]) => string | [string, string]) | (() => import("element-plus").SingleOrRange<string>))[], unknown, unknown>;
|
|
177
|
+
readonly type: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "date" | "year" | "years" | "month" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange") | (() => import("element-plus/es/components/date-picker/src/date-picker.type").IDatePickerType) | ((new (...args: any[]) => "date" | "year" | "years" | "month" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange") | (() => import("element-plus/es/components/date-picker/src/date-picker.type").IDatePickerType))[], unknown, unknown>;
|
|
178
|
+
readonly shortcuts: unknown[];
|
|
179
|
+
readonly arrowControl: boolean;
|
|
180
|
+
readonly label: string;
|
|
181
|
+
readonly tabindex: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>;
|
|
182
|
+
readonly validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
183
|
+
readonly unlinkPanels: boolean;
|
|
184
|
+
readonly popperClass: string;
|
|
185
|
+
readonly clearable: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
186
|
+
readonly editable: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
187
|
+
readonly prefixIcon: "";
|
|
188
|
+
readonly readonly: boolean;
|
|
189
|
+
readonly disabled: boolean;
|
|
190
|
+
readonly placeholder: string;
|
|
191
|
+
readonly popperOptions: {};
|
|
192
|
+
readonly modelValue: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | Date | [import("element-plus").DateModelType, import("element-plus").DateModelType]) | (() => import("element-plus").ModelValueType) | ((new (...args: any[]) => string | number | Date | [import("element-plus").DateModelType, import("element-plus").DateModelType]) | (() => import("element-plus").ModelValueType))[], unknown, unknown>;
|
|
193
|
+
readonly rangeSeparator: string;
|
|
194
|
+
readonly isRange: boolean;
|
|
195
|
+
}, {}>;
|
|
196
|
+
export default _default;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { defineComponent, provide, reactive, toRef, ref, createVNode, mergeProps } from 'vue';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import customParseFormat from 'dayjs/plugin/customParseFormat.js';
|
|
4
|
+
import advancedFormat from 'dayjs/plugin/advancedFormat.js';
|
|
5
|
+
import localeData from 'dayjs/plugin/localeData.js';
|
|
6
|
+
import weekOfYear from 'dayjs/plugin/weekOfYear.js';
|
|
7
|
+
import weekYear from 'dayjs/plugin/weekYear.js';
|
|
8
|
+
import dayOfYear from 'dayjs/plugin/dayOfYear.js';
|
|
9
|
+
import isSameOrAfter from 'dayjs/plugin/isSameOrAfter.js';
|
|
10
|
+
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js';
|
|
11
|
+
import { useNamespace } from 'element-plus/es/hooks/index.mjs';
|
|
12
|
+
import { DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_DATE, CommonPicker } from 'element-plus/es/components/time-picker/index';
|
|
13
|
+
import { ROOT_PICKER_INJECTION_KEY } from 'element-plus/es/components/date-picker/src/constants';
|
|
14
|
+
import { datePickerProps } from 'element-plus/es/components/date-picker/src/props/date-picker';
|
|
15
|
+
import { getPanel } from './panel-utils.js';
|
|
16
|
+
import { ElConfigProvider } from 'element-plus';
|
|
17
|
+
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
|
18
|
+
|
|
19
|
+
dayjs.extend(localeData);
|
|
20
|
+
dayjs.extend(advancedFormat);
|
|
21
|
+
dayjs.extend(customParseFormat);
|
|
22
|
+
dayjs.extend(weekOfYear);
|
|
23
|
+
dayjs.extend(weekYear);
|
|
24
|
+
dayjs.extend(dayOfYear);
|
|
25
|
+
dayjs.extend(isSameOrAfter);
|
|
26
|
+
dayjs.extend(isSameOrBefore);
|
|
27
|
+
var CustomDatePicker = defineComponent({
|
|
28
|
+
name: 'ElDatePicker',
|
|
29
|
+
install: null,
|
|
30
|
+
props: datePickerProps,
|
|
31
|
+
emits: ['update:modelValue'],
|
|
32
|
+
setup: function setup(props, _ref) {
|
|
33
|
+
var expose = _ref.expose,
|
|
34
|
+
emit = _ref.emit,
|
|
35
|
+
slots = _ref.slots;
|
|
36
|
+
var ns = useNamespace('picker-panel');
|
|
37
|
+
provide('ElPopperOptions', reactive(toRef(props, 'popperOptions')));
|
|
38
|
+
provide(ROOT_PICKER_INJECTION_KEY, {
|
|
39
|
+
slots: slots,
|
|
40
|
+
pickerNs: ns
|
|
41
|
+
});
|
|
42
|
+
var commonPicker = ref();
|
|
43
|
+
var refProps = {
|
|
44
|
+
focus: function focus() {
|
|
45
|
+
var _commonPicker$value;
|
|
46
|
+
var focusStartInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
47
|
+
(_commonPicker$value = commonPicker.value) === null || _commonPicker$value === void 0 || _commonPicker$value.focus(focusStartInput);
|
|
48
|
+
},
|
|
49
|
+
handleOpen: function handleOpen() {
|
|
50
|
+
var _commonPicker$value2;
|
|
51
|
+
(_commonPicker$value2 = commonPicker.value) === null || _commonPicker$value2 === void 0 || _commonPicker$value2.handleOpen();
|
|
52
|
+
},
|
|
53
|
+
handleClose: function handleClose() {
|
|
54
|
+
var _commonPicker$value3;
|
|
55
|
+
(_commonPicker$value3 = commonPicker.value) === null || _commonPicker$value3 === void 0 || _commonPicker$value3.handleClose();
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
expose(refProps);
|
|
59
|
+
var onModelValueUpdated = function onModelValueUpdated(val) {
|
|
60
|
+
emit('update:modelValue', val);
|
|
61
|
+
};
|
|
62
|
+
return function () {
|
|
63
|
+
var _props$format;
|
|
64
|
+
var format = (_props$format = props.format) !== null && _props$format !== void 0 ? _props$format : DEFAULT_FORMATS_DATEPICKER[props.type] || DEFAULT_FORMATS_DATE;
|
|
65
|
+
var Component = getPanel(props.type);
|
|
66
|
+
return createVNode(ElConfigProvider, {
|
|
67
|
+
"locale": zhCn
|
|
68
|
+
}, {
|
|
69
|
+
"default": function _default() {
|
|
70
|
+
return [createVNode(CommonPicker, mergeProps(props, {
|
|
71
|
+
"format": format,
|
|
72
|
+
"type": props.type,
|
|
73
|
+
"ref": commonPicker,
|
|
74
|
+
"onUpdate:modelValue": onModelValueUpdated
|
|
75
|
+
}), {
|
|
76
|
+
"default": function _default(scopedProps) {
|
|
77
|
+
return createVNode(Component, scopedProps, null);
|
|
78
|
+
},
|
|
79
|
+
'range-separator': slots['range-separator']
|
|
80
|
+
})];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
export { CustomDatePicker as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import DatePickPanel from 'element-plus/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs';
|
|
2
|
+
import './date-picker-com/panel-date-range.vue.js';
|
|
3
|
+
import './date-picker-com/panel-month-range.vue.js';
|
|
4
|
+
import script from './date-picker-com/panel-month-range.vue2.js';
|
|
5
|
+
import script$1 from './date-picker-com/panel-date-range.vue2.js';
|
|
6
|
+
|
|
7
|
+
var getPanel = function getPanel(type) {
|
|
8
|
+
switch (type) {
|
|
9
|
+
case 'daterange':
|
|
10
|
+
case 'datetimerange':
|
|
11
|
+
{
|
|
12
|
+
return script$1;
|
|
13
|
+
}
|
|
14
|
+
case 'monthrange':
|
|
15
|
+
{
|
|
16
|
+
return script;
|
|
17
|
+
}
|
|
18
|
+
default:
|
|
19
|
+
{
|
|
20
|
+
return DatePickPanel;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { getPanel };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IEditorConfig } from '@wangeditor/editor';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
editorId: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").ValidatorFunction<string>> & {
|
|
5
|
+
default: string;
|
|
6
|
+
} & {
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
height: import("vue-types").VueTypeDef<string | number> & {
|
|
10
|
+
default: string | number;
|
|
11
|
+
};
|
|
12
|
+
editorConfig: {
|
|
13
|
+
type: PropType<IEditorConfig>;
|
|
14
|
+
default: () => any;
|
|
15
|
+
};
|
|
16
|
+
modelValue: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").ValidatorFunction<string>> & {
|
|
17
|
+
default: string;
|
|
18
|
+
} & {
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
}, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
|
+
editorId: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").ValidatorFunction<string>> & {
|
|
25
|
+
default: string;
|
|
26
|
+
} & {
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
height: import("vue-types").VueTypeDef<string | number> & {
|
|
30
|
+
default: string | number;
|
|
31
|
+
};
|
|
32
|
+
editorConfig: {
|
|
33
|
+
type: PropType<IEditorConfig>;
|
|
34
|
+
default: () => any;
|
|
35
|
+
};
|
|
36
|
+
modelValue: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").ValidatorFunction<string>> & {
|
|
37
|
+
default: string;
|
|
38
|
+
} & {
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
}>> & {
|
|
42
|
+
onChange?: (...args: any[]) => any;
|
|
43
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
44
|
+
}, {
|
|
45
|
+
editorId: string;
|
|
46
|
+
height: string | number;
|
|
47
|
+
editorConfig: IEditorConfig;
|
|
48
|
+
modelValue: string;
|
|
49
|
+
}, {}>;
|
|
50
|
+
export default _default;
|