You may have an infinite update loop in a component render function
Posted 周紫妍
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了You may have an infinite update loop in a component render function相关的知识,希望对你有一定的参考价值。
在组件渲染函数中你可能有一个无限更新的循环
这就导致页面一直在加载无限循环下去,没有终止,卡死
在 v-for
循环当中,如果用方法或者计算属性对 vm.$data 的属性进行操作,理论上,可能因为修改到循环对象,诱发无限循环。此时 Vue 就会发出警告(并不是真的已经无限循环了)
You have ettempted to queue to many files.You may select one files.
<script type="text/javascript" src="/script/swfupload/swfupload.js"></script> <script type="text/javascript" src="/script/swfupload/swfupload.queue.js"></script> <script type="text/javascript" src="/script/swfupload/handlers.js"></script> var swfu = new SWFUpload({ upload_url: "http://www.aa.com/changeFile", // 文件上传 地址 post_params: {"name" : "huliang"}, // File Upload Settings file_size_limit : "10 MB",// 1000MB file_types : "*.doc;*.docx", file_types_description : "文档", file_upload_limit : "1", // 限制文件上传个数 为 1 file_queue_error_handler : fileQueueError, file_dialog_complete_handler : fileDialogComplete,//选择好文件后提交 // file_queued_handler : fileQuened, upload_progress_handler : uploadProgress, upload_error_handler : uploadError, upload_success_handler : uploadSuccess, upload_complete_handler : uploadComplete, button_action:SWFUpload.BUTTON_ACTION.SELECT_FILE, // Button Settings // button_image_url : "images/SmallSpyGlassWithTransperancy_17x18.png", button_placeholder_id : "uploadfile", button_width: 180, button_height: 18, button_text : ‘<span class="blue">上传</span>‘, button_text_style : ‘.blue{color:#0099cc;text-align:center;}‘, button_text_top_padding: 0, button_text_left_padding: 18, button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT, button_cursor: SWFUpload.CURSOR.HAND, // Flash Settings flash_url : "/script/swfupload/swfupload.swf", custom_settings : { upload_target : "divFileProgressContainer" }, // Debug Settings debug: false //是否显示调试窗体 }); // 选择文件后。马上提交 function fileDialogComplete(){ swfu.startUpload(); } // 文件上传成功后,回调函数 function uploadSuccess(file, serverData){ alert(serverData); myalert(0,"上传成功",function(){ <span style="color:#ff0000;">var stats = swfu.getStats(); stats.successful_uploads = 0; swfu.setStats(stats);</span> }); } // 文件上传失败,回调函数 function uploadError(){ myalert(0,"上传失败"); swfu.cleanUp(); } <pre name="code" class="plain"><span style="color:#ff0000;">当上传 1 个文件后,还想在上传,就会报 文件太多的错误。解决方法例如以下: var stats = swfu.getStats(); stats.successful_uploads = 0; swfu.setStats(stats); 这样就能够无限制的上传了。。</span>
以上是关于You may have an infinite update loop in a component render function的主要内容,如果未能解决你的问题,请参考以下文章
Why Go? – Key advantages you may have overlooked
You have ettempted to queue to many files.You may select one files.
已解决 You have 18 unapplied migration(s). Your project may not work properly until you apply the migra
You may experience an access violation when you access an STL object through a pointer or reference
You may receive an exception when you browse a .NET Framework 2.0 ASP.NET Web application