使用 VueJS 上传护理。 jQuery 从今天早上开始出现异常 onSuccess
Uploadcare with VueJS. jQuery Exception onSuccess since this morning
我已经通过 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": {}
}
为了以防万一,我尝试了很多浏览器。
有什么建议吗?
这里是Uploadcare的回答,如果大家有同样的问题:
Most likely, the error is caused by this line of code in
uploadcare-vue
https://github.com/tipeio/uploadcare-vue/blob/master/src/Uploadcare.vue#L141
The openDialog takes 3 arguments - files, tab, and options. The tab
argument could be omitted in versions < 3.8.1, but in the latest
version, omitting this argument leads to an error. We're going to
release a fix in a few days. At the moment, you can try to roll back
to v3.8.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": {}
}
为了以防万一,我尝试了很多浏览器。
有什么建议吗?
这里是Uploadcare的回答,如果大家有同样的问题:
Most likely, the error is caused by this line of code in uploadcare-vue
https://github.com/tipeio/uploadcare-vue/blob/master/src/Uploadcare.vue#L141
The openDialog takes 3 arguments - files, tab, and options. The tab argument could be omitted in versions < 3.8.1, but in the latest version, omitting this argument leads to an error. We're going to release a fix in a few days. At the moment, you can try to roll back to v3.8.0.