| | |
| | | :row-class-name="rowClassName" |
| | | :row-style="rowStyle" |
| | | :row-key="rowKey" |
| | | :span-method="spanMethod" |
| | | :span-method="finalSpanMethod" |
| | | :stripe="stripe" |
| | | style="width: 100%" |
| | | tooltip-effect="dark" |
| | |
| | | }, |
| | | }, |
| | | props: { |
| | | parentSpanMethod: { |
| | | type: Function, |
| | | default: () => {}, |
| | | }, |
| | | isSelection: { |
| | | type: Boolean, |
| | | default: false, |
| | | default: undefined, |
| | | }, |
| | | height: { |
| | | type: String, |
| | |
| | | }, |
| | | rowKey: { |
| | | type: String, |
| | | default: undefined, |
| | | default: "id", |
| | | }, |
| | | page: { |
| | | type: Object, |
| | |
| | | }; |
| | | }, |
| | | watch: { |
| | | column(val) { |
| | | this.doLayout(); |
| | | }, |
| | | // column(val) { |
| | | // this.doLayout(); |
| | | // }, |
| | | }, |
| | | updated() { |
| | | this.$nextTick(() => { |
| | | this.$refs.multipleTable.doLayout(); |
| | | }); |
| | | }, |
| | | computed: { |
| | | finalSpanMethod() { |
| | | if(this.parentSpanMethod) { |
| | | console.log('父组件的合并方法'); |
| | | return this.parentSpanMethod; |
| | | }else{ |
| | | console.log('子组件的合并方法'); |
| | | return this.spanMethod; |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.calculateSpanInfo(); |
| | | }, |