<template>
  <div class="Equation">
    <div class="title">输入公式</div>
    <ul>
      <li>
        <el-input
          type="textarea"
          @input="changeText"
          :autosize="{ minRows: 2, maxRows: 4 }"
          v-model="text"
        ></el-input>
      </li>
    </ul>
  </div>
</template>
<script>
import bus from "@/bus/bus";
export default {
  props: ["textMsg"],
  data() {
    return {
      text: "", //文本

    };
  },
  methods: {
    // 改变文字
    changeText(val) {
      bus.$emit("updateStyle", "text", val);
    },
  },
  watch: {
    textMsg(val) {
      this.text = val;
    },
  },
};
</script>
<style lang="less" scoped>
ul,
li {
  margin: 0;
  padding: 0;
  list-style-type: none;
}
.Equation {
  .title {
    height: 47px;
    border-bottom: 1px solid #979797;
    color: #646c73;
    font-size: 16px;
    padding-left: 12px;
    box-sizing: border-box;
  }
  ul {
    width: calc(~"100% - 24px");
    margin: -1px 12px 0 12px;
    li {
      border-top: 1px solid #979797;
      .small-title {
        font-size: 12px;
        color: #8d9399;
        margin: 12px 0;
      }
      .property {
        display: flex;
        align-items: center;
        justify-content: space-around;
        .color-box {
          display: flex;
          align-items: center;
          flex-direction: column;
          .cololorSelect {
            width: 32px;
            height: 20px;
            overflow: hidden;
            position: relative;
            margin: 4px 0;
            .fix-box-1 {
              margin-top: -8px;
              margin-left: -8px;
              /deep/ .el-color-picker__trigger {
                width: 200px;
                height: 200px;
              }
            }
          }
        }
        .line-width {
          display: flex;
          align-items: center;
          flex-direction: column;
          margin-left: 8px;
          position: relative;
        }
        span {
          font-size: 12px;
          color: #1f2429;
          margin-top: 4px;
        }
      }
    }
  }
}
</style>