"use strict"; const common_vendor = require("../../common/vendor.js"); const utils_dateTimePicker = require("../../utils/dateTimePicker.js"); const _sfc_main = { data() { return { dateTimeArray: null, dateTime: [], startYear: (/* @__PURE__ */ new Date()).getFullYear(), endYear: (/* @__PURE__ */ new Date()).getFullYear() + 2, currentTime: "" }; }, props: { timeval: { type: String, default: () => { return ""; } } }, created() { common_vendor.index.__f__("log", "at components/panel/time.vue:43", "create 是否触发", this.timeval); }, watch: { timeval(oldVal, newVal) { common_vendor.index.__f__("log", "at components/panel/time.vue:47", "watch 是否触发", oldVal, "--", newVal); this.currentTime = oldVal ? oldVal : newVal; } }, mounted() { var obj = utils_dateTimePicker.dateTimePicker.dateTimePicker(this.startYear, this.endYear, this.currentTime); this.currentTime = this.timeval; this.dateTimeArray = obj.dateTimeArray; this.dateTime = obj.dateTime == -1 ? 0 : obj.dateTime; }, methods: { changeDateTime(e) { common_vendor.index.__f__("log", "at components/panel/time.vue:59", "DateTime:", e); var dateTimeArray = this.dateTimeArray, dateTime = e.detail.value; if (dateTime[3] == -1) { this.currentTime = dateTimeArray[0][dateTime[0]].replace("年", "") + "-" + dateTimeArray[1][dateTime[1]].replace("月", "") + "-" + dateTimeArray[2][dateTime[2]].replace("日", "") + " 06:00"; } else { this.currentTime = dateTimeArray[0][dateTime[0]].replace("年", "") + "-" + dateTimeArray[1][dateTime[1]].replace("月", "") + "-" + dateTimeArray[2][dateTime[2]].replace("日", "") + " " + dateTimeArray[3][dateTime[3]]; } common_vendor.index.__f__("log", "at components/panel/time.vue:67", "拼接:", this.currentTime); this.$emit("confirmChooseTime", this.currentTime); }, changeDateTimeColumn(e) { common_vendor.index.__f__("log", "at components/panel/time.vue:71", "Column:", e); } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return { a: common_vendor.t(!!$data.currentTime ? $data.currentTime : "----"), b: $data.dateTimeArray, c: $data.dateTime, d: common_vendor.o((...args) => $options.changeDateTime && $options.changeDateTime(...args)), e: common_vendor.o(($event) => $options.changeDateTimeColumn($event)) }; } const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); wx.createComponent(Component); //# sourceMappingURL=../../../.sourcemap/mp-weixin/components/panel/time.js.map