Open DashboardPackage opened 6 years ago
As shown in the figure below: 1、Set up the first worldmap panel and configure the AddLink item 2、Save the worldmap panel and add another panel 3、When you open the new panel, you will find that the AddLink item shows the value set when the panel was first built
It can be achieved dynamically to add and delete hostname and httpUrl, in order to achieve the worldmap corresponding point in the circle can jump to the corresponding httpUrl.As shown below
Related code :
AddLink
worldMap-ctrl.js { key: 'addLinked', value: function addLinked() { var newLinkData = { cityName: "", httpUrl: "" }; this.panel.linkData.push(newLinkData); this.refresh(); } },{ key: 'removeLink', value: function removeLink($index) { this.panel.linkData.splice($index, 1); this.refresh(); } },{ key: 'getCityNameOptions', value: function getCityNameOptions(arr) { return this.mapToTextValue(cityNameList); } }
But I encountered a problem when i add the feature,which is the AddLink value of the previously created panel will be the value of the Addlink panel created the second time.