zoukankan      html  css  js  c++  java
  • Element UI 中 data 日期

    Element UI 中 data 日期

    赋值

    <template>
        <div>
          <div>
            <el-date-picker v-model="value1" type="date" placeholder="选择日期"></el-date-picker>
            <el-button type="primary" @click="setDate1">时间赋值1</el-button>
          </div>
    
          <div>
            <el-form ref="form" :model="form" label-width="80px">
              <el-form-item label="日期" prop="planTime">
                <el-date-picker
                    v-model="form.planTime"
                    size="small"
                    style=" 240px"
                    value-format="yyyy-MM-dd"
                    type="daterange"
                    range-separator="-"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期">
                </el-date-picker>
              </el-form-item>
              <el-button type="primary" @click="setDate2">时间赋值2</el-button>
            </el-form>
          </div>
        </div>
    </template>
    <script>
        /* 这是ElementUI */
        import Vue from 'vue'
        import ElementUI from 'element-ui';
        import 'element-ui/lib/theme-chalk/index.css';
        Vue.use(ElementUI);
        /* 这是ElementUI */
    
        export default {
            components:{},
            data() {
                return {
                  value1:null,
                  form: {}
                }
            },
            methods: {
              setDate1() {
                this.value1 = '2010-01-01'
              },
              setDate2() {
                this.$set(this.form, 'planTime', ['2010-01-01','2010-01-03']);
              }
            },
        };
    </script>
  • 相关阅读:
    Python 面向对象
    Python __str__()
    数据降维
    高并发相关概念
    centos7下安装kubernetes1.18
    OB-运行日志
    OB-租户(Tenant)管理
    OB-资源管理(Resource Unit/Pool)
    [转载]-基于 VMWARE Oracle Linux7.9 安装 Oracle19c RAC 详细配置方案
    OB-管理oceanbase集群参数
  • 原文地址:https://www.cnblogs.com/dafei4/p/15612435.html
Copyright © 2011-2022 走看看