Open a857430369 opened 1 month ago
const renderOption = ({node, option}) => { node.children[0].children[0] = h(FTipBtn, option?.tipProps, h(NButton, { text: true }, option.label)); return node // return h(FTipBtn, props.option?.tipProps, h(NButton, { text: true }, props.node)); } const renderLabel = (option)=>{ return '' }
我看我这样解决了
提供个在线复现链接
test1.xlsx 后缀改一下为html 悬浮到其它那就报错了
prefer online demo with codesandbox
this is not a working URL check it
Copy the link to browser access
描述错误
vue: ` <n-dropdown v-if="child.menus" placement="top-start" size="medium" :options="child.menus" @select="(key, option) => onSelect(option)" :render-option="renderOption" style="display: flex;flex-direction: column;align-items: start;"> <n-button v-bind="child.props" icon-placement="right" @click="onSelect(child)" :disabled="disabled">
`
JS:
const renderOption = (props) => { return h(FTipBtn, props.option?.tipProps, h(NButton, { text: true }, props.node)); }
出现了 Cannot read properties of null (reading 'getBoundingClientRect')
复现步骤
1.<n-dropdown v-if="child.menus" placement="top-start" size="medium" :options="child.menus" @select="(key, option) => onSelect(option)" :render-option="renderOption" style="display: flex;flex-direction: column;align-items: start;"> <n-button v-bind="child.props" icon-placement="right" @click="onSelect(child)" :disabled="disabled">
最小复现链接
/
系统信息
使用的包管理器
npm
验证