【问题标题】:Tooltip bug in Kendo UI MVC Wrappers?Kendo UI MVC Wrappers 中的工具提示错误?
【发布时间】:2014-04-17 00:37:17
【问题描述】:

问题

当我们在任何选项卡中有 Kendo Tabstrip 小部件和 Kendo 工具提示小部件时发生。将鼠标悬停在工具提示激活器上时,我们收到以下错误消息:

错误

    Uncaught ReferenceError: autoHide is not defined VM3349:3
    (anonymous function)VM3349:3
    a.extend._initPopupkendo.all.min.js:15
    a.extend._showkendo.all.min.js:15
    (anonymous function)

这里是出现错误的匿名函数:

(function(data
/**/) {
var o,e=kendo.htmlEncode;o='<div role="tooltip" class="k-widget k-tooltip';if (!autoHide) {;o+=' k-tooltip-closable';};o+='">';if (!autoHide) {;o+=' <div class="k-tooltip-button"><a href="#" class="k-icon k-i-close">close</a></div> ';};o+='<div class="k-tooltip-content"></div>';if (callout){ ;o+='<div class="k-callout k-callout-'+(dir)+'"></div>';};o+='</div>';return o;
})

更多

值得注意的是,我们还在标签条中使用了许多其他 Kendo 小部件(例如日历),并且所有小部件都可以正确呈现和运行,但工具提示小部件除外。

最后,我们的所有 Kendo MVC 小部件脚本都被推迟了。下面是我们如何设置的一个基本示例:

<script  src="jquery.min.js"></script>
<script  src="kendo.all.min.js"></script>
<script  src="kendo.aspnetmvc.min.js"></script>

<script data-main="main" src="require.js"></script>

@Html.Kendo().DeferredScripts(True)        

有什么想法或可能的已知解决方法吗?

使用 v2014.1.318

更新

我们已经进行了进一步的测试,似乎简单地使用 requirejs 呈现工具提示(使用 MVC 包装器或 Kendo UI Web)会导致所描述的错误。这似乎是一个错误,并且可能是 Kendo 工具提示小部件内部使用的引用的“autoHide”变量的范围问题。

【问题讨论】:

  • 看起来您正在加载脚本 2 次...这可能是问题的一部分
  • 我不确定你的意思?我们目前正在处理 requirejs 之外的完整缩小文件。我们不会通过 requirejs 重新加载这些缩小的文件。
  • 对不起,我误解了@Html.Kendo().DeferredScripts(true)

标签: jquery kendo-ui kendo-asp.net-mvc


【解决方案1】:

这是一个使用 RequireJS 加载 Kendo 的工具提示示例:http://trykendoui.telerik.com/@mishoo/ikAt/2

对我来说一切都很好。我不确定您所说的 “使用 requirejs 呈现工具提示(使用 MVC 包装器或 Kendo UI Web)” 是什么意思,但也许如果您粘贴在浏览器中呈现的 HTML(使用查看源代码),我们能猜出来。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多