@Aslero

Google autocomplete выдает ошибку в Nuxtjs?

Почему выдает

245:7   error  Do not use 'new' for side effects  no-new
  245:11  error  'google' is not defined            no-undef

✖ 2 problems (2 errors, 0 warnings)

                                                                                                 friendly-errors 11:22:59
 @ ./.nuxt/router.js 45:24-47:3
 @ ./.nuxt/index.js
 @ ./.nuxt/client.js
 @ multi ./node_modules/@nuxt/components/lib/installComponents.js eventsource-polyfill webpack-hot-middleware/client?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js


скрипт подключил в nuxt.config.js

инпут
<div class="auth-form__group">
          <label for="">Адрес магазина</label>
          <input
            ref="address"
            v-model="form.address"
            type="text"
            class="form-control"
          />
        </div>

метода

mounted() {
    const query = new google.maps.places.Autocomplete(this.$refs.address)
  },
  • Вопрос задан
  • 77 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы