0

我已经通过 uploadcare-vue 包装器完美地使用 Uploadcare 一周了。从今天早上开始,我有一个停止脚本的 jQuery 异常。当然,我没有使用可以以任何方式干扰他们的脚本的 jQuery。

jQuery.Deferred exception: settings is undefined openDialog/currentDialogPr<@webpack-internal:///./node_modules/uploadcare-widget/uploadcare.js:13882:11
fire@webpack-internal:///./node_modules/jquery/dist/jquery.js:3291:31
fireWith@webpack-internal:///./node_modules/jquery/dist/jquery.js:3421:7
Deferred/</deferred[tuple[0]]@webpack-internal:///./node_modules/jquery/dist/jquery.js:3759:36
compose/<@webpack-internal:///./node_modules/uploadcare-widget/uploadcare.js:444:22
mightThrow@webpack-internal:///./node_modules/jquery/dist/jquery.js:3557:29
resolve/</process<@webpack-internal:///./node_modules/jquery/dist/jquery.js:3625:12
 undefined

我创建了一个全新的 Nuxt 存储库,以确保它不是来自我的代码:

<template>
  <div class="container">
    <Uploadcare :publicKey="uploadCarePublicKey" @success="onSuccess">
      <button>New Asset</button>
    </Uploadcare>
  </div>
</template>

<script>
import Uploadcare from 'uploadcare-vue'

export default {
  components: {
    Uploadcare
  },
  data() {
    return {
      uploadCarePublicKey: process.env.UPLOADCARE_PUBLIC_KEY
    }
  },
  methods: {
    onSuccess() {
      console.log('dede')
    }
  }
}
</script>

<style></style>
{
  "name": "toto",
  "version": "1.0.0",
  "description": "My awesome Nuxt.js project",
  "author": "K",
  "private": true,
  "scripts": {
    "dev": "nuxt",
    "build": "nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate"
  },
  "dependencies": {
    "@nuxtjs/axios": "^5.3.6",
    "@nuxtjs/dotenv": "^1.4.0",
    "@nuxtjs/pwa": "^3.0.0-0",
    "nuxt": "^2.0.0",
    "uploadcare-vue": "^1.0.0"
  },
  "devDependencies": {}
}

为了以防万一,我尝试了许多浏览器。

有小费吗?

4

1 回答 1

0

如果有人有同样的问题,这是 Uploadcare 的答案:

很可能,错误是由uploadcare-vue中的这行代码引起的

https://github.com/tipeio/uploadcare-vue/blob/master/src/Uploadcare.vue#L141

openDialog 接受 3 个参数 - 文件、选项卡和选项。tab 参数在版本 < 3.8.1 中可以省略,但在最新版本中,省略此参数会导致错误。我们将在几天后发布修复程序。目前,您可以尝试回滚到 v3.8.0。

于 2020-01-06T09:52:08.117 回答