mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[87],{285:function(s,C,E){"use strict";E.r(C);var t={created:function(){this.content=unescape("%3Ch2%3EDatetimePicker%3C/h2%3E%0A%3Cp%3EThe%20DatetimePicker%20component%20is%20usually%20used%20with%20%3Ca%20href%3D%22%23/en-US/popup%22%3EPopup%3C/a%3E%20Component.%3C/p%3E%0A%3Ch3%3EInstall%3C/h3%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-javascript%22%3E%3Cspan%20class%3D%22hljs-keyword%22%3Eimport%3C/span%3E%20%7B%20DatetimePicker%20%7D%20%3Cspan%20class%3D%22hljs-keyword%22%3Efrom%3C/span%3E%20%3Cspan%20class%3D%22hljs-string%22%3E%27vant%27%3C/span%3E%3B%0A%0AVue.use%28DatetimePicker%29%3B%0A%3C/code%3E%3C/pre%3E%0A%3Ch3%3EUsage%3C/h3%3E%0A%3Ch4%3EChoose%20DateTime%3C/h4%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-html%22%3E%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Evan-datetime-picker%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ev-model%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22currentDate%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Etype%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22datetime%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3E%3Amin-date%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22minDate%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3E%3Amax-date%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22maxDate%22%3C/span%3E%0A/%26gt%3B%3C/span%3E%0A%3C/code%3E%3C/pre%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-javascript%22%3E%3Cspan%20class%3D%22hljs-keyword%22%3Eexport%3C/span%3E%20%3Cspan%20class%3D%22hljs-keyword%22%3Edefault%3C/span%3E%20%7B%0A%20%20data%28%29%20%7B%0A%20%20%20%20%3Cspan%20class%3D%22hljs-keyword%22%3Ereturn%3C/span%3E%20%7B%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-attr%22%3EminHour%3C/span%3E%3A%20%3Cspan%20class%3D%22hljs-number%22%3E10%3C/span%3E%2C%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-attr%22%3EmaxHour%3C/span%3E%3A%20%3Cspan%20class%3D%22hljs-number%22%3E20%3C/span%3E%2C%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-attr%22%3EminDate%3C/span%3E%3A%20%3Cspan%20class%3D%22hljs-keyword%22%3Enew%3C/span%3E%20%3Cspan%20class%3D%22hljs-built_in%22%3EDate%3C/span%3E%28%29%2C%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-attr%22%3EmaxDate%3C/span%3E%3A%20%3Cspan%20class%3D%22hljs-keyword%22%3Enew%3C/span%3E%20%3Cspan%20class%3D%22hljs-built_in%22%3EDate%3C/span%3E%28%3Cspan%20class%3D%22hljs-number%22%3E2019%3C/span%3E%2C%20%3Cspan%20class%3D%22hljs-number%22%3E10%3C/span%3E%2C%20%3Cspan%20class%3D%22hljs-number%22%3E1%3C/span%3E%29%2C%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-attr%22%3EcurrentDate%3C/span%3E%3A%20%3Cspan%20class%3D%22hljs-keyword%22%3Enew%3C/span%3E%20%3Cspan%20class%3D%22hljs-built_in%22%3EDate%3C/span%3E%28%29%0A%20%20%20%20%7D%3B%0A%20%20%7D%0A%7D%3B%0A%3C/code%3E%3C/pre%3E%0A%3Ch4%3EChoose%20Date%3C/h4%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-html%22%3E%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Evan-datetime-picker%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ev-model%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22currentDate%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Etype%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22date%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3E%3Amin-date%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22minDate%22%3C/span%3E%0A/%26gt%3B%3C/span%3E%0A%3C/code%3E%3C/pre%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-js%22%3E%3Cspan%20class%3D%22hljs-keyword%22%3Eexport%3C/span%3E%20%3Cspan%20class%3D%22hljs-keyword%22%3Edefault%3C/span%3E%20%7B%0A%20%20data%28%29%20%7B%0A%20%20%20%20%3Cspan%20class%3D%22hljs-keyword%22%3Ereturn%3C/span%3E%20%7B%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-attr%22%3EcurrentDate%3C/span%3E%3A%20%3Cspan%20class%3D%22hljs-keyword%22%3Enew%3C/span%3E%20%3Cspan%20class%3D%22hljs-built_in%22%3EDate%3C/span%3E%28%29%0A%20%20%20%20%7D%3B%0A%20%20%7D%0A%7D%0A%3C/code%3E%3C/pre%3E%0A%3Ch4%3EChoose%20Year-Month%3C/h4%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-html%22%3E%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Evan-datetime-picker%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ev-model%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22currentDate%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Etype%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22year-month%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3E%3Amin-date%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22minDate%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3E%3Aformatter%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22formatter%22%3C/span%3E%0A/%26gt%3B%3C/span%3E%0A%3C/code%3E%3C/pre%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-js%22%3E%3Cspan%20class%3D%22hljs-keyword%22%3Eexport%3C/span%3E%20%3Cspan%20class%3D%22hljs-keyword%22%3Edefault%3C/span%3E%20%7B%0A%20%20data%28%29%20%7B%0A%20%20%20%20%3Cspan%20class%3D%22hljs-keyword%22%3Ereturn%3C/span%3E%20%7B%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-attr%22%3EcurrentDate%3C/span%3E%3A%20%3Cspan%20class%3D%22hljs-keyword%22%3Enew%3C/span%3E%20%3Cspan%20class%3D%22hljs-built_in%22%3EDate%3C/span%3E%28%29%0A%20%20%20%20%7D%3B%0A%20%20%7D%2C%0A%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Emethods%3C/span%3E%3A%20%7B%0A%20%20%20%20formatter%28type%2C%20value%29%20%7B%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-keyword%22%3Eif%3C/span%3E%20%28type%20%3D%3D%3D%20%3Cspan%20class%3D%22hljs-string%22%3E%27year%27%3C/span%3E%29%20%7B%0A%20%20%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-keyword%22%3Ereturn%3C/span%3E%20%3Cspan%20class%3D%22hljs-string%22%3E%60%3Cspan%20class%3D%22hljs-subst%22%3E%24%7Bvalue%7D%3C/span%3E%20Year%60%3C/span%3E%3B%0A%20%20%20%20%20%20%7D%20%3Cspan%20class%3D%22hljs-keyword%22%3Eelse%3C/span%3E%20%3Cspan%20class%3D%22hljs-keyword%22%3Eif%3C/span%3E%20%28type%20%3D%3D%3D%20%3Cspan%20class%3D%22hljs-string%22%3E%27month%27%3C/span%3E%29%20%7B%0A%20%20%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-keyword%22%3Ereturn%3C/span%3E%20%3Cspan%20class%3D%22hljs-string%22%3E%60%3Cspan%20class%3D%22hljs-subst%22%3E%24%7Bvalue%7D%3C/span%3E%20Month%60%3C/span%3E%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-keyword%22%3Ereturn%3C/span%3E%20value%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A%3C/code%3E%3C/pre%3E%0A%3Ch4%3EChoose%20Time%3C/h4%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-html%22%3E%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Evan-datetime-picker%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ev-model%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22currentDate%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Etype%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22time%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3E%3Amin-hour%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22minHour%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3E%3Amax-hour%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22maxHour%22%3C/span%3E%0A/%26gt%3B%3C/span%3E%0A%3C/code%3E%3C/pre%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-js%22%3E%3Cspan%20class%3D%22hljs-keyword%22%3Eexport%3C/span%3E%20%3Cspan%20class%3D%22hljs-keyword%22%3Edefault%3C/span%3E%20%7B%0A%20%20data%28%29%20%7B%0A%20%20%20%20%3Cspan%20class%3D%22hljs-keyword%22%3Ereturn%3C/span%3E%20%7B%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-attr%22%3EcurrentDate%3C/span%3E%3A%20%3Cspan%20class%3D%22hljs-string%22%3E%2712%3A00%27%3C/span%3E%0A%20%20%20%20%7D%3B%0A%20%20%7D%0A%7D%0A%3C/code%3E%3C/pre%3E%0A%3Ch3%3EAPI%3C/h3%3E%0A%3Ctable%3E%0A%3Cthead%3E%0A%3Ctr%3E%0A%3Cth%3EAttribute%3C/th%3E%0A%3Cth%3EDescription%3C/th%3E%0A%3Cth%3EType%3C/th%3E%0A%3Cth%3EDefault%3C/th%3E%0A%3C/tr%3E%0A%3C/thead%3E%0A%3Ctbody%3E%0A%3Ctr%3E%0A%3Ctd%3Etype%3C/td%3E%0A%3Ctd%3ECan%20be%20set%20to%20%3Ccode%3Edate%3C/code%3E%20%3Ccode%3Etime%3C/code%3E%3Cbr%3E%20%3Ccode%3Eyear-month%3C/code%3E%3C/td%3E%0A%3Ctd%3E%3Ccode%3EString%3C/code%3E%3C/td%3E%0A%3Ctd%3E%3Ccode%3Edatetime%3C/code%3E%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Emin-date%3C/td%3E%0A%3Ctd%3EMin%20date%3C/td%3E%0A%3Ctd%3E%3Ccode%3EDate%3C/code%3E%3C/td%3E%0A%3Ctd%3ETen%20years%20ago%20on%20January%201%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Emax-date%3C/td%3E%0A%3Ctd%3EMax%20date%3C/td%3E%0A%3Ctd%3E%3Ccode%3EDate%3C/code%3E%3C/td%3E%0A%3Ctd%3ETen%20years%20later%20on%20December%2031%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Emin-hour%3C/td%3E%0A%3Ctd%3EMin%20hour%20for%20%3Ccode%3Etime%3C/code%3E%20type%3C/td%3E%0A%3Ctd%3E%3Ccode%3ENumber%3C/code%3E%3C/td%3E%0A%3Ctd%3E%3Ccode%3E0%3C/code%3E%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Emax-hour%3C/td%3E%0A%3Ctd%3EMax%20hour%20for%20%3Ccode%3Etime%3C/code%3E%20type%3C/td%3E%0A%3Ctd%3E%3Ccode%3ENumber%3C/code%3E%3C/td%3E%0A%3Ctd%3E%3Ccode%3E23%3C/code%3E%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Emin-minute%3C/td%3E%0A%3Ctd%3EMax%20minute%20for%20%3Ccode%3Etime%3C/code%3E%20type%3C/td%3E%0A%3Ctd%3E%3Ccode%3ENumber%3C/code%3E%3C/td%3E%0A%3Ctd%3E%3Ccode%3E0%3C/code%3E%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Emax-minute%3C/td%3E%0A%3Ctd%3EMax%20minute%20for%20%3Ccode%3Etime%3C/code%3E%20type%3C/td%3E%0A%3Ctd%3E%3Ccode%3ENumber%3C/code%3E%3C/td%3E%0A%3Ctd%3E%3Ccode%3E59%3C/code%3E%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Eformatter%3C/td%3E%0A%3Ctd%3EOption%20text%20formatter%3C/td%3E%0A%3Ctd%3E%3Ccode%3E%28type%2C%20value%29%20%3D%26gt%3B%20value%3C/code%3E%3C/td%3E%0A%3Ctd%3E-%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Etitle%3C/td%3E%0A%3Ctd%3EToolbar%20title%3C/td%3E%0A%3Ctd%3E%3Ccode%3EString%3C/code%3E%3C/td%3E%0A%3Ctd%3E%3Ccode%3E%27%27%3C/code%3E%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Eloading%3C/td%3E%0A%3Ctd%3EWhether%20to%20show%20loading%20prompt%3C/td%3E%0A%3Ctd%3E%3Ccode%3EBoolean%3C/code%3E%3C/td%3E%0A%3Ctd%3E%3Ccode%3Efalse%3C/code%3E%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Eitem-height%3C/td%3E%0A%3Ctd%3EOption%20height%3C/td%3E%0A%3Ctd%3E%3Ccode%3ENumber%3C/code%3E%3C/td%3E%0A%3Ctd%3E%3Ccode%3E44%3C/code%3E%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Econfirm-button-text%3C/td%3E%0A%3Ctd%3EText%20of%20confirm%20button%3C/td%3E%0A%3Ctd%3E%3Ccode%3EString%3C/code%3E%3C/td%3E%0A%3Ctd%3E%3Ccode%3EConfirm%3C/code%3E%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Ecancel-button-text%3C/td%3E%0A%3Ctd%3EText%20of%20cancel%20button%3C/td%3E%0A%3Ctd%3E%3Ccode%3EString%3C/code%3E%3C/td%3E%0A%3Ctd%3E%3Ccode%3ECancel%3C/code%3E%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Evisible-item-count%3C/td%3E%0A%3Ctd%3ECount%20of%20visible%20columns%3C/td%3E%0A%3Ctd%3E%3Ccode%3ENumber%3C/code%3E%3C/td%3E%0A%3Ctd%3E%3Ccode%3E5%3C/code%3E%3C/td%3E%0A%3C/tr%3E%0A%3C/tbody%3E%0A%3C/table%3E%0A%3Ch3%3EEvent%3C/h3%3E%0A%3Ctable%3E%0A%3Cthead%3E%0A%3Ctr%3E%0A%3Cth%3EEvent%3C/th%3E%0A%3Cth%3EDescription%3C/th%3E%0A%3Cth%3EArguments%3C/th%3E%0A%3C/tr%3E%0A%3C/thead%3E%0A%3Ctbody%3E%0A%3Ctr%3E%0A%3Ctd%3Echange%3C/td%3E%0A%3Ctd%3ETriggered%20when%20value%20changed%3C/td%3E%0A%3Ctd%3Epicker%3A%20picker%20instance%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Econfirm%3C/td%3E%0A%3Ctd%3ETriggered%20when%20click%20confirm%20button%3C/td%3E%0A%3Ctd%3Evalue%3A%20current%20value%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%3Ecancel%3C/td%3E%0A%3Ctd%3ETriggered%20when%20click%20cancel%20button%3C/td%3E%0A%3Ctd%3E-%3C/td%3E%0A%3C/tr%3E%0A%3C/tbody%3E%0A%3C/table%3E%0A")}},a=E(7),e=Object(a.a)(t,function(){this.$createElement;this._self._c;return this._m(0)},[function(){var s=this.$createElement;return(this._self._c||s)("section",{domProps:{innerHTML:this._s(this.content)}})}],!1,null,null,null);C.default=e.exports}}]); |