From 7c5fa7610d0304acd46fbdafea2eaec14e16c4c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Wed, 12 Oct 2022 21:30:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=B0=E5=A2=9E=E4=B8=89=E7=BB=B4?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Decorates/Three/ThreeEarth01/index.ts | 2 +- .../components/Decorates/Three/ThreeEarth01/index.vue | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/packages/components/Decorates/Three/ThreeEarth01/index.ts b/src/packages/components/Decorates/Three/ThreeEarth01/index.ts index 0780682a..fbaf4b75 100644 --- a/src/packages/components/Decorates/Three/ThreeEarth01/index.ts +++ b/src/packages/components/Decorates/Three/ThreeEarth01/index.ts @@ -6,7 +6,7 @@ export const ThreeEarth01Config: ConfigType = { key: 'ThreeEarth01', chartKey: 'VThreeEarth01', conKey: 'VCThreeEarth01', - title: '时钟', + title: '三维地球', category: ChatCategoryEnum.THREE, categoryName: ChatCategoryEnumName.THREE, package: PackagesCategoryEnum.DECORATES, diff --git a/src/packages/components/Decorates/Three/ThreeEarth01/index.vue b/src/packages/components/Decorates/Three/ThreeEarth01/index.vue index 0603c6d9..057dac40 100644 --- a/src/packages/components/Decorates/Three/ThreeEarth01/index.vue +++ b/src/packages/components/Decorates/Three/ThreeEarth01/index.vue @@ -18,6 +18,8 @@ const props = defineProps({ } }) +const chartEditStore = useChartEditStore() + const chartRef = ref() const { w, h } = toRefs(props.chartConfig.attr) let threeClassInstance: World @@ -64,6 +66,11 @@ watch( // DOM 渲染之后进行初始化 onMounted(() => { try { + if (navigator.userAgent.indexOf('Chrome') < -1 || navigator.userAgent.indexOf('Edg') > -1) { + window['$message'].error('此组件仅在【谷歌】浏览器上能正常展示!') + chartEditStore.removeComponentList(undefined, false) + return + } init() } catch (error) { console.log(error)