我将sbt从sap.ui.define([
"sap/ui/core/mvc/Controller",
], function (Controller, FragmentController) {
"use strict";
var base, oRouter;
return Controller.extend("SapUI5Tutorial.Application.Main.views.ThirdPage", {
onInit: function () {
base = this;
base.getView().setModel(oModel);
oRouter = sap.ui.core.UIComponent.getRouterFor(base);
oRouter.getRoute("FirstPage").attachMatched(base.firstPagePatternMatched, base);
oRouter.getRoute("SecondPage").attachMatched(base.secondPagePatternMatched, base);
},
firstPagePatternMatched: function (oEvent) {
console.log(oEvent)
},
secondPagePatternMatched: function (oEvent) {
//Due to the third page is used for inside two other pages (FirstPage and SecondPage) this function is running twice
console.log(oEvent)
}
});
升级到sbt-0.13.16
,我的以下代码已损坏
sbt-1.2.8
这是我遇到的错误
lazy val gruntDirectory = baseDirectory {
_ / "public"
}
unmanagedResourceDirectories in Assets += gruntDirectory { _ / "node_modules"}
我该如何解决这个问题
答案 0 :(得分:0)
您需要使用.value
来提取设置的值:
unmanagedResourceDirectories in Assets += baseDirectory.value / "public" / "node_modules"
如果您想为其他内容定义gruntDirectory
,可以这样做:
lazy val gruntDirectory = Def.setting { baseDirectory.value / "public" }
unmanagedResourceDirectories in Assets += gruntDirectory.value / "node_modules"
请注意,您只能在.value
/ :=
/ +=
/ ++=
分配的右侧或~=
内部使用Def.{setting, task, taskDyn, inputTask, inputTaskDyn}