<template>
    <Alert style="width: 100%"><span v-html = "showFormulaParam(value)" @click="OnClick"></span></Alert>
</template>
<script>

import { formatFormulaParam } from './formulaAnalysis'

export default {
  props: ['value'],
  methods: {
    showFormulaParam (formulaParam, inArray) {
      return formatFormulaParam(formulaParam)
    },
    OnClick (event) {
      if (event.target.nodeName === 'A') {
        let button = event.target
        let start = button.attributes['start'].value
        let formulaName = button.attributes['name'].value
        this.$emit('ParamFormulaClick', { 'formulaName': formulaName, 'start': start })
      }
    }
  }
}
</script>
<style>
.paramformula {
    padding: 0px;
    color:blue;
}
</style>
