From a7dbe361da9054037380b1a9caf5a1ae4a85db31 Mon Sep 17 00:00:00 2001 From: purocean Date: Sat, 30 Oct 2021 20:25:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(embed):=20=E4=BF=AE=E5=A4=8D=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=9C=B0=E5=9D=80=E5=8F=98=E5=8C=96=E5=B5=8C=E5=85=A5?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E4=B8=8D=E6=9B=B4=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/support/embed.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/support/embed.ts b/src/renderer/support/embed.ts index e6253952..1b6c6639 100644 --- a/src/renderer/support/embed.ts +++ b/src/renderer/support/embed.ts @@ -1,6 +1,7 @@ import { debounce } from 'lodash-es' import { defineComponent, h, IframeHTMLAttributes, onBeforeMount, onBeforeUnmount, PropType, ref, watch } from 'vue' import { useBus } from '@fe/core/bus' +import { md5 } from '@fe/utils' /** * 构建一个嵌入页面的 src 路径 @@ -10,7 +11,7 @@ import { useBus } from '@fe/core/bus' * @returns src 路径 */ export function buildSrc (html: string, title = '', globalStyle = false) { - return `/embed/#title=${encodeURIComponent(title)}&with-global-style=${globalStyle}&html=${encodeURIComponent(html)}` + return `/embed/?_=${md5(html)}#title=${encodeURIComponent(title)}&with-global-style=${globalStyle}&html=${encodeURIComponent(html)}` } /**