"use strict"; const common_vendor = require("../common/vendor.js"); const _sfc_main = { __name: "HistorySearchCard", props: { defaultStartMonth: { type: String, default: "2025-01" }, defaultEndMonth: { type: String, default: "2025-11" } }, emits: ["search"], setup(__props, { emit }) { const props = __props; const startMonth = common_vendor.ref(props.defaultStartMonth); const endMonth = common_vendor.ref(props.defaultEndMonth); const formatMonth = (monthStr) => { if (!monthStr) return "请选择"; const [year, month] = monthStr.split("-"); return `${year}年${month}月`; }; const onStartMonthChange = (e) => { startMonth.value = e.detail.value; }; const onEndMonthChange = (e) => { endMonth.value = e.detail.value; }; const onSearch = () => { if (!startMonth.value || !endMonth.value) { common_vendor.index.showToast({ title: "请选择开始和结束月份", icon: "none" }); return; } if (startMonth.value > endMonth.value) { common_vendor.index.showToast({ title: "开始月份不能晚于结束月份", icon: "none" }); return; } emit("search", { startMonth: startMonth.value, endMonth: endMonth.value }); }; return (_ctx, _cache) => { return { a: common_vendor.t(formatMonth(startMonth.value)), b: startMonth.value, c: common_vendor.o(onStartMonthChange), d: common_vendor.t(formatMonth(endMonth.value)), e: endMonth.value, f: common_vendor.o(onEndMonthChange), g: common_vendor.o(onSearch) }; }; } }; const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-df43cc4c"], ["__file", "D:/program/gupiao-wx/src/components/HistorySearchCard.vue"]]); wx.createComponent(Component);