<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="size">
        <el-select v-model="opts.size">
          <el-option label="medium（默认）" value="medium" />
          <el-option label="small（小）" value="small" />
          <el-option label="mini（迷你）" value="mini" />
        </el-select>
      </el-form-item>
      <el-form-item label="v-model" prop="vModel">
        <el-input v-model="opts.vModel" placeholder="绑定值" />
      </el-form-item>
      <el-form-item label="最小值" prop="min">
        <el-input v-model="opts.min" />
      </el-form-item>
      <el-form-item label="最大值" prop="max">
        <el-input v-model="opts.max" />
      </el-form-item>
      <el-form-item label="计数器步长" prop="step">
        <el-input v-model="opts.step" />
      </el-form-item>
      <el-form-item label="数值精度" prop="precision">
        <el-input v-model="opts.precision" placeholder="输入整数" />
      </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="disabled">
        <el-switch v-model="opts.disabled" />
      </el-form-item>
      <el-form-item label="只能输入倍数" prop="stepStrictly">
        <el-switch v-model="opts.stepStrictly" />
      </el-form-item>
      <el-form-item label="控制按钮" prop="controls">
        <el-switch v-model="opts.controls" />
      </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'

// 注意点：1、表单必须绑定opts。
export default {
  name: 'ApDevInputNumberProp',
  components: { ElButton },
  extends: ApDevPropBase,
  data() {
    return {
      rules: {
        type: [
          { required: true, message: 'type必填' }
        ],
        vModel: [
          { required: true, message: 'v-model必填' }
        ],
        min: [
          { required: true, message: 'min必填' }
        ],
        max: [
          { required: true, message: 'max必填' }
        ]
      }
    }
  },
  methods: {

  }
}
</script>

<style scoped>

</style>
