<template>
  <div class="style-ylabel">
    <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="30%" v-show="show">
      <el-form-item label="是否显示">
        <el-switch v-model="option.isTitleShow"></el-switch>
      </el-form-item>
      <el-form-item label="标题文字">
        <el-input
          v-model="option.titleText"
          placeholder="请输入标题"
          clearable
        ></el-input>
      </el-form-item>
      <el-form-item label="字体颜色">
        <avue-input-color
          v-model="option.textStyle.fontColor"
        ></avue-input-color>
      </el-form-item>
      <el-form-item label="字体大小">
        <el-input-number v-model="option.textStyle.fontSize"></el-input-number>
      </el-form-item>
      <el-form-item label="字体粗细">
        <el-select v-model="option.textStyle.fontWeight" placeholder="请选择">
          <el-option key="normal" label="默认" value="normal"></el-option>
          <el-option key="bold" label="粗" value="bold"></el-option>
          <el-option key="lighter" label="细" value="lighter"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="位置">
        <el-select v-model="option.titleAlign">
          <el-option label="左" value="left"></el-option>
          <el-option label="中" value="center"></el-option>
          <el-option label="右" value="right"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="左边距" v-show="option.titleAlign == 'left'">
        <el-input-number v-model="option.titleLeft"></el-input-number>
      </el-form-item>
      <el-form-item label="右边距" v-show="option.titleAlign == 'right'">
        <el-input-number v-model="option.titleRight"></el-input-number>
      </el-form-item>
      <el-form-item label="上边距">
        <el-input-number v-model="option.titleTop"></el-input-number>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  props: ["option"],
  data() {
    return {
      show: false,
    };
  },
  methods: {},
};
</script>
<style lang="scss">
</style>
