vue ant-design-vue DatePicker时间选择器使用方法
import Vue from “vue”;import { DatePicker } from ‘ant-design-vue’;import ‘ant-design-vue/dist/antd.css’;//设置中文import moment from ‘moment’;import ‘moment/locale/zh-cn’moment.locale(‘zh-cn’);Vue.use(Dat
·
import Vue from “vue”;
import { DatePicker } from ‘ant-design-vue’;
import ‘ant-design-vue/dist/antd.css’;
//设置中文
import moment from ‘moment’;
import ‘moment/locale/zh-cn’
moment.locale(‘zh-cn’);
Vue.use(DatePicker)
data() {
return {
startTime: null,
endTime: null
};
},
methods: {
moment,
startChange(date, dateString) {
this.startTime = dateString;
},
endChange(date, dateString) {
this.endTime = dateString;
},
}
更多推荐
已为社区贡献1条内容
所有评论(0)