Jsxg.vue 1.29 KB
Newer Older
fukai committed
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
<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.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>