YNUtdPlatform/pages/workPlan/networkPlan/components/time-select.vue

40 lines
747 B
Vue
Raw Normal View History

<template>
<view>
<picker mode="date" fields="month" @change="onDateChange" :value="DateValue">
<!-- <view>
<text style="color: red; margin: 0 10rpx">*</text>
<text>选择时间</text>
</view> -->
<view class="time-container">
<view class="date-picker">{{ DateValue }}</view>
<text>&gt;</text>
</view>
</picker>
</view>
</template>
<script>
export default {
data() {
return {
DateValue: this.$moment().format('YYYY-MM')
}
},
methods: {
onDateChange(e) {
this.DateValue = e.detail.value
}
}
}
</script>
<style scoped>
.time-container {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 38rpx;
}
</style>