<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="checkbox（默认)" value="checkbox" />
          <el-option label="button（按钮类型）" value="button" />
        </el-select>
      </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="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" placeholder="labelName" />
      </el-form-item>
      <el-form-item label="min" prop="min">
        <el-input v-model="opts.min" placeholder="最小勾选数量" />
      </el-form-item>
      <el-form-item label="max" prop="max">
        <el-input v-model="opts.max" placeholder="最大勾选数量" />
      </el-form-item>
      <el-form-item label="边框（默认）" prop="border">
        <el-switch v-model="opts.border" />
      </el-form-item>
      <el-form-item label="启用全选" prop="isIndeterminate">
        <el-switch v-model="opts.isIndeterminate" />
      </el-form-item>
      <el-form-item label="禁用" prop="disabled">
        <el-switch v-model="opts.disabled" />
      </el-form-item>
      <el-form-item label="选中时的文本颜色（按钮）" prop="textColor">
        <el-color-picker v-model="opts.textColor" show-alpha size="small" />
      </el-form-item>
      <el-form-item label="选中时的填充颜色（按钮）" prop="fill">
        <el-color-picker v-model="opts.fill" show-alpha :predefine="predefineColors" size="small" />
      </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: 'ApDevCheckboxProp',
  components: { ElButton },
  extends: ApDevPropBase,
  data() {
    return {
      predefineColors: [
        '#409EFF'
      ],
      rules: {
        type: [
          { required: true, message: 'type必填' }
        ]
      }
    }
  },
  methods: {

  }
}
</script>

<style scoped>

</style>
