PgAdmin 4 (v5.0) 中有关闭View Data选项卡的快捷方式吗?
Ctrl+W 对此不起作用。
我有一个提供矢量切片的应用程序。磁贴中的功能是可点击的。当用户单击地图时,我会queryRenderedFeatures在单击点周围传递 mapbox-gl 的5 x 5px 边界框。
有没有办法确定 mapbox 用于查询其缓存切片的纬度边界框?我想要这个边界框,以便我可以在数据库中查询点击点周围的特征。我可以在矢量切片中使用特征的 id,但是当有 1000 个特征时,这变得很麻烦/站不住脚。
这是我在点附近获取功能的方式,其中:
map 是 mapbox 地图对象mapboxLayers 是我要查询的图层的名称point是point点击事件的属性export const getMapFeaturesNearPoint = ({ map, mapboxLayers, point }) => {
const { x, y } = point;
const halfPixels = 5;
// set bbox as 5px rectangle around clicked point
const bbox = [
[x - halfPixels, y - halfPixels],
[x + halfPixels, y + halfPixels],
];
const features = map.queryRenderedFeatures(bbox, { layers: [...mapboxLayers] …Run Code Online (Sandbox Code Playgroud) 我有一个带有吸气剂的 vuex 模块。我在 vue 组件中使用此模块的 getter:
...
computed: {
...mapGetters('myCoolModule', ['isActive', 'someOtherGetter', 'yetAnotherGetter']),
}
...
Run Code Online (Sandbox Code Playgroud)
我还有其他带有isActivegetter 的 vuex 模块,所以我想在这里给它起一个别名。我熟悉对象语法,即
...
computed: {
...mapGetters('myCoolModule', { myCoolModuleIsActive: 'isActive', someOtherGetter: 'someOtherGetter', yetAnotherGetter: 'yetAnotherGetter' }),
}
...
Run Code Online (Sandbox Code Playgroud)
但是,我不需要别名'someOtherGetter'or 'yetAnotherGetter',并且对象语法似乎要求我这样做。
是否有一种与 mapGetters 一起使用的语法,以便我只能为其中一个 getters 指定别名?