You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
44 KiB
1 lines
44 KiB
{"version":3,"sources":["webpack:///C:/Users/Administrator/Documents/WeChat Files/wxid_4mbfe5m00xwy21/FileStorage/File/2024-07/uniapp/wechat/components/w-picker/date-picker.vue?483d","webpack:///C:/Users/Administrator/Documents/WeChat Files/wxid_4mbfe5m00xwy21/FileStorage/File/2024-07/uniapp/wechat/components/w-picker/date-picker.vue?5cff","webpack:///C:/Users/Administrator/Documents/WeChat Files/wxid_4mbfe5m00xwy21/FileStorage/File/2024-07/uniapp/wechat/components/w-picker/date-picker.vue?37ca","webpack:///C:/Users/Administrator/Documents/WeChat Files/wxid_4mbfe5m00xwy21/FileStorage/File/2024-07/uniapp/wechat/components/w-picker/date-picker.vue?6501","uni-app:///components/w-picker/date-picker.vue","webpack:///C:/Users/Administrator/Documents/WeChat Files/wxid_4mbfe5m00xwy21/FileStorage/File/2024-07/uniapp/wechat/components/w-picker/date-picker.vue?c28a","webpack:///C:/Users/Administrator/Documents/WeChat Files/wxid_4mbfe5m00xwy21/FileStorage/File/2024-07/uniapp/wechat/components/w-picker/date-picker.vue?56f3"],"names":["data","pickVal","range","years","months","days","hours","minutes","seconds","checkObj","props","itemHeight","type","default","startYear","endYear","value","current","disabledAfter","fields","watch","created","methods","formatNum","checkValue","strReg","example","console","resetData","isLeapYear","getData","getCurrenDate","curDate","curYear","curMonth","curMonthdays","curDay","curHour","curMinute","curSecond","getDefaultDate","defaultDate","defaultYear","defaultMonth","defaultDay","defaultDays","getStartDate","startDate","getEndDate","endDate","getDval","dVal","initData","full","year","month","day","hour","minute","second","obj","startMonth","startDay","endMonth","endDay","dateData","result","handlerChange","leapYear"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAwH;AACxH;AAC+D;AACL;AACc;;;AAGxE;AACyN;AACzN,gBAAgB,iNAAU;AAC1B,EAAE,iFAAM;AACR,EAAE,sFAAM;AACR,EAAE,+FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,0FAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAs3B,CAAgB,yyBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eCiF14B;EACAA;IACA;MACAC;MACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;MACA;MACAC;IACA;EACA;EACAC;IACAC;MACAC;MACAC;IACA;IACAC;MACAF;MACAC;IACA;IACAE;MACAH;MACAC;IACA;IACAG;MACAJ;MACAC;IACA;IACAI;MAAA;MACAL;MACAC;IACA;IACAK;MAAA;MACAN;MACAC;IACA;IACAM;MACAP;MACAC;IACA;EACA;EACAO;IACAD;MACA;IACA;IACAH;MACA;IACA;EACA;EACAK;IACA;EACA;EACAC;IACAC;MACA;IACA;IACAC;MACA;MACA;QACA;UACAC;UACAC;UACA;QACA;UACAD;UACAC;UACA;QACA;UACAD;UACAC;UACA;QACA;UACAD;UACAC;UACA;QACA;UACAD;UACAC;UACA;QACA;UACAD;UACAC;UACA;MAAA;MAEA;QACAC;MACA;MACA;IACA;IACAC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QAAAvB;QAAAC;QAAAC;QAAAC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QACAJ;MACA;MAAA;MACA;QACAC;MACA;MACA;QACAC;MACA;MACA;QACAC;MACA;MACA;QACAC;MACA;MACA;QACAJ;QACAC;QACAC;QACAC;QACAC;MACA;IACA;IACAqB;MACA;QACA;MACA;QACA;MACA;IACA;IACAC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QAAA1B;QAAAC;QAAAC;QAAAC;QAAAC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QACAL;MACA;MACA;QACAC;MACA;MACA;QACAC;MACA;MACA;QACAC;MACA;MACA;QACAC;MACA;MACA;MACA;MACA;MACA;QACAC;MACA;MACA;QACAL;QACAC;QACAC;QACAC;QACAC;QACAC;MACA;IACA;IACAuB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;MACA;IACA;IACAC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QACAC;QACAC;QACAC;QACAC;QACAC;MACA;IACA;IACAC;MACA;MACA;MACA;MACA;QACAC;MACA;QACAA;MACA;MACA;IACA;IACAC;MACA;MACA;MACA;MACA;QACAC;MACA;QACAA;MACA;MACA;IACA;IACAC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QACA;QACA;UACAC;QACA;UACA;YACA;cACAA;cACA;YACA;cACAA;cACA;YACA;cACAA;cACA;YACA;cACAA;cACA;YACA;cACAA;cACA;YACA;cACAA;cACA;UAAA;QAEA;MACA;QACAA;MACA;MACA;IACA;IACAC;MAAA;MACA;MACA;QAAAhD;QAAAC;QAAAC;QAAAC;QAAAC;MACA;QAAAP;MACA;MACA;MACA;MACA;QAAAoD;QAAAC;QAAAC;QAAAC;QAAAC;QAAAC;QAAAC;QAAAC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACAT;MAEAJ;MACAE;MACAnC;MACA+C;MACAC;MACA/C;MACAgD;MACAC;MACAC;MACA9D;MACAC;MACAC;MACAC;MACAC;MACAC;MACA;QACA;UACAP,2BACAkD,qEACA,cACAhD,4BACA,IACAgD,qEACA;UACAjD;YAAAC;UAAA;UACAmD;UACAY;UACAN;YACAN;UACA;UACA;QACA;UACArD,2BACAkD,sEACAA,uEACA,cACAhD,6BACAC,yCACA,IACA+C,sEACAA,uEACA;UACAjD;YAAAC;YAAAC;UAAA;UACAkD;UACAC;UACAW;UACAN;YACAN;YACAC;UACA;UACA;QACA;UACAtD,2BACAkD,sEACAA,wEACAA,mEACA,cACAhD,6BACAC,0CACAC,qCACA,IACA8C,sEACAA,wEACAA,mEACA;UACAjD;YAAAC;YAAAC;YAAAC;UAAA;UACAiD;UACAC;UACAC;UACAU;UACAN;YACAN;YACAC;YACAC;UACA;UACA;QACA;UACAvD,2BACAkD,sEACAA,wEACAA,oEACAA,qEACA,cACAhD,6BACAC,0CACAC,sCACAC,uCACA,IACA6C,sEACAA,wEACAA,oEACAA,qEACA;UACAjD;YAAAC;YAAAC;YAAAC;YAAAC;UAAA;UACAgD;UACAC;UACAC;UACAC;UACAS;UACAb;UACAO;YACAN;YACAC;YACAC;YACAC;UACA;UACA;QACA;UACAxD,2BACAkD,sEACAA,wEACAA,oEACAA,sEACAA,yEACA,cACAhD,6BACAC,0CACAC,sCACAC,wCACAC,2CACA,IACA4C,sEACAA,wEACAA,oEACAA,sEACAA,yEACA;UACAjD;YAAAC;YAAAC;YAAAC;YAAAC;YAAAC;UAAA;UACA+C;UACAC;UACAC;UACAC;UACAC;UACAL;UACAa;UACAN;YACAN;YACAC;YACAC;YACAC;YACAC;UACA;UACA;QACA;UACAzD,2BACAkD,sEACAA,wEACAA,oEACAA,sEACAA,0EACAA,yEACA,cACAhD,6BACAC,0CACAC,sCACAC,wCACAC,4CACAC,2CACA,IACA2C,sEACAA,wEACAA,oEACAA,sEACAA,0EACAA,yEACA;UACAjD;YAAAC;YAAAC;YAAAC;YAAAC;YAAAC;YAAAC;UAAA;UACA8C;UACAC;UACAC;UACAC;UACAC;UACAC;UACAO;UACAN;YACAN;YACAC;YACAC;YACAC;YACAC;YACAC;UACA;UACA;QACA;UACAzD;YAAAC;YAAAC;YAAAC;UAAA;UACA;MAAA;MAEA;MACA;MACA;QACA6D;QACAlD;QACA4C;MACA;MACA;QACA;MACA;IACA;IACAO;MACA;MACA;MACA;QAAAZ;QAAAC;QAAAC;QAAAC;QAAAC;MACA;QAAAN;QAAAO;MACA;QAAAvD;QAAAC;QAAAC;QAAAC;MACA;MACA;QAAAoB;MACA0B;MACAC;MACAC;MACAC;MACAC;MACAC;MACA/B;MACAwC;MACA;QACA;UACAF;UACAN;YACAN;UACA;UACA;QACA;UACAY;UACA;UACA;UACAN;YACAN;YACAC;UACA;UACA;QACA;UACAW;UACA;YACA9D;YACAC;UACA;YACA;cACAA;YACA;UACA;UACA;UACA;UACAuD;YACAN;YACAC;YACAC;UACA;UACA;QACA;UACAU;UACAb;UACA;YACAjD;YACAC;YACAC;UACA;YACA;cACAD;YACA;UACA;UACA;UACA;UACA;UACAuD;YACAN;YACAC;YACAC;YACAC;UACA;UACA;QACA;UACAJ;UACAa;UACA;YACA9D;YACAC;YACAC;YACAC;UACA;YACA;cACAF;YACA;UACA;UACA;UACA;UACA;UACA;UACAuD;YACAN;YACAC;YACAC;YACAC;YACAC;UACA;UACA;QACA;UACAQ;UACA;YACA9D;YACAC;YACAC;YACAC;YACA;UACA;YACA;cACAF;YACA;UACA;UACA;UACA;UACA;UACA;UACA;UACAuD;YACAN;YACAC;YACAC;YACAC;YACAC;YACAC;UACA;UACA;MAAA;MAEA;MACA;QACAO;QACAlD;QACA4C;MACA;IACA;EACA;AACA;AAAA,2B;;;;;;;;;;;;AChuBA;AAAA;AAAA;AAAA;AAAynD,CAAgB,w6CAAG,EAAC,C;;;;;;;;;;;ACA7oD;AACA,OAAO,KAAU,EAAE,kBAKd","file":"components/w-picker/date-picker.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./date-picker.vue?vue&type=template&id=39652146&\"\nvar renderjs\nimport script from \"./date-picker.vue?vue&type=script&lang=js&\"\nexport * from \"./date-picker.vue?vue&type=script&lang=js&\"\nimport style0 from \"./date-picker.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"components/w-picker/date-picker.vue\"\nexport default component.exports","export * from \"-!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./date-picker.vue?vue&type=template&id=39652146&\"","var components\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./date-picker.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./date-picker.vue?vue&type=script&lang=js&\"","<template>\n\t<view class=\"w-picker-view\">\r\n\t\t<picker-view v-if=\"fields=='year'\" class=\"d-picker-view\" :indicator-style=\"itemHeight\" :value=\"pickVal\" @change=\"handlerChange\">\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.years\" :key=\"index\">{{item}}年</view>\r\n\t\t\t</picker-view-column>\r\n\t\t</picker-view>\r\n\t\t<picker-view v-if=\"fields=='month'\" class=\"d-picker-view\" :indicator-style=\"itemHeight\" :value=\"pickVal\" @change=\"handlerChange\">\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.years\" :key=\"index\">{{item}}年</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.months\" :key=\"index\">{{item}}月</view>\r\n\t\t\t</picker-view-column>\r\n\t\t</picker-view>\r\n\t\t<picker-view v-if=\"fields=='day'\" class=\"d-picker-view\" :indicator-style=\"itemHeight\" :value=\"pickVal\" @change=\"handlerChange\">\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.years\" :key=\"index\">{{item}}年</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.months\" :key=\"index\">{{item}}月</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.days\" :key=\"index\">{{item}}日</view>\r\n\t\t\t</picker-view-column>\r\n\t\t</picker-view>\r\n\t\t<picker-view v-if=\"fields=='hour'\" class=\"d-picker-view\" :indicator-style=\"itemHeight\" :value=\"pickVal\" @change=\"handlerChange\">\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.years\" :key=\"index\">{{item}}年</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.months\" :key=\"index\">{{item}}月</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.days\" :key=\"index\">{{item}}日</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.hours\" :key=\"index\">{{item}}时</view>\r\n\t\t\t</picker-view-column>\r\n\t\t</picker-view>\r\n\t\t<picker-view v-if=\"fields=='minute'\" class=\"d-picker-view\" :indicator-style=\"itemHeight\" :value=\"pickVal\" @change=\"handlerChange\">\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.years\" :key=\"index\">{{item}}年</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.months\" :key=\"index\">{{item}}月</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.days\" :key=\"index\">{{item}}日</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.hours\" :key=\"index\">{{item}}时</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.minutes\" :key=\"index\">{{item}}分</view>\r\n\t\t\t</picker-view-column>\r\n\t\t</picker-view>\r\n\t\t<picker-view v-if=\"fields=='second'\" class=\"d-picker-view\" :indicator-style=\"itemHeight\" :value=\"pickVal\" @change=\"handlerChange\">\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.years\" :key=\"index\">{{item}}年</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.months\" :key=\"index\">{{item}}月</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.days\" :key=\"index\">{{item}}日</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.hours\" :key=\"index\">{{item}}时</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.minutes\" :key=\"index\">{{item}}分</view>\r\n\t\t\t</picker-view-column>\r\n\t\t\t<picker-view-column>\r\n\t\t\t\t<view class=\"w-picker-item\" v-for=\"(item,index) in range.seconds\" :key=\"index\">{{item}}秒</view>\r\n\t\t\t</picker-view-column>\r\n\t\t</picker-view>\r\n\t</view>\n</template>\n\n<script>\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tpickVal:[],\r\n\t\t\t\trange:{\r\n\t\t\t\t\tyears:[],\r\n\t\t\t\t\tmonths:[],\r\n\t\t\t\t\tdays:[],\r\n\t\t\t\t\thours:[],\r\n\t\t\t\t\tminutes:[],\r\n\t\t\t\t\tseconds:[]\r\n\t\t\t\t},\r\n\t\t\t\tcheckObj:{}\r\n\t\t\t};\r\n\t\t},\r\n\t\tprops:{\r\n\t\t\titemHeight:{\r\n\t\t\t\ttype:String,\r\n\t\t\t\tdefault:\"44px\"\r\n\t\t\t},\r\n\t\t\tstartYear:{\r\n\t\t\t\ttype:[String,Number],\r\n\t\t\t\tdefault:\"\"\r\n\t\t\t},\r\n\t\t\tendYear:{\r\n\t\t\t\ttype:[String,Number],\r\n\t\t\t\tdefault:\"\"\r\n\t\t\t},\r\n\t\t\tvalue:{\r\n\t\t\t\ttype:[String,Array,Number],\r\n\t\t\t\tdefault:\"\"\r\n\t\t\t},\r\n\t\t\tcurrent:{//是否默认选中当前日期\r\n\t\t\t\ttype:Boolean,\r\n\t\t\t\tdefault:false\r\n\t\t\t},\r\n\t\t\tdisabledAfter:{//是否禁用当前之后的日期\r\n\t\t\t\ttype:Boolean,\r\n\t\t\t\tdefault:false\r\n\t\t\t},\r\n\t\t\tfields:{\r\n\t\t\t\ttype:String,\r\n\t\t\t\tdefault:\"day\"\r\n\t\t\t}\r\n\t\t},\r\n\t\twatch:{\r\n\t\t\tfields(val){\r\n\t\t\t\tthis.initData();\r\n\t\t\t},\r\n\t\t\tvalue(val){\r\n\t\t\t\tthis.initData();\r\n\t\t\t}\r\n\t\t},\r\n\t\tcreated() {\r\n\t\t\tthis.initData();\r\n\t\t},\r\n\t\tmethods:{\r\n\t\t\tformatNum(n){\r\n\t\t\t\treturn (Number(n)<10?'0'+Number(n):Number(n)+'');\r\n\t\t\t},\r\n\t\t\tcheckValue(value){\r\n\t\t\t\tlet strReg,example\r\n\t\t\t\tswitch(this.fields){\r\n\t\t\t\t\tcase \"year\":\r\n\t\t\t\t\t\tstrReg=/^\\d{4}$/;\r\n\t\t\t\t\t\texample=\"2019\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\t\tstrReg=/^\\d{4}-\\d{2}$/;\r\n\t\t\t\t\t\texample=\"2019-02\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\t\tstrReg=/^\\d{4}-\\d{2}-\\d{2}$/;\r\n\t\t\t\t\t\texample=\"2019-02-01\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"hour\":\r\n\t\t\t\t\t\tstrReg=/^\\d{4}-\\d{2}-\\d{2} \\d{2}(:\\d{2}){1,2}?$/;\r\n\t\t\t\t\t\texample=\"2019-02-01 18:00:00或2019-02-01 18\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"minute\":\r\n\t\t\t\t\t\tstrReg=/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}(:\\d{2}){0,1}?$/;\r\n\t\t\t\t\t\texample=\"2019-02-01 18:06:00或2019-02-01 18:06\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"second\":\r\n\t\t\t\t\t\tstrReg=/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$/;\r\n\t\t\t\t\t\texample=\"2019-02-01 18:06:01\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(!strReg.test(value)){\r\n\t\t\t\t\tconsole.log(new Error(\"请传入与mode、fields匹配的value值,例value=\"+example+\"\"))\r\n\t\t\t\t}\r\n\t\t\t\treturn strReg.test(value);\r\n\t\t\t},\r\n\t\t\tresetData(year,month,day,hour,minute){\r\n\t\t\t\tlet curDate=this.getCurrenDate();\r\n\t\t\t\tlet curFlag=this.current;\r\n\t\t\t\tlet curYear=curDate.curYear;\r\n\t\t\t\tlet curMonth=curDate.curMonth;\r\n\t\t\t\tlet curDay=curDate.curDay;\r\n\t\t\t\tlet curHour=curDate.curHour;\r\n\t\t\t\tlet curMinute=curDate.curMinute;\r\n\t\t\t\tlet curSecond=curDate.curSecond;\r\n\t\t\t\tlet months=[],days=[],hours=[],minutes=[],seconds=[];\r\n\t\t\t\tlet disabledAfter=this.disabledAfter;\r\n\t\t\t\tlet monthsLen=disabledAfter?(year*1<curYear?12:curMonth):12;\r\n\t\t\t\tlet totalDays=new Date(year,month,0).getDate();//计算当月有几天;\r\n\t\t\t\tlet daysLen=disabledAfter?((year*1<curYear||month*1<curMonth)?totalDays:curDay):totalDays;\r\n\t\t\t\tlet hoursLen=disabledAfter?((year*1<curYear||month*1<curMonth||day*1<curDay)?24:curHour+1):24;\r\n\t\t\t\tlet minutesLen=disabledAfter?((year*1<curYear||month*1<curMonth||day*1<curDay||hour*1<curHour)?60:curMinute+1):60;\r\n\t\t\t\tlet secondsLen=disabledAfter?((year*1<curYear||month*1<curMonth||day*1<curDay||hour*1<curHour||minute*1<curMinute)?60:curSecond+1):60;\r\n\t\t\t\tfor(let month=1;month<=monthsLen;month++){\r\n\t\t\t\t\tmonths.push(this.formatNum(month));\r\n\t\t\t\t};\r\n\t\t\t\tfor(let day=1;day<=daysLen;day++){\r\n\t\t\t\t\tdays.push(this.formatNum(day));\r\n\t\t\t\t}\r\n\t\t\t\tfor(let hour=0;hour<hoursLen;hour++){\r\n\t\t\t\t\thours.push(this.formatNum(hour));\r\n\t\t\t\t}\r\n\t\t\t\tfor(let minute=0;minute<minutesLen;minute++){\r\n\t\t\t\t\tminutes.push(this.formatNum(minute));\r\n\t\t\t\t}\r\n\t\t\t\tfor(let second=0;second<secondsLen;second++){\r\n\t\t\t\t\tseconds.push(this.formatNum(second));\r\n\t\t\t\t}\r\n\t\t\t\treturn{\r\n\t\t\t\t\tmonths,\r\n\t\t\t\t\tdays,\r\n\t\t\t\t\thours,\r\n\t\t\t\t\tminutes,\r\n\t\t\t\t\tseconds\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tisLeapYear (Year) {\r\n\t\t\t\tif (((Year % 4)==0) && ((Year % 100)!=0) || ((Year % 400)==0)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else { \r\n\t\t\t\t\treturn false; \r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tgetData(dVal){\r\n\t\t\t\t//用来处理初始化数据\r\n\t\t\t\tlet curFlag=this.current;\r\n\t\t\t\tlet disabledAfter=this.disabledAfter;\r\n\t\t\t\tlet fields=this.fields;\r\n\t\t\t\tlet curDate=this.getCurrenDate();\r\n\t\t\t\tlet curYear=curDate.curYear;\r\n\t\t\t\tlet curMonthdays=curDate.curMonthdays;\r\n\t\t\t\tlet curMonth=curDate.curMonth;\r\n\t\t\t\tlet curDay=curDate.curDay;\r\n\t\t\t\tlet curHour=curDate.curHour;\r\n\t\t\t\tlet curMinute=curDate.curMinute;\r\n\t\t\t\tlet curSecond=curDate.curSecond;\r\n\t\t\t\tlet defaultDate=this.getDefaultDate();\r\n\t\t\t\tlet startYear=this.getStartDate().getFullYear();\r\n\t\t\t\tlet endYear=this.getEndDate().getFullYear();\r\n\t\t\t\t//颗粒度,禁用当前之后日期仅对year,month,day,hour生效;分钟秒禁用没有意义,\r\n\t\t\t\tlet years=[],months=[],days=[],hours=[],minutes=[],seconds=[];\r\n\t\t\t\tlet year=dVal[0]*1;\r\n\t\t\t\tlet month=dVal[1]*1;\r\n\t\t\t\tlet day=dVal[2]*1;\r\n\t\t\t\tlet hour=dVal[3]*1;\r\n\t\t\t\tlet minute=dVal[4]*1;\r\n\t\t\t\tlet monthsLen=disabledAfter?(year<curYear?12:curDate.curMonth):12;\r\n\t\t\t\tlet daysLen=disabledAfter?((year<curYear||month<curMonth)?defaultDate.defaultDays:curDay):(curFlag?curMonthdays:defaultDate.defaultDays);\r\n\t\t\t\tlet hoursLen=disabledAfter?((year<curYear||month<curMonth||day<curDay)?24:curHour+1):24;\r\n\t\t\t\tlet minutesLen=disabledAfter?((year<curYear||month<curMonth||day<curDay||hour<curHour)?60:curMinute+1):60;\r\n\t\t\t\tlet secondsLen=disabledAfter?((year<curYear||month<curMonth||day<curDay||hour<curHour||minute<curMinute)?60:curSecond+1):60;\r\n\t\t\t\tfor(let year=startYear;year<=(disabledAfter?curYear:endYear);year++){\r\n\t\t\t\t\tyears.push(year.toString())\r\n\t\t\t\t}\r\n\t\t\t\tfor(let month=1;month<=monthsLen;month++){\r\n\t\t\t\t\tmonths.push(this.formatNum(month));\r\n\t\t\t\t}\r\n\t\t\t\tfor(let day=1;day<=daysLen;day++){\r\n\t\t\t\t\tdays.push(this.formatNum(day));\r\n\t\t\t\t}\r\n\t\t\t\tfor(let hour=0;hour<hoursLen;hour++){\r\n\t\t\t\t\thours.push(this.formatNum(hour));\r\n\t\t\t\t}\r\n\t\t\t\tfor(let minute=0;minute<minutesLen;minute++){\r\n\t\t\t\t\tminutes.push(this.formatNum(minute));\r\n\t\t\t\t}\r\n\t\t\t\t// for(let second=0;second<(disabledAfter?curDate.curSecond+1:60);second++){\r\n\t\t\t\t// \tseconds.push(this.formatNum(second));\r\n\t\t\t\t// }\r\n\t\t\t\tfor(let second=0;second<60;second++){\r\n\t\t\t\t\tseconds.push(this.formatNum(second));\r\n\t\t\t\t}\r\n\t\t\t\treturn {\r\n\t\t\t\t\tyears,\r\n\t\t\t\t\tmonths,\r\n\t\t\t\t\tdays,\r\n\t\t\t\t\thours,\r\n\t\t\t\t\tminutes,\r\n\t\t\t\t\tseconds\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tgetCurrenDate(){\r\n\t\t\t\tlet curDate=new Date();\r\n\t\t\t\tlet curYear=curDate.getFullYear();\r\n\t\t\t\tlet curMonth=curDate.getMonth()+1;\r\n\t\t\t\tlet curMonthdays=new Date(curYear,curMonth,0).getDate();\r\n\t\t\t\tlet curDay=curDate.getDate();\r\n\t\t\t\tlet curHour=curDate.getHours();\r\n\t\t\t\tlet curMinute=curDate.getMinutes();\r\n\t\t\t\tlet curSecond=curDate.getSeconds();\r\n\t\t\t\treturn{\r\n\t\t\t\t\tcurDate,\r\n\t\t\t\t\tcurYear,\r\n\t\t\t\t\tcurMonth,\r\n\t\t\t\t\tcurMonthdays,\r\n\t\t\t\t\tcurDay,\r\n\t\t\t\t\tcurHour,\r\n\t\t\t\t\tcurMinute,\r\n\t\t\t\t\tcurSecond\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tgetDefaultDate(){\r\n\t\t\t\tlet value=this.value;\r\n\t\t\t\tlet reg=/-/g;\r\n\t\t\t\tlet defaultDate=value?new Date(value.replace(reg,\"/\")):new Date();\r\n\t\t\t\tlet defaultYear=defaultDate.getFullYear();\r\n\t\t\t\tlet defaultMonth=defaultDate.getMonth()+1;\r\n\t\t\t\tlet defaultDay=defaultDate.getDate();\r\n\t\t\t\tlet defaultDays=new Date(defaultYear,defaultMonth,0).getDate()*1;\r\n\t\t\t\treturn{\r\n\t\t\t\t\tdefaultDate,\r\n\t\t\t\t\tdefaultYear,\r\n\t\t\t\t\tdefaultMonth,\r\n\t\t\t\t\tdefaultDay,\r\n\t\t\t\t\tdefaultDays\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tgetStartDate(){\r\n\t\t\t\tlet start=this.startYear;\r\n\t\t\t\tlet startDate=\"\";\r\n\t\t\t\tlet reg=/-/g;\r\n\t\t\t\tif(start){\r\n\t\t\t\t\tstartDate=new Date(start+\"/01/01\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstartDate=new Date(\"1970/01/01\");\r\n\t\t\t\t}\r\n\t\t\t\treturn startDate;\r\n\t\t\t},\r\n\t\t\tgetEndDate(){\r\n\t\t\t\tlet end=this.endYear;\r\n\t\t\t\tlet reg=/-/g;\r\n\t\t\t\tlet endDate=\"\";\r\n\t\t\t\tif(end){\r\n\t\t\t\t\tendDate=new Date(end+\"/12/01\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tendDate=new Date();\r\n\t\t\t\t}\r\n\t\t\t\treturn endDate;\r\n\t\t\t},\r\n\t\t\tgetDval(){\r\n\t\t\t\tlet value=this.value;\r\n\t\t\t\tlet fields=this.fields;\r\n\t\t\t\tlet dVal=null;\r\n\t\t\t\tlet aDate=new Date();\r\n\t\t\t\tlet year=this.formatNum(aDate.getFullYear());\r\n\t\t\t\tlet month=this.formatNum(aDate.getMonth()+1);\r\n\t\t\t\tlet day=this.formatNum(aDate.getDate());\r\n\t\t\t\tlet hour=this.formatNum(aDate.getHours());\r\n\t\t\t\tlet minute=this.formatNum(aDate.getMinutes());\r\n\t\t\t\tlet second=this.formatNum(aDate.getSeconds());\r\n\t\t\t\tif(value){\r\n\t\t\t\t\tlet flag=this.checkValue(value);\r\n\t\t\t\t\tif(!flag){\r\n\t\t\t\t\t\tdVal=[year,month,day,hour,minute,second]\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch(this.fields){\r\n\t\t\t\t\t\t\tcase \"year\":\r\n\t\t\t\t\t\t\t\tdVal=value?[value]:[];\t\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\t\t\t\tdVal=value?value.split(\"-\"):[];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\t\t\t\tdVal=value?value.split(\"-\"):[];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase \"hour\":\r\n\t\t\t\t\t\t\t\tdVal=[...value.split(\" \")[0].split(\"-\"),...value.split(\" \")[1].split(\":\")];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase \"minute\":\r\n\t\t\t\t\t\t\t\tdVal=value?[...value.split(\" \")[0].split(\"-\"),...value.split(\" \")[1].split(\":\")]:[];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase \"second\":\r\n\t\t\t\t\t\t\t\tdVal=[...value.split(\" \")[0].split(\"-\"),...value.split(\" \")[1].split(\":\")];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdVal=[year,month,day,hour,minute,second]\r\n\t\t\t\t}\r\n\t\t\t\treturn dVal;\r\n\t\t\t},\r\n\t\t\tinitData(){\r\n\t\t\t\tlet startDate,endDate,startYear,endYear,startMonth,endMonth,startDay,endDay;\r\n\t\t\t\tlet years=[],months=[],days=[],hours=[],minutes=[],seconds=[];\r\n\t\t\t\tlet dVal=[],pickVal=[];\r\n\t\t\t\tlet value=this.value;\r\n\t\t\t\tlet reg=/-/g;\r\n\t\t\t\tlet range={};\r\n\t\t\t\tlet result=\"\",full=\"\",year,month,day,hour,minute,second,obj={};\r\n\t\t\t\tlet defaultDate=this.getDefaultDate();\r\n\t\t\t\tlet defaultYear=defaultDate.defaultYear;\r\n\t\t\t\tlet defaultMonth=defaultDate.defaultMonth;\r\n\t\t\t\tlet defaultDay=defaultDate.defaultDay;\r\n\t\t\t\tlet defaultDays=defaultDate.defaultDays;\r\n\t\t\t\tlet curFlag=this.current;\r\n\t\t\t\tlet disabledAfter=this.disabledAfter;\r\n\t\t\t\tlet curDate=this.getCurrenDate();\r\n\t\t\t\tlet curYear=curDate.curYear;\r\n\t\t\t\tlet curMonth=curDate.curMonth;\r\n\t\t\t\tlet curMonthdays=curDate.curMonthdays;\r\n\t\t\t\tlet curDay=curDate.curDay;\r\n\t\t\t\tlet curHour=curDate.curHour;\r\n\t\t\t\tlet curMinute=curDate.curMinute;\r\n\t\t\t\tlet curSecond=curDate.curSecond;\r\n\t\t\t\tlet dateData=[];\r\n\t\t\t\tdVal=this.getDval();\r\n\t\t\t\t\r\n\t\t\t\tstartDate=this.getStartDate();\r\n\t\t\t\tendDate=this.getEndDate();\r\n\t\t\t\tstartYear=startDate.getFullYear();\r\n\t\t\t\tstartMonth=startDate.getMonth();\r\n\t\t\t\tstartDay=startDate.getDate();\r\n\t\t\t\tendYear=endDate.getFullYear();\r\n\t\t\t\tendMonth=endDate.getMonth();\r\n\t\t\t\tendDay=endDate.getDate();\r\n\t\t\t\tdateData=this.getData(dVal);\r\n\t\t\t\tyears=dateData.years;\r\n\t\t\t\tmonths=dateData.months;\r\n\t\t\t\tdays=dateData.days;\r\n\t\t\t\thours=dateData.hours;\r\n\t\t\t\tminutes=dateData.minutes;\r\n\t\t\t\tseconds=dateData.seconds;\r\n\t\t\t\tswitch(this.fields){\r\n\t\t\t\t\tcase \"year\":\r\n\t\t\t\t\t\tpickVal=disabledAfter?[\r\n\t\t\t\t\t\t\tdVal[0]&&years.indexOf(dVal[0])!=-1?years.indexOf(dVal[0]):0\r\n\t\t\t\t\t\t]:(curFlag?[\r\n\t\t\t\t\t\t\tyears.indexOf(curYear+'')\r\n\t\t\t\t\t\t]:[\r\n\t\t\t\t\t\t\tdVal[0]&&years.indexOf(dVal[0])!=-1?years.indexOf(dVal[0]):0\r\n\t\t\t\t\t\t]);\r\n\t\t\t\t\t\trange={years};\r\n\t\t\t\t\t\tyear=dVal[0]?dVal[0]:years[0];\r\n\t\t\t\t\t\tresult=full=`${year}`;\r\n\t\t\t\t\t\tobj={\r\n\t\t\t\t\t\t\tyear\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\t\tpickVal=disabledAfter?[\r\n\t\t\t\t\t\t\tdVal[0]&&years.indexOf(dVal[0])!=-1?years.indexOf(dVal[0]):0,\r\n\t\t\t\t\t\t\tdVal[1]&&months.indexOf(dVal[1])!=-1?months.indexOf(dVal[1]):0\r\n\t\t\t\t\t\t]:(curFlag?[\r\n\t\t\t\t\t\t\tyears.indexOf(curYear+''),\r\n\t\t\t\t\t\t\tmonths.indexOf(this.formatNum(curMonth))\r\n\t\t\t\t\t\t]:[\r\n\t\t\t\t\t\t\tdVal[0]&&years.indexOf(dVal[0])!=-1?years.indexOf(dVal[0]):0,\r\n\t\t\t\t\t\t\tdVal[1]&&months.indexOf(dVal[1])!=-1?months.indexOf(dVal[1]):0\r\n\t\t\t\t\t\t]);\r\n\t\t\t\t\t\trange={years,months};\r\n\t\t\t\t\t\tyear=dVal[0]?dVal[0]:years[0];\r\n\t\t\t\t\t\tmonth=dVal[1]?dVal[1]:months[0];\r\n\t\t\t\t\t\tresult=full=`${year+'-'+month}`;\r\n\t\t\t\t\t\tobj={\r\n\t\t\t\t\t\t\tyear,\r\n\t\t\t\t\t\t\tmonth\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\t\tpickVal=disabledAfter?[\r\n\t\t\t\t\t\t\tdVal[0]&&years.indexOf(dVal[0])!=-1?years.indexOf(dVal[0]):0,\r\n\t\t\t\t\t\t\tdVal[1]&&months.indexOf(dVal[1])!=-1?months.indexOf(dVal[1]):0,\r\n\t\t\t\t\t\t\tdVal[2]&&days.indexOf(dVal[2])!=-1?days.indexOf(dVal[2]):0\r\n\t\t\t\t\t\t]:(curFlag?[\r\n\t\t\t\t\t\t\tyears.indexOf(curYear+''),\r\n\t\t\t\t\t\t\tmonths.indexOf(this.formatNum(curMonth)),\r\n\t\t\t\t\t\t\tdays.indexOf(this.formatNum(curDay)),\r\n\t\t\t\t\t\t]:[\r\n\t\t\t\t\t\t\tdVal[0]&&years.indexOf(dVal[0])!=-1?years.indexOf(dVal[0]):0,\r\n\t\t\t\t\t\t\tdVal[1]&&months.indexOf(dVal[1])!=-1?months.indexOf(dVal[1]):0,\r\n\t\t\t\t\t\t\tdVal[2]&&days.indexOf(dVal[2])!=-1?days.indexOf(dVal[2]):0\r\n\t\t\t\t\t\t]);\r\n\t\t\t\t\t\trange={years,months,days};\r\n\t\t\t\t\t\tyear=dVal[0]?dVal[0]:years[0];\r\n\t\t\t\t\t\tmonth=dVal[1]?dVal[1]:months[0];\r\n\t\t\t\t\t\tday=dVal[2]?dVal[2]:days[0];\r\n\t\t\t\t\t\tresult=full=`${year+'-'+month+'-'+day}`;\r\n\t\t\t\t\t\tobj={\r\n\t\t\t\t\t\t\tyear,\r\n\t\t\t\t\t\t\tmonth,\r\n\t\t\t\t\t\t\tday\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"hour\":\r\n\t\t\t\t\t\tpickVal=disabledAfter?[\r\n\t\t\t\t\t\t\tdVal[0]&&years.indexOf(dVal[0])!=-1?years.indexOf(dVal[0]):0,\r\n\t\t\t\t\t\t\tdVal[1]&&months.indexOf(dVal[1])!=-1?months.indexOf(dVal[1]):0,\r\n\t\t\t\t\t\t\tdVal[2]&&days.indexOf(dVal[2])!=-1?days.indexOf(dVal[2]):0,\r\n\t\t\t\t\t\t\tdVal[3]&&hours.indexOf(dVal[3])!=-1?hours.indexOf(dVal[3]):0\r\n\t\t\t\t\t\t]:(curFlag?[\r\n\t\t\t\t\t\t\tyears.indexOf(curYear+''),\r\n\t\t\t\t\t\t\tmonths.indexOf(this.formatNum(curMonth)),\r\n\t\t\t\t\t\t\tdays.indexOf(this.formatNum(curDay)),\r\n\t\t\t\t\t\t\thours.indexOf(this.formatNum(curHour)),\r\n\t\t\t\t\t\t]:[\r\n\t\t\t\t\t\t\tdVal[0]&&years.indexOf(dVal[0])!=-1?years.indexOf(dVal[0]):0,\r\n\t\t\t\t\t\t\tdVal[1]&&months.indexOf(dVal[1])!=-1?months.indexOf(dVal[1]):0,\r\n\t\t\t\t\t\t\tdVal[2]&&days.indexOf(dVal[2])!=-1?days.indexOf(dVal[2]):0,\r\n\t\t\t\t\t\t\tdVal[3]&&hours.indexOf(dVal[3])!=-1?hours.indexOf(dVal[3]):0\r\n\t\t\t\t\t\t]);\r\n\t\t\t\t\t\trange={years,months,days,hours};\r\n\t\t\t\t\t\tyear=dVal[0]?dVal[0]:years[0];\r\n\t\t\t\t\t\tmonth=dVal[1]?dVal[1]:months[0];\r\n\t\t\t\t\t\tday=dVal[2]?dVal[2]:days[0];\r\n\t\t\t\t\t\thour=dVal[3]?dVal[3]:hours[0];\r\n\t\t\t\t\t\tresult=`${year+'-'+month+'-'+day+' '+hour}`;\r\n\t\t\t\t\t\tfull=`${year+'-'+month+'-'+day+' '+hour+':00:00'}`;\r\n\t\t\t\t\t\tobj={\r\n\t\t\t\t\t\t\tyear,\r\n\t\t\t\t\t\t\tmonth,\r\n\t\t\t\t\t\t\tday,\r\n\t\t\t\t\t\t\thour\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"minute\":\r\n\t\t\t\t\t\tpickVal=disabledAfter?[\r\n\t\t\t\t\t\t\tdVal[0]&&years.indexOf(dVal[0])!=-1?years.indexOf(dVal[0]):0,\r\n\t\t\t\t\t\t\tdVal[1]&&months.indexOf(dVal[1])!=-1?months.indexOf(dVal[1]):0,\r\n\t\t\t\t\t\t\tdVal[2]&&days.indexOf(dVal[2])!=-1?days.indexOf(dVal[2]):0,\r\n\t\t\t\t\t\t\tdVal[3]&&hours.indexOf(dVal[3])!=-1?hours.indexOf(dVal[3]):0,\r\n\t\t\t\t\t\t\tdVal[4]&&minutes.indexOf(dVal[4])!=-1?minutes.indexOf(dVal[4]):0\r\n\t\t\t\t\t\t]:(curFlag?[\r\n\t\t\t\t\t\t\tyears.indexOf(curYear+''),\r\n\t\t\t\t\t\t\tmonths.indexOf(this.formatNum(curMonth)),\r\n\t\t\t\t\t\t\tdays.indexOf(this.formatNum(curDay)),\r\n\t\t\t\t\t\t\thours.indexOf(this.formatNum(curHour)),\r\n\t\t\t\t\t\t\tminutes.indexOf(this.formatNum(curMinute)),\r\n\t\t\t\t\t\t]:[\r\n\t\t\t\t\t\t\tdVal[0]&&years.indexOf(dVal[0])!=-1?years.indexOf(dVal[0]):0,\r\n\t\t\t\t\t\t\tdVal[1]&&months.indexOf(dVal[1])!=-1?months.indexOf(dVal[1]):0,\r\n\t\t\t\t\t\t\tdVal[2]&&days.indexOf(dVal[2])!=-1?days.indexOf(dVal[2]):0,\r\n\t\t\t\t\t\t\tdVal[3]&&hours.indexOf(dVal[3])!=-1?hours.indexOf(dVal[3]):0,\r\n\t\t\t\t\t\t\tdVal[4]&&minutes.indexOf(dVal[4])!=-1?minutes.indexOf(dVal[4]):0\r\n\t\t\t\t\t\t]);\r\n\t\t\t\t\t\trange={years,months,days,hours,minutes};\r\n\t\t\t\t\t\tyear=dVal[0]?dVal[0]:years[0];\r\n\t\t\t\t\t\tmonth=dVal[1]?dVal[1]:months[0];\r\n\t\t\t\t\t\tday=dVal[2]?dVal[2]:days[0];\r\n\t\t\t\t\t\thour=dVal[3]?dVal[3]:hours[0];\r\n\t\t\t\t\t\tminute=dVal[4]?dVal[4]:minutes[0];\r\n\t\t\t\t\t\tfull=`${year+'-'+month+'-'+day+' '+hour+':'+minute+':00'}`;\r\n\t\t\t\t\t\tresult=`${year+'-'+month+'-'+day+' '+hour+':'+minute}`;\r\n\t\t\t\t\t\tobj={\r\n\t\t\t\t\t\t\tyear,\r\n\t\t\t\t\t\t\tmonth,\r\n\t\t\t\t\t\t\tday,\r\n\t\t\t\t\t\t\thour,\r\n\t\t\t\t\t\t\tminute\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"second\":\r\n\t\t\t\t\t\tpickVal=disabledAfter?[\r\n\t\t\t\t\t\t\tdVal[0]&&years.indexOf(dVal[0])!=-1?years.indexOf(dVal[0]):0,\r\n\t\t\t\t\t\t\tdVal[1]&&months.indexOf(dVal[1])!=-1?months.indexOf(dVal[1]):0,\r\n\t\t\t\t\t\t\tdVal[2]&&days.indexOf(dVal[2])!=-1?days.indexOf(dVal[2]):0,\r\n\t\t\t\t\t\t\tdVal[3]&&hours.indexOf(dVal[3])!=-1?hours.indexOf(dVal[3]):0,\r\n\t\t\t\t\t\t\tdVal[4]&&minutes.indexOf(dVal[4])!=-1?minutes.indexOf(dVal[4]):0,\r\n\t\t\t\t\t\t\tdVal[5]&&seconds.indexOf(dVal[5])!=-1?seconds.indexOf(dVal[5]):0\r\n\t\t\t\t\t\t]:(curFlag?[\r\n\t\t\t\t\t\t\tyears.indexOf(curYear+''),\r\n\t\t\t\t\t\t\tmonths.indexOf(this.formatNum(curMonth)),\r\n\t\t\t\t\t\t\tdays.indexOf(this.formatNum(curDay)),\r\n\t\t\t\t\t\t\thours.indexOf(this.formatNum(curHour)),\r\n\t\t\t\t\t\t\tminutes.indexOf(this.formatNum(curMinute)),\r\n\t\t\t\t\t\t\tseconds.indexOf(this.formatNum(curSecond)),\r\n\t\t\t\t\t\t]:[\r\n\t\t\t\t\t\t\tdVal[0]&&years.indexOf(dVal[0])!=-1?years.indexOf(dVal[0]):0,\r\n\t\t\t\t\t\t\tdVal[1]&&months.indexOf(dVal[1])!=-1?months.indexOf(dVal[1]):0,\r\n\t\t\t\t\t\t\tdVal[2]&&days.indexOf(dVal[2])!=-1?days.indexOf(dVal[2]):0,\r\n\t\t\t\t\t\t\tdVal[3]&&hours.indexOf(dVal[3])!=-1?hours.indexOf(dVal[3]):0,\r\n\t\t\t\t\t\t\tdVal[4]&&minutes.indexOf(dVal[4])!=-1?minutes.indexOf(dVal[4]):0,\r\n\t\t\t\t\t\t\tdVal[5]&&seconds.indexOf(dVal[5])!=-1?seconds.indexOf(dVal[5]):0\r\n\t\t\t\t\t\t]);\r\n\t\t\t\t\t\trange={years,months,days,hours,minutes,seconds};\r\n\t\t\t\t\t\tyear=dVal[0]?dVal[0]:years[0];\r\n\t\t\t\t\t\tmonth=dVal[1]?dVal[1]:months[0];\r\n\t\t\t\t\t\tday=dVal[2]?dVal[2]:days[0];\r\n\t\t\t\t\t\thour=dVal[3]?dVal[3]:hours[0];\r\n\t\t\t\t\t\tminute=dVal[4]?dVal[4]:minutes[0];\r\n\t\t\t\t\t\tsecond=dVal[5]?dVal[5]:seconds[0];\r\n\t\t\t\t\t\tresult=full=`${year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second}`;\r\n\t\t\t\t\t\tobj={\r\n\t\t\t\t\t\t\tyear,\r\n\t\t\t\t\t\t\tmonth,\r\n\t\t\t\t\t\t\tday,\r\n\t\t\t\t\t\t\thour,\r\n\t\t\t\t\t\t\tminute,\r\n\t\t\t\t\t\t\tsecond\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\trange={years,months,days};\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tthis.range=range;\r\n\t\t\t\tthis.checkObj=obj;\r\n\t\t\t\tthis.$emit(\"change\",{\r\n\t\t\t\t\tresult:result,\r\n\t\t\t\t\tvalue:full,\r\n\t\t\t\t\tobj:obj\r\n\t\t\t\t});\r\n\t\t\t\tthis.$nextTick(()=>{\r\n\t\t\t\t\tthis.pickVal=pickVal;\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\thandlerChange(e){\r\n\t\t\t\tlet arr=[...e.detail.value];\r\n\t\t\t\tlet data=this.range;\r\n\t\t\t\tlet year=\"\",month=\"\",day=\"\",hour=\"\",minute=\"\",second=\"\";\r\n\t\t\t\tlet result=\"\",full=\"\",obj={};\r\n\t\t\t\tlet months=null,days=null,hours=null,minutes=null,seconds=null;\r\n\t\t\t\tlet disabledAfter=this.disabledAfter;\r\n\t\t\t\tlet leapYear=false,resetData={};\r\n\t\t\t\tyear=(arr[0]||arr[0]==0)?data.years[arr[0]]||data.years[data.years.length-1]:\"\";\r\n\t\t\t\tmonth=(arr[1]||arr[1]==0)?data.months[arr[1]]||data.months[data.months.length-1]:\"\";\r\n\t\t\t\tday=(arr[2]||arr[2]==0)?data.days[arr[2]]||data.days[data.days.length-1]:\"\";\r\n\t\t\t\thour=(arr[3]||arr[3]==0)?data.hours[arr[3]]||data.hours[data.hours.length-1]:\"\";\r\n\t\t\t\tminute=(arr[4]||arr[4]==0)?data.minutes[arr[4]]||data.minutes[data.minutes.length-1]:\"\";\r\n\t\t\t\tsecond=(arr[5]||arr[5]==0)?data.seconds[arr[5]]||data.seconds[data.seconds.length-1]:\"\";\r\n\t\t\t\tresetData=this.resetData(year,month,day,hour,minute);//重新拉取当前日期数据;\r\n\t\t\t\tleapYear=this.isLeapYear(year);//判断是否为闰年;\r\n\t\t\t\tswitch(this.fields){\r\n\t\t\t\t\tcase \"year\":\r\n\t\t\t\t\t\tresult=full=`${year}`;\r\n\t\t\t\t\t\tobj={\r\n\t\t\t\t\t\t\tyear\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\t\tresult=full=`${year+'-'+month}`;\r\n\t\t\t\t\t\tif(this.disabledAfter)months=resetData.months;\r\n\t\t\t\t\t\tif(months)this.range.months=months;\r\n\t\t\t\t\t\tobj={\r\n\t\t\t\t\t\t\tyear,\r\n\t\t\t\t\t\t\tmonth\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\t\tresult=full=`${year+'-'+month+'-'+day}`;\r\n\t\t\t\t\t\tif(this.disabledAfter){\r\n\t\t\t\t\t\t\tmonths=resetData.months;\r\n\t\t\t\t\t\t\tdays=resetData.days;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(leapYear||(month!=this.checkObj.month)||month==2){\r\n\t\t\t\t\t\t\t\tdays=resetData.days;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(months)this.range.months=months;\r\n\t\t\t\t\t\tif(days)this.range.days=days;\r\n\t\t\t\t\t\tobj={\r\n\t\t\t\t\t\t\tyear,\r\n\t\t\t\t\t\t\tmonth,\r\n\t\t\t\t\t\t\tday\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"hour\":\r\n\t\t\t\t\t\tresult=`${year+'-'+month+'-'+day+' '+hour}`;\r\n\t\t\t\t\t\tfull=`${year+'-'+month+'-'+day+' '+hour+':00:00'}`;\r\n\t\t\t\t\t\tif(this.disabledAfter){\r\n\t\t\t\t\t\t\tmonths=resetData.months;\r\n\t\t\t\t\t\t\tdays=resetData.days;\r\n\t\t\t\t\t\t\thours=resetData.hours;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(leapYear||(month!=this.checkObj.month)||month==2){\r\n\t\t\t\t\t\t\t\tdays=resetData.days;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(months)this.range.months=months;\r\n\t\t\t\t\t\tif(days)this.range.days=days;\r\n\t\t\t\t\t\tif(hours)this.range.hours=hours;\r\n\t\t\t\t\t\tobj={\r\n\t\t\t\t\t\t\tyear,\r\n\t\t\t\t\t\t\tmonth,\r\n\t\t\t\t\t\t\tday,\r\n\t\t\t\t\t\t\thour\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"minute\":\r\n\t\t\t\t\t\tfull=`${year+'-'+month+'-'+day+' '+hour+':'+minute+':00'}`;\r\n\t\t\t\t\t\tresult=`${year+'-'+month+'-'+day+' '+hour+':'+minute}`;\r\n\t\t\t\t\t\tif(this.disabledAfter){\r\n\t\t\t\t\t\t\tmonths=resetData.months;\r\n\t\t\t\t\t\t\tdays=resetData.days;\r\n\t\t\t\t\t\t\thours=resetData.hours;\r\n\t\t\t\t\t\t\tminutes=resetData.minutes;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(leapYear||(month!=this.checkObj.month)||month==2){\r\n\t\t\t\t\t\t\t\tdays=resetData.days;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(months)this.range.months=months;\r\n\t\t\t\t\t\tif(days)this.range.days=days;\r\n\t\t\t\t\t\tif(hours)this.range.hours=hours;\r\n\t\t\t\t\t\tif(minutes)this.range.minutes=minutes;\r\n\t\t\t\t\t\tobj={\r\n\t\t\t\t\t\t\tyear,\r\n\t\t\t\t\t\t\tmonth,\r\n\t\t\t\t\t\t\tday,\r\n\t\t\t\t\t\t\thour,\r\n\t\t\t\t\t\t\tminute\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"second\":\r\n\t\t\t\t\t\tresult=full=`${year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second}`;\r\n\t\t\t\t\t\tif(this.disabledAfter){\r\n\t\t\t\t\t\t\tmonths=resetData.months;\r\n\t\t\t\t\t\t\tdays=resetData.days;\r\n\t\t\t\t\t\t\thours=resetData.hours;\r\n\t\t\t\t\t\t\tminutes=resetData.minutes;\r\n\t\t\t\t\t\t\t//seconds=resetData.seconds;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(leapYear||(month!=this.checkObj.month)||month==2){\r\n\t\t\t\t\t\t\t\tdays=resetData.days;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(months)this.range.months=months;\r\n\t\t\t\t\t\tif(days)this.range.days=days;\r\n\t\t\t\t\t\tif(hours)this.range.hours=hours;\r\n\t\t\t\t\t\tif(minutes)this.range.minutes=minutes;\r\n\t\t\t\t\t\t//if(seconds)this.range.seconds=seconds;\r\n\t\t\t\t\t\tobj={\r\n\t\t\t\t\t\t\tyear,\r\n\t\t\t\t\t\t\tmonth,\r\n\t\t\t\t\t\t\tday,\r\n\t\t\t\t\t\t\thour,\r\n\t\t\t\t\t\t\tminute,\r\n\t\t\t\t\t\t\tsecond\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tthis.checkObj=obj;\r\n\t\t\t\tthis.$emit(\"change\",{\r\n\t\t\t\t\tresult:result,\r\n\t\t\t\t\tvalue:full,\r\n\t\t\t\t\tobj:obj\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t}\r\n\t}\n</script>\n\n<style lang=\"scss\">\n\t@import \"./w-picker.css\";\n</style>\n","import mod from \"-!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./date-picker.vue?vue&type=style&index=0&lang=scss&\"; export default mod; export * from \"-!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./date-picker.vue?vue&type=style&index=0&lang=scss&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1720663116569\n var cssReload = require(\"C:/Users/Administrator/Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"/\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""} |