<template> <div class="eibs-tab" ref="ptab"> <c-row> <c-col :span="24" style="padding: 8px 0;font-size: 16px;margin-top: 5px;"> 简式修改内容 </c-col> <c-col :span="24"> <el-form-item prop="swiadd.ameblk" label-width="0"> <c-xml-format-editor v-model="model.swiadd.ameblk" :disabled="model.nidgrp.ghdflg==''|| model.nitamep.plateflg=='' || isInDisplay" placeholder="请输入修改内容文本" :isShowScale="true" :heightStr="heightStr" ></c-xml-format-editor> </el-form-item> </c-col> </c-row> </div> </template> <script> import event from "../event"; import commonDepend from "~/mixin/commonDepend"; export default { components: {}, inject: ["root"], props: ["model", "codes"], mixins: [event, commonDepend], data() { return { heightStr:'400px', }; }, methods: { resizeFunction(){ let height = this.$refs.ptab.offsetHeight height = height - 35 -45 - 50 if(height < 400){ height = 400 } this.heightStr = height + "px" }, }, watch:{ }, mounted(){ this.$ob = new ResizeObserver(()=>{ this.resizeFunction() }) this.$ob.observe(this.$refs.ptab) this.resizeFunction() }, beforeDestroy(){ this.$ob.disconnect(); }, created () {}, }; </script> <style scoped lang="less"> </style>