使用DeVexTreme Vue组件,是否有任何方法可以自定义默认按钮'标签,就像“确定”和“取消”

发布于 2025-02-13 21:27:52 字数 94 浏览 1 评论 0原文

经过标签框组件的大部分API文档后,我仍然没有弄清楚如何自定义本地化和更好的UX的“确定”和“取消”标签。

我还没有发现任何道具吗?

提前致谢 !

After going through much of the API documentation of the TagBox component, I still haven't figured out how to customize the "OK" and "Cancel" labels for localization and better UX.

Are there any props that I haven't figured out yet that exist for this ?

Thanks in advance !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花开浅夏 2025-02-20 21:27:52

您可以使用jQuery更改“获取按钮元素”并更改标签,当内容准备就绪或打开下拉列表时,这可以使用,请检查事件。

实现自己的按钮:

$('...').dxTagBox({
   items: [...],
   showSelectionControls: true,
   applyValueMode: 'useButtons',

   dropDownOptions: {

       toolbarItems: [
       {
           location: "center",
           options: {
               text: 'CUSTOM OK', 
               onClick: function() {
                  // Check documentation
                  // Get selected items
                  // Apply to the tagBox instance
                  }, 
            
              },
           shortcut: "done",
           toolbar: "bottom" 
       }
           ...
       ]

   }
});

You could change get the button elements with jquery and change the label, this works when the content is ready or when the dropdown is open, check the events.

Or

Implement your own buttons:

$('...').dxTagBox({
   items: [...],
   showSelectionControls: true,
   applyValueMode: 'useButtons',

   dropDownOptions: {

       toolbarItems: [
       {
           location: "center",
           options: {
               text: 'CUSTOM OK', 
               onClick: function() {
                  // Check documentation
                  // Get selected items
                  // Apply to the tagBox instance
                  }, 
            
              },
           shortcut: "done",
           toolbar: "bottom" 
       }
           ...
       ]

   }
});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文