如何解决为什么我要使用source-map定位错误的来源,而错误源始终是react-dom.production.min.js?
我想使用source-map查看我的在线React项目的错误源代码的源代码
@model IEnumerable<Game>;
@{
ViewBag.Title = "Game Select List";
}
<form method="post">
<div class="card-body sm">
<div class="card-deck">
@foreach (var game in Model)
{
var photoPath = "~/OrderImage/" + (game.PhotoUrl ?? "noImage.png");
<div id="crta" class="card m-3" style="min-width: 18rem; max-width:30%;">
<div class="card-header">
<h3>@game.Name</h3>
<h1 hidden>@game.Id</h1>
</div>
<img class="card-img-top " height="400" title="@game.Name"
src="@photoPath" asp-append-version="true">
<div class="card-footer">
<label asp-for="@game.IsSelected"></label>
<input type="checkBox" asp-for="@game.IsSelected" data-id="@game.Id" />
</div>
</div>
}
</div>
<button type="submit" onclick='submitform()'>Next</button>
</div>
</form>
@section Scripts{
<script>
$('input[type="checkBox"]').on('change',function () {
if ($(this).is(':checked')) {
$('input[type="checkBox"]').not(this).prop('checked',false);//allow only one checkBox can be selected.
}
});
function submitform() {
var id = 0;
$('input[type="checkBox"]').each(function () {
if ($(this).is(':checked')) {
id = $(this).attr("data-id");// get selected image Id to variable id.
}
});
$('<input type="hidden" name="id"/>').val(id).appendTo('form'); // add hidden input to form to pass selected image Id.
$("form").submit();
}
</script>
}
按源映射的结果
col: "26077"
id: 1
msg: "Uncaught TypeError: e.handleOk is not a function"
row: "2"
url: "http://localhost:8077/static/js/2.fcbb1d6f.chunk.js"
我想要的是结果
column: 373
msg: "Uncaught TypeError: e.handleOk is not a function"
row: 52
source: "../node_modules/react-dom/cjs/react-dom.production.min.js"
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。