<el-date-picker
    v-model="value1"
    type="date" class="input-class">
</el-date-picker>
data(){
      return{
          value1=‘’
      }
}
 methods:{
       getdatatime(){//默认显示今天
      this.value1= new Date();
    },
 }
 mounted() {
    let that = this;
    that.getdatatime()
  }
 <!--设置大小-->
  <style>
 .input-class{
    width: 150px;
    height: 30px;
  }
    </style>复制代码
Logo

前往低代码交流专区

更多推荐