diff --git a/dev-demos/component/popup/layerPopup.tsx b/dev-demos/component/popup/layerPopup.tsx index df127db6b0..14b36d7573 100644 --- a/dev-demos/component/popup/layerPopup.tsx +++ b/dev-demos/component/popup/layerPopup.tsx @@ -109,6 +109,11 @@ const Demo: FunctionComponent = () => { const newPopup = new LayerPopup({ items: [ { + title: (e) => { + const h1 = document.createElement('h1'); + h1.innerText = e.name; + return h1; + }, layer: 'pointLayer', fields: [ { @@ -122,25 +127,27 @@ const Demo: FunctionComponent = () => { ], }, { + title: '线图层', layer: 'lineLayer', fields: ['name'], }, { + title: '面图层', layer: 'polygonLayer', fields: ['name'], }, ], - trigger: 'click', - }); - pointLayer.on('mousemove', (e) => { - console.log('point mousemove', e); - }); - polygonLayer.on('mousemove', (e) => { - console.log('polygon mousemove', e); - }); - lineString.on('mousemove', (e) => { - console.log('line mousemove', e); + trigger: 'hover', }); + // pointLayer.on('mousemove', (e) => { + // console.log('point mousemove', e); + // }); + // polygonLayer.on('mousemove', (e) => { + // console.log('polygon mousemove', e); + // }); + // lineString.on('mousemove', (e) => { + // console.log('line mousemove', e); + // }); newScene.addPopup(newPopup); setPopup(newPopup); diff --git a/dev-demos/component/popup/popup.tsx b/dev-demos/component/popup/popup.tsx index 3f0005b230..69ee24506a 100644 --- a/dev-demos/component/popup/popup.tsx +++ b/dev-demos/component/popup/popup.tsx @@ -220,7 +220,7 @@ const Demo: FunctionComponent = () => {