Browse Source

同步mdp-ui组件,1.表格自适应高度指令:支持表格、任意组件自适应高度

2.解决mdp-table中 params参数没有传递到查询接口的问题
master
陈裕财 2 years ago
parent
commit
f530ad309b
  1. 3
      src/components/mdp-ui/directive/adaptive.js

3
src/components/mdp-ui/directive/adaptive.js

@ -2,7 +2,7 @@
const doResize = async (el, binding, vnode) => { const doResize = async (el, binding, vnode) => {
// 获取表格Dom对象 // 获取表格Dom对象
if(vnode.$table){
if(vnode.componentInstance){
const { const {
componentInstance: $table componentInstance: $table
} = await vnode } = await vnode
@ -50,6 +50,7 @@ export default {
window.addEventListener('resize', el.resizeListener) window.addEventListener('resize', el.resizeListener)
}, },
update(el, binding, vnode) { update(el, binding, vnode) {
debugger;
doResize(el, binding, vnode) doResize(el, binding, vnode)
}, },
// 绑定默认高度 // 绑定默认高度

Loading…
Cancel
Save