当前位置: 首页 > news >正文

游戏开发物语破解版seo快速排名上首页

游戏开发物语破解版,seo快速排名上首页,抓取网站url,潍坊免费自助建站模板在之前的章节中,我们已经介绍完了MVC的架构和实现,现在我们来讲一下,SAPUI5的结构 这一步,我们将所有的UI资产从index.html里面独立封装在一个组件里面 这样组件就变得独立,可复用了。这样,无所什么时候我…

在之前的章节中,我们已经介绍完了MVC的架构和实现,现在我们来讲一下,SAPUI5的结构

这一步,我们将所有的UI资产从index.html里面独立封装在一个组件里面

这样组件就变得独立,可复用了。这样,无所什么时候我们去访问资源的时候,我们都直接访问组件文件而不是index.html。这种方式使得我们的app变得更加灵活

文件拆分之后长这样

首先,我们先新建一个Component.js

webapp/Component.js (New)

sap.ui.define(["sap/ui/core/UIComponent"
], (UIComponent) => {"use strict";return UIComponent.extend("", {init() {// call the init function of the parentUIComponent.prototype.init.apply(this, arguments);}});
});
sap.ui.define(["sap/ui/core/UIComponent","sap/ui/model/json/JSONModel","sap/ui/model/resource/ResourceModel"
], (UIComponent, JSONModel, ResourceModel) => {"use strict";return UIComponent.extend("ui5.walkthrough.Component", {metadata : {"interfaces": ["sap.ui.core.IAsyncContentCreation"],"rootView": {"viewName": "ui5.walkthrough.view.App","type": "XML","id": "app"}},init() {// call the init function of the parentUIComponent.prototype.init.apply(this, arguments);// set data modelconst oData = {recipient : {name : "World"}};const oModel = new JSONModel(oData);this.setModel(oModel);// set i18n modelconst i18nModel = new ResourceModel({bundleName: "sap.ui.demo.walkthrough.i18n.i18n"});this.setModel(i18nModel, "i18n");}});
});

接下来,我们去修改App.controller.js

sap.ui.define(["sap/ui/core/mvc/Controller","sap/m/MessageToast"
], (Controller, MessageToast) => {"use strict";return Controller.extend("ui5.walkthrough.controller.App", {onShowHello() {// read msg from i18n modelconst oBundle = this.getView().getModel("i18n").getResourceBundle();const sRecipient = this.getView().getModel().getProperty("/recipient/name");const sMsg = oBundle.getText("helloMsg", [sRecipient]);// show messageMessageToast.show(sMsg);}});
});

修改index.js

webapp\index.js

sap.ui.define(["sap/ui/core/ComponentContainer"
], (ComponentContainer) => {"use strict";new ComponentContainer({name: "ui5.walkthrough",settings : {id : "walkthrough"},async: true}).placeAt("content");
});

Conventions

  • The component is named Component.js.

  • Together with all UI assets of the app, the component is located in the webapp folder.

  • The index.html file is located in the webapp folder if it is used productively.

最终实现效果还是和之前一样

http://www.hengruixuexiao.com/news/44818.html

相关文章:

  • 天津市建设工程信息网站上海优化seo公司
  • 如何做古诗词网站做seo如何赚钱
  • 济源交友网站开发公司百度seo快速见效方法
  • 用深度liunx做网站交换友情链接的条件
  • 网站模板是指网站内容的总体结构和页面格式总体规划色盲能治好吗
  • 过年做哪个网站能致富seo优缺点
  • 怎么盗号网站怎么做代做百度首页排名价格
  • 广东省建设工程造价管理协会网站汕头网站推广排名
  • wordpress免邮箱 注册象山关键词seo排名
  • 西安网站建设哪家比较好长春seo排名外包
  • dw网页设计位置1seo专业优化公司
  • 企业网站建设目的怎么注册域名网址
  • 免费隐私网站推广app网络推广加盟
  • 做网站360业务外贸建站网站推广
  • 如何给网站做防盗链网络优化需要哪些知识
  • 会计公司网站模板b2b免费发布平台
  • 想学程序员去哪里学网络优化工作内容
  • 多域名指向同一网站推广任务发布平台app
  • 网站域名和备案公司可以不一样么莆田百度快照优化
  • 官方网站建设 磐石网络知名香港域名注册网站
  • 网站怎么做外部优化嵌入式培训机构哪家好
  • 源码网站违法吗推广app大全
  • 网站模板 阿里网站建设方案外包
  • 套模板网站价格表关键词查询的分析网站
  • 小企业网站建设的措施产品营销方案策划书
  • 怎么做网站关键字seo上排名
  • 北京网站建设套餐seo关键词优化服务
  • 免费的网站模板哪里有搜索引擎优化公司
  • 广州市新冠疫情最新消息刷移动端seo软件
  • dw网页设计模板100套武汉seo招聘网