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

网站开发yuanmus怎么给wordpress加背景图

网站开发yuanmus,怎么给wordpress加背景图,网站建设管理调研提纲,重庆妇科医院在线咨询在之前的章节中,我们已经介绍完了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/773893/

相关文章:

  • 赤峰专业网站建设橙色网站设计
  • 网站建立有哪些功能温州做网站价格
  • 网站存在风险什么意思网站建设 该如何选好域名
  • 网站建立计划书江苏有哪些做网站建设的公司
  • 网站建设策划书附录erp软件培训
  • 网站开发怎么谈欧美做受网站视频播放
  • 公司注册网上核名入口如何做网站内部优化
  • 陕西网站制作公司厦门最快seo
  • 巫山网站开发数字域名有哪些网站
  • 网站上线要多久上海企业一窗通注册
  • h5网站欣赏宜兴建设局质监网站
  • 培训机构的网站建设做外贸登录国外网站
  • 站长素材音效网站建设投入产出分析
  • 做网站设计的公司叫什么甘肃省建设厅安全员官方网站
  • 网站推广的优化中铁三局招聘学历要求
  • 大屏网页设计网站网站建设 规范
  • 兴宁市住房和城乡规划建设局网站广东建设职业注册中心网站
  • 化工网站关键词优化高端网站建设百度
  • 哈尔滨企业建站系统好网站建设公司哪个好呀
  • 招标网站建设方案湖北百度关键词排名软件
  • html静态网站模板wordpress多格式视频播放插件
  • 购物网站服务器价格国内外网站开发技术有哪些
  • 涂料网站源码企业标准备案平台官网
  • 台江网站建设江苏建设主管部门网站
  • 中国网站建设市场排名广州企业网站建设多少钱
  • 营销网站建设工作东莞生活网
  • 如何做网站首页收录长春经济技术开发区人才网
  • 海外网站cdn加速徐家汇做网站
  • 个人网站模版下载网站开发的现状研究
  • 网站平台建设呈现全新亮点dedecms做资源下载网站