fix: 新增三维组件限制
This commit is contained in:
parent
a43b9fbdec
commit
bfbc7edd31
@ -6,7 +6,7 @@ export const ThreeEarth01Config: ConfigType = {
|
|||||||
key: 'ThreeEarth01',
|
key: 'ThreeEarth01',
|
||||||
chartKey: 'VThreeEarth01',
|
chartKey: 'VThreeEarth01',
|
||||||
conKey: 'VCThreeEarth01',
|
conKey: 'VCThreeEarth01',
|
||||||
title: '时钟',
|
title: '三维地球',
|
||||||
category: ChatCategoryEnum.THREE,
|
category: ChatCategoryEnum.THREE,
|
||||||
categoryName: ChatCategoryEnumName.THREE,
|
categoryName: ChatCategoryEnumName.THREE,
|
||||||
package: PackagesCategoryEnum.DECORATES,
|
package: PackagesCategoryEnum.DECORATES,
|
||||||
|
@ -18,6 +18,8 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const chartEditStore = useChartEditStore()
|
||||||
|
|
||||||
const chartRef = ref<HTMLElement>()
|
const chartRef = ref<HTMLElement>()
|
||||||
const { w, h } = toRefs(props.chartConfig.attr)
|
const { w, h } = toRefs(props.chartConfig.attr)
|
||||||
let threeClassInstance: World
|
let threeClassInstance: World
|
||||||
@ -64,6 +66,11 @@ watch(
|
|||||||
// DOM 渲染之后进行初始化
|
// DOM 渲染之后进行初始化
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
try {
|
try {
|
||||||
|
if (navigator.userAgent.indexOf('Chrome') < -1 || navigator.userAgent.indexOf('Edg') > -1) {
|
||||||
|
window['$message'].error('此组件仅在【谷歌】浏览器上能正常展示!')
|
||||||
|
chartEditStore.removeComponentList(undefined, false)
|
||||||
|
return
|
||||||
|
}
|
||||||
init()
|
init()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user