mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Dialog): failed to render when toggling allowHtml (#7968)
This commit is contained in:
parent
c30740ecc5
commit
f157e99534
@ -120,7 +120,12 @@ export default createComponent({
|
||||
if (message) {
|
||||
const hasTitle = title || slots.title;
|
||||
return (
|
||||
<div class={bem('content', { isolated: !hasTitle })}>
|
||||
<div
|
||||
// add key to force re-render
|
||||
// see: https://github.com/youzan/vant/issues/7963
|
||||
key={allowHtml ? 1 : 0}
|
||||
class={bem('content', { isolated: !hasTitle })}
|
||||
>
|
||||
<div
|
||||
class={bem('message', {
|
||||
'has-title': hasTitle,
|
||||
|
Loading…
x
Reference in New Issue
Block a user