【问题标题】:How to add a tooltip to a dxButton (DevExtreme)?如何向 dxButton (DevExtreme) 添加工具提示?
【发布时间】:2015-02-17 08:34:12
【问题描述】:

我需要这样的东西(淘汰赛):

<div class="button" data-bind="dxButton: { text: 'Save', tooltip: 'Click here to save!' }"></div>

我需要一个 dxTooltip 来显​​示给定的工具提示文本。

我不想遵循这种复杂的方式:Creating a ko.observable for each tooltip

【问题讨论】:

  • 你可以添加一个普通的工具提示,

标签: user-interface knockout.js devexpress tooltip devextreme


【解决方案1】:

您可以将可观察的内容用于工具提示...

<div data-bind="dxTooltip: { visible: visible, target: target }">
   <div data-bind="text: tooltipContent"></div>
</div>

var vm = {
    tooltipContent: ko.observable()
    //.....
};

我在这里做了一个样本http://jsfiddle.net/p3ret0vx/17/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-11-23
    • 1970-01-01
    • 2011-10-30
    • 2019-08-14
    • 2023-04-04
    • 1970-01-01
    • 1970-01-01
    • 2017-02-24
    相关资源
    最近更新 更多