我有一个函数“onRun”,我想创建一个快捷组合来执行这个函数。如何选择合适的组合?我尝试了很多组合,但没有一个有效。我有另一个将文件导出到 Excel 的函数,我也遇到了同样的问题。
manifest.json 文件
"sap.ui5": {
"_version": "1.1.0",
"rootView": {
"viewName": "com.volkswagen.ifdb.cc.af.view.App",
"type": "XML"
},
"dependencies": {
"minUI5Version": "1.65.0",
"libs": {
"sap.m": {},
"sap.ui.core": {},
"sap.ui.layout": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"commands": {
"Run": {
"shortcut": "Ctrl+Shift+Q"
}
},
view.xml 文件
xmlns:core="sap.ui.core"
async="true" >
<Page showHeader="false" showFooter="false" enableScrolling="true">
<Panel id="idPanel1" class="sapUiSmallMarginTop"/>
<dependents>
<core:CommandExecution id="ce_run" command="Run" enabled="true" execute="onRun" />
</dependents>
</Page>
谢谢你
我在您的代码片段中没有看到任何问题。测试快捷方式时,请注意,不允许执行与焦点无关或无焦点的命令。比照。 OpenUI5 问题 #2788.