标签:second mat package dex 实例 cond == datetime 时间
网址:https://www.npmjs.com/package/vue2-datepicker
实例:只能选择整点或者半点
npm install vue2-datepicker --save <date-picker :open.sync="open" v-model="BeginTimes" :minute-step="30" :hour-options="hours" :second-step="60" value-type="format" type="datetime" placeholder="选择日期时间" popup-class=zIndex @change="handleChange1"></date-picker> <script> import DatePicker from ‘vue2-datepicker‘; import ‘vue2-datepicker/index.css‘; export default { components: { DatePicker }, data() { return { open: false,//控制开关 BeginTimes: "", hours: Array.from({ length: 24 }).map((_, i) => i), }; }, methods:{ handleChange1(value, type) { //点了分钟就关闭 if (type === ‘minute‘) { this.open = false; } }, } }; </script>
「Vue — 插件」日期时间选择vue2-datepicke
标签:second mat package dex 实例 cond == datetime 时间
原文地址:https://www.cnblogs.com/wxrk/p/14547831.html