您好,在您提供的项目中,CommandMap中有两个Welcome对象,看不懂您的代码想要实现的效果,无法帮您改写。
不过如果只是想要点击后有输出的效果,请参考以下代码:
config.commandMap = {
Welcome: {
title: "Save data to server",
text: "Save",
iconClass: "cmdSaveData",
bigButton: "true",
commandName: "cmdSaveData",
execute: getTemplates,
},
};
config.ribbon[0].buttonGroups.unshift({
label: "打印",
thumbnailClass: "Frequently used operations",
commandGroup: {
children: [
{
direction: "vertical",
commands: ["Welcome"],
},
],
},
});
或者参考:https://demo.grapecity.com.cn/sp ... and-dynamic-updates
|