<template>
  <div style="padding: 0px 10px;">
    <el-form :model="opts" label-position="left" :rules="rules" label-width="100px" class="demo-ruleForm">
      <el-form-item label="栅格" prop="span">
        <el-slider v-model="opts.span" :step="1" :min="1" :max="24" />
      </el-form-item>
      <el-form-item label="类型" prop="type">
        <el-select v-model="opts.type">
          <el-option label="date(默认)" value="date" />
          <el-option label="time(时间)" value="time" />
          <el-option label="year(年)" value="year" />
          <el-option label="month(月)" value="month" />
          <el-option label="week(周)" value="week" />
          <el-option label="dates(多选)" value="dates" />
          <el-option label="daterange(日期范围)" value="daterange" />
          <el-option label="monthrange(月份范围)" value="monthrange" />
          <el-option label="datetime(年月日时分秒)" value="datetime" />
          <el-option label="datetimerange(年月日时分秒范围)" value="datetimerange" />
        </el-select>
      </el-form-item>
      <el-form-item label="name" prop="name">
        <el-input v-model="opts.name" placeholder="name" />
      </el-form-item>
      <el-form-item label="标签" prop="labelName">
        <el-input v-model="opts.labelName" />
      </el-form-item>
      <el-form-item label="label" prop="label">
        <el-input v-model="opts.label" />
      </el-form-item>
      <el-form-item label="placeholder" prop="placeholder">
        <el-input v-model="opts.placeholder" placeholder="占位文本" />
      </el-form-item>
      <el-form-item label="开始占位文本" prop="startPlaceholder">
        <el-input v-model="opts.startPlaceholder" placeholder="开始占位文本" />
      </el-form-item>
      <el-form-item label="间隔符" prop="rangeSeparator">
        <el-input v-model="opts.rangeSeparator" placeholder="-" maxlength="1" />
      </el-form-item>
      <el-form-item label="结束占位文本" prop="endPlaceholder">
        <el-input v-model="opts.endPlaceholder" placeholder="结束占位文本" />
      </el-form-item>
      <el-form-item label="时间格式" prop="format">
        <el-input v-model="opts.format" placeholder="yyyy-MM-dd hh:mm:ss" />
      </el-form-item>
      <el-form-item label="只读" prop="readonly">
        <el-switch v-model="opts.readonly" />
      </el-form-item>
      <el-form-item label="禁用" prop="disabled">
        <el-switch v-model="opts.disabled" />
      </el-form-item>
      <el-form-item label="可输入" prop="editable">
        <el-switch v-model="opts.editable" />
      </el-form-item>
      <el-form-item label="显示清空" prop="clearable">
        <el-switch v-model="opts.clearable" />
      </el-form-item>
      <el-button>保存</el-button>
    </el-form>
  </div>
</template>

<script>
import ApDevPropBase from './base/ApDevPropBase'
import ElButton from 'element-ui/packages/button/src/button'

export default {
  name: 'ApDevDateTimeProp',
  components: { ElButton },
  extends: ApDevPropBase,
  data() {
    return {
      rules: {
        type: [
          { required: true, message: 'type必填' }
        ]
      }
    }
  },
  methods: {

  }
}
</script>

<style scoped>

</style>
