gpt4 book ai didi

modal-dialog - Bootjack Modal生成异常:类 'TransitionEvent'没有实例getter 'relatedTarget'

转载 作者:行者123 更新时间:2023-12-03 03:27:19 26 4
gpt4 key购买 nike

我使用Rikulo / Bootjack在模态窗口中输入参数,但是dquery在DartEditor-1.10.1(Win7和Linux)中使用首选项生成了多个异常“类'TransitionEvent'没有实例getter'relatedTarget'”(运行和调试):打破异常(exception):全部。问题是什么?这是示例代码:

index.html:

<html>
<head>
<meta charset="utf-8">
<title>bootjack_test</title>
<link rel="stylesheet" href="packages/bootjack/css/bootstrap.min.css">
<script async src="main.dart" type="application/dart"></script>
</head>
<body>
<a href="#modalNewItem" role="button" class="btn btn-primary" data-toggle="modal">New item</a>
<div id="modalNewItem" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4>New item creation:</h4>
</div>
<div class="modal-body">
Item name:&nbsp;<input type="text" id="inputItemName">
</div>
<div class="modal-footer">
<button class="btn btn-default" data-dismiss="modal">Cancel</button>&nbsp;&nbsp;&nbsp;
<button class="btn btn-primary" id="btnCreateItem">Create</button>
</div>
</div>
</div>
</div>
</body>
</html>

main.dart:
import 'dart:html';
import 'package:dquery/dquery.dart';
import 'package:bootjack/bootjack.dart';

void main() {
Modal.use();
Transition.use();
Modal modal = Modal.wire(querySelector('#modalNewItem'));

$('#btnCreateItem').on('click', (QueryEvent e) {
var itemName = (querySelector('#inputItemName') as TextInputElement).value.trim();
if (itemName.length == 0) {
print('ERROR: empty item name');
} else {
print('OK: item name = $itemName');
modal.hide();
}
});
}

该问题在rikulo / bootjack的bootjack示例/模式中重现
在GitHub上,我打开了相应的发行请求: https://github.com/rikulo/bootjack/issues/25

最佳答案

修复了dquery,请运行pub upgrade将dquery升级到0.7.1 + 1。

关于modal-dialog - Bootjack Modal生成异常:类 'TransitionEvent'没有实例getter 'relatedTarget',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32349586/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com