| | |
| | | <template> |
| | | <div> |
| | | <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid" style="overflow: hidden"> |
| | | <avue-crud v-model="form" |
| | | :data="tableList" |
| | | :option="option" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | clientHeight:0, |
| | | parentHeight:'100%',//当前组件根节点元素高度 |
| | | form: {}, |
| | | formName: '', |
| | | loading: false, |
| | |
| | | ], |
| | | } |
| | | }, |
| | | mounted() { |
| | | console.log('componentVO',this.componentVO) |
| | | }, |
| | | computed: { |
| | | option() { |
| | | option() { |
| | | return { |
| | | index: true, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | height: 'auto', |
| | | height: this.parentHeight, |
| | | calcHeight: 15, |
| | | indexFixed: false, |
| | | menuFixed: false, |
| | | column: this.updatedColumns, |
| | |
| | | }); |
| | | }, |
| | | }, |
| | | watch:{ |
| | | clientHeight: { |
| | | handler(newval) { |
| | | if(newval>50){ |
| | | //父元素高度-按钮高度-分页高度 |
| | | this.parentHeight=this.$el.clientHeight-this.$children[0].$children[1].$children[0].$el.clientHeight-this.$children[0].$children[2].$el.clientHeight; |
| | | console.log(this.parentHeight) |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.clientHeight=this.$el.clientHeight; |
| | | }, |
| | | methods: { |
| | | buttonClick(scope, item) { |
| | | this.formName = item.name; |