yanzhen-design-vue
Version:
38 lines (37 loc) • 1.07 kB
JavaScript
import { mergeWith } from "@yanzhen-libs/utils";
import { propsSeparate, buildProps, definePropType } from "@yanzhen-libs/utils-vue";
import { commonProps, rangePickerProps } from "ant-design-vue/es/date-picker/generatePicker/props";
import "../../../hooks/index.mjs";
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
const ns = useNamespace("range-time");
const rangeTimeOptions = {
ns,
class: ns.b(),
name: ns.defineVNodeName()
};
const rangeTimeName = rangeTimeOptions.name;
const antRangePickerProps = propsSeparate(
buildProps({
...commonProps(),
...rangePickerProps()
})
);
const rangeTimeProps = buildProps({
...antRangePickerProps.props,
// 开始时间
beginTime: definePropType([Object, String]),
// 结束时间
endTime: definePropType([Object, String])
});
const rangeTimeEmits = mergeWith({
...antRangePickerProps.emits,
"update:beginTime": (_value) => true,
"update:endTime": (_value) => true
});
export {
antRangePickerProps,
rangeTimeEmits,
rangeTimeName,
rangeTimeOptions,
rangeTimeProps
};