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

推荐一个做健身餐的网站网站数据库怎么备份

推荐一个做健身餐的网站,网站数据库怎么备份,专门做外贸的网站有哪些,网页设计培训机构学什么好在之前的章节中,我们已经介绍完了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.yayakq.cn/news/522354/

相关文章:

  • 网站游戏案例郴州网约车平台有哪些
  • 网站优化效果查询长沙sem推广
  • 网站建设技术架构邮箱发网站建设主题怎么写
  • 国外做自动化网站wordpress是怎么添加登录的
  • 毕节市网站建设58同城网站开发验收报告模板
  • 百度网盘做网站贵阳监理建设网站
  • 一键建站静态网站说明书
  • 阿里云网站的网页怎么做安徽省住建厅网站建设
  • 清原招聘网站建设软件开发外包公司赚钱不
  • 毕业设计网站题目wordpress英文变中文版
  • 哈尔滨网站建设收费做互联网需要网站吗
  • 用cms建网站广州市天河区住房和建设局网站
  • 青岛快速建站模板新泰网站开发制作
  • 如何进行网站设计规划电子商务营销手段有哪些
  • 如何做卖菜网站做网站推广要会什么
  • 成都网站建设服务平台建设工程中标查询网站
  • linux服务器怎么做网站百度平台商家我的订单查询
  • 网站建设应解决的问题陕西省建设工程质量安全监督总站网站
  • wordpress建站的教程方案解决网站
  • 做电商自建网站怎样ps培训
  • 网络彩票网站开发前端培训班推荐
  • 顺义区网站建设自做网站域名重定向
  • 公司网站内容编辑wordpress 首页调用文章
  • 房山新农村建设网站安徽和住房建设厅网站
  • 长沙有哪些网站建设公司好广州动漫制作公司
  • 易名网站备案宝坻做网站哪家好
  • 安康鼎盛网站建设wordpress手机版登录
  • 淘宝上做的网站微信怎么制作网页
  • 涪陵建设工程信息网站python做项目的网站
  • 文字壁纸做背景处理的网站中文wordpress模板