From 0bb9c035f77588c58d36b3fd45d89b9730cd70d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=A0=E6=9C=A8?= Date: Fri, 10 Sep 2021 11:22:40 +0800 Subject: [PATCH] fix(markdown): `value` not worked on init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复Markdown组件的value属性初始值不起作用的问题 --- CHANGELOG.zh_CN.md | 1 + src/components/Markdown/src/Markdown.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.zh_CN.md b/CHANGELOG.zh_CN.md index 54142c3bf27..18ca68d05ad 100644 --- a/CHANGELOG.zh_CN.md +++ b/CHANGELOG.zh_CN.md @@ -13,6 +13,7 @@ - **BasicTable** - 修复可编辑单元格的内容为空时,不会显示编辑图标的问题 - 修复表尾合计行与表格主体部分的列有时候未能对齐的问题 +- **MarkDown** 修复初始 value 属性的值不起作用的问题 - **其它** - 修复部分封装组件在使用插槽时报错的问题 - 修复`useECharts`的`theme`参数不起作用的问题 diff --git a/src/components/Markdown/src/Markdown.vue b/src/components/Markdown/src/Markdown.vue index 0727fb7b63c..d8117631cbd 100644 --- a/src/components/Markdown/src/Markdown.vue +++ b/src/components/Markdown/src/Markdown.vue @@ -38,7 +38,7 @@ const { getLocale } = useLocale(); const { getDarkMode } = useRootSetting(); - const valueRef = ref(''); + const valueRef = ref(props.value || ''); watch( [() => getDarkMode.value, () => initedRef.value],