【发布时间】:2020-04-30 04:16:55
【问题描述】:
我目前在我的 VueJS Web 应用程序中收到以下错误。
utc_offset 自 2019 年 11 月起已弃用,并将在 2020 年 11 月。请改用 utc_offset_minutes。
根据Google Maps API documentation:
Places 字段 opening_hours.open_now 和 utc_offset 已弃用 自 2019 年 11 月 20 日起,将于 2020 年 11 月 20 日关闭。 这些字段仅在 Places Library、Maps 中被弃用 JavaScript API。本指南向您展示如何更新代码以停止 使用这些字段。
唯一的问题是,我绝对不直接在我的 Vue 应用程序中的任何地方使用 utc_offset。我通过在我的应用程序中对单词“utc_offset”进行全局查找来验证这一点。我也不记得访问过那个特定的属性。
如果我没有使用该属性,为什么会收到此弃用警告?
下面是我的堆栈跟踪的样子:
以下代码 sn-p 显示了clearAllCardsAndFilters 方法的作用。
methods: {
clearAllCardsAndFilters() {
this.clearActiveCardListingId();
this.clearFilterCards();
},
clearActiveCardListingId() {
this.$store.commit('clearActiveCardListingId');
},
以下代码 sn-p 显示了 Vuex 中的 clearActiveCardListingId 突变的作用。它只是将 Vuex 中的 activeCardListingId 属性设置为 null。
clearActiveCardListingId(state) {
state.activeCardListingId = null;
},
【问题讨论】:
-
也许如果您请求地点详细信息而不指定任何
fields,这将返回 所有 字段(由于计费,您应该避免使用这些字段)。没有看到您的代码,无论如何都无法说出,所以我会投票结束您的问题...
标签: javascript google-maps vue.js google-maps-api-3 vuex