-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path66.js
1 lines (1 loc) · 3.6 KB
/
66.js
1
webpackJsonp([66],{375:function(t,e,i){"use strict";function n(t){i(886)}Object.defineProperty(e,"__esModule",{value:!0});var s=i(597),a=i(793),u=i(73),l=n,r=u(s.a,a.a,!1,l,"data-v-62fdb14b",null);e.default=r.exports},597:function(t,e,i){"use strict";var n=function(t){return t<10?"0"+t:t};e.a={name:"Timestamp",data:function(){return{nowDate:"",input1:"",input2:"",unit1:"ms",input3:"",input4:"",unit2:"ms"}},watch:{input1:{handler:function(t,e){t?"s"===this.unit1?this.input2=this.timestamp2DateStr(1e3*parseInt(t)):this.input2=this.timestamp2DateStr(parseInt(t)):this.input2=""},immediate:!0},unit1:{handler:function(t,e){this.input1&&("s"===this.unit1?this.input2=this.timestamp2DateStr(1e3*parseInt(this.input1)):this.input2=this.timestamp2DateStr(parseInt(this.input1)))},immediate:!0},input3:{handler:function(t,e){this.input4=t?this.dateStr2timestamp(t):""},immediate:!0},unit2:{handler:function(t,e){this.input3&&(this.input4=this.dateStr2timestamp(this.input3))},immediate:!0}},filters:{formaDate:function(t){var e=new Date;return e.getFullYear()+"-"+n(e.getMonth()+1)+"-"+n(e.getDate())+" "+n(e.getHours())+":"+n(e.getMinutes())+":"+n(e.getSeconds())}},mounted:function(){var t=this;this.timer=setInterval(function(){t.nowDate=new Date},1e3)},methods:{timestamp2DateStr:function(t){var e=new Date(t);return e.getFullYear()+"-"+(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"-"+(e.getDate()<10?"0"+e.getDate():e.getDate())+" "+(e.getHours()<10?"0"+e.getHours():e.getHours())+":"+(e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes())+":"+(e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds())},dateStr2timestamp:function(t){var e=new Date(t);return"ms"===this.unit2?e.getTime():e.getTime()/1e3}}}},689:function(t,e,i){e=t.exports=i(7)(void 0),e.push([t.i,".divClass[data-v-62fdb14b]{margin:10px}.widthClass[data-v-62fdb14b]{width:250px}",""])},793:function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticClass:"divClass"},[i("span",[t._v("当前时间:")]),t._v("\n "+t._s(t._f("formaDate")(t.nowDate))+"\n ")]),t._v(" "),i("div",{staticClass:"divClass"},[i("span",[t._v("时间戳:")]),t._v(" "),i("el-input",{staticClass:"widthClass",attrs:{placeholder:"请输入时间戳"},model:{value:t.input1,callback:function(e){t.input1=e},expression:"input1"}}),t._v(" "),i("el-select",{model:{value:t.unit1,callback:function(e){t.unit1=e},expression:"unit1"}},[i("el-option",{attrs:{label:"秒(s)",value:"s"}}),t._v(" "),i("el-option",{attrs:{label:"毫秒(ms)",value:"ms"}})],1),t._v(" "),i("el-input",{staticClass:"widthClass",model:{value:t.input2,callback:function(e){t.input2=e},expression:"input2"}}),t._v(" "),i("span",{staticStyle:{"font-size":"12px"}},[t._v("北京时间")])],1),t._v(" "),i("div",{staticClass:"divClass"},[t._m(0),t._v(" "),i("el-input",{staticClass:"widthClass",attrs:{placeholder:"时间格式:2023-02-09 23:20:34"},model:{value:t.input3,callback:function(e){t.input3=e},expression:"input3"}}),t._v(" "),i("el-select",{model:{value:t.unit2,callback:function(e){t.unit2=e},expression:"unit2"}},[i("el-option",{attrs:{label:"秒(s)",value:"s"}}),t._v(" "),i("el-option",{attrs:{label:"毫秒(ms)",value:"ms"}})],1),t._v(" "),i("el-input",{staticClass:"widthClass",model:{value:t.input4,callback:function(e){t.input4=e},expression:"input4"}})],1)])},s=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("span",[i("span",{staticStyle:{opacity:"0"}},[t._v("戳")]),t._v("时间:")])}],a={render:n,staticRenderFns:s};e.a=a},886:function(t,e,i){var n=i(689);"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);i(74)("6df70df8",n,!0,{})}});