licp
2024-07-23 f3fa8866591600d5791d78c99396f4553f169aef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<template>
  <div>
    <el-input
      type="textarea"
      :autosize="{ minRows: 2, maxRows: 4 }"
      placeholder="请输入内容"
      v-model="formula"
      @change="evalResult"
      @input="inputValue"
    >
    </el-input>
  </div>
</template>
 
<script>
export default {
    props: {
        returnFormula: {
            type: Function,
            default: () => {return Function}
        }
    },
  data() {
    return {
        formula: ""
    };
  },
  methods: {
    // 回显
    evalResult() {
        this.returnFormula(this.formula)
    },
    inputValue(val) {
        let lastChar2 = val.slice(-1);
        
    }
  }
};
</script>