<template>
  <div class="new-bar-option">
    <div class="setting-title" @click="show = !show">
      <div>组件设置</div>
      <e class="el-icon-arrow-right" v-show="!show"></e>
      <e class="el-icon-arrow-down" v-show="show"></e>
    </div>
    <el-form size="mini" label-width="35%" v-show="show">
      <el-form-item label="图形间距">
        <el-input-number v-model="option.funnelGap"></el-input-number>
      </el-form-item>
      <el-form-item label="数据排序">
        <el-radio v-model="option.funnelSort" label="descending">倒序</el-radio>
        <el-radio v-model="option.funnelSort" label="ascending">正序</el-radio>
      </el-form-item>
      <el-form-item label="布局类型">
        <el-select v-model="option.funnelAlign" placeholder="请选择">
          <el-option
            v-for="item in dictTextAlign"
            :key="item.value"
            :label="item.label"
            :value="item.value">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="显示标签">
        <el-switch v-model="option.isLabel"></el-switch>
      </el-form-item>
      <template v-if="option.isLabel">
        <el-form-item label="标签文字颜色">
          <avue-input-color v-model="option.labelFontColor"></avue-input-color>
        </el-form-item>
        <el-form-item label="标签位置">
          <el-select v-model="option.labelPosition" placeholder="请选择">
            <el-option
              v-for="item in labelPosition"
              :key="item.value"
              :label="item.label"
              :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="显示标签">
          <el-checkbox v-model="option.isWeidu">维度</el-checkbox>
          <el-checkbox v-model="option.isZhibiao">指标</el-checkbox>
          <el-checkbox v-model="option.isBfb">百分比</el-checkbox>
        </el-form-item>
      </template>

    </el-form>
  </div>
</template>
<script>
import {labelPosition,dictTextAlign} from "../dict";
export default {
  name: "new-funnel-option",
  props: ["option"],
  data() {
    return {
      labelPosition,
      dictTextAlign,
      show: true
    };
  },
};
</script>
<style lang="scss">
.new-bar-option {
}
</style>
