<template>
          <el-form label-width="150px" style="margin-top:80px;">
          <el-form-item label="条件表达式：" >
            <el-input type="textarea" :autosize="{ minRows: 3, maxRows: 4}" placeholder="请输入内容" v-model="exp">
            </el-input>
          </el-form-item>
          <el-form-item label="满足条件时输出：" >
            <el-input type="textarea" :autosize="{ minRows: 3, maxRows: 4}" placeholder="请输入内容" v-model="trueOut">
            </el-input>
          </el-form-item>
          <el-form-item label="不满足条件时输出：" >
            <el-input type="textarea" :autosize="{ minRows: 3, maxRows: 4}" placeholder="请输入内容" v-model="falseOut">
            </el-input>
          </el-form-item>
        </el-form>
</template>
<script>
export default {
  data() {
    return {
      exp: '',
      trueOut: '',
      falseOutChk: false,
      falseOut: ''
    }
  },
  methods: {
    getCode() {
      let str = `<z:if condition="${this.exp}">${this.trueOut}</z:if>`
      if (this.falseOut !== '') {
        str += `<z:else>${this.falseOut}</z:else>`
      }
      return str
    },
    init() {

    }
  }
}
</script>
