From 367e2c2bcd0189316b82a9acd85f16ac1459eba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Mon, 5 Feb 2024 08:11:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=9D=9Etable,v-adaptive?= =?UTF-8?q?=E4=B8=8D=E8=B5=B7=E4=BD=9C=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/mdp-ui/directive/adaptive.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/mdp-ui/directive/adaptive.js b/src/components/mdp-ui/directive/adaptive.js index 3b64bab..9932cdb 100644 --- a/src/components/mdp-ui/directive/adaptive.js +++ b/src/components/mdp-ui/directive/adaptive.js @@ -2,7 +2,7 @@ const doResize = async (el, binding, vnode) => { // 获取表格Dom对象 - if(vnode.componentInstance){ + if(vnode.componentInstance && vnode.componentInstance.doLayout){ const { componentInstance: $table } = await vnode @@ -23,6 +23,7 @@ const doResize = async (el, binding, vnode) => { $table.layout.setHeight(height) $table.doLayout() }else{ + debugger; //要起作用,请先给容器添加一个默认高度,否则不起作用 // 获取调用传递过来的数据 const {