ui5_Walkthrough_Step 3: 控件

1.新建文件夹03,03下新建一个文件夹webapp,分别新加两个文件03\webapp\index.html和03\webapp\index.js如下

index.html

html 复制代码
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>SAPUI5 Walkthrough</title>
	<script
		id="sap-ui-bootstrap"
		src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
		data-sap-ui-async="true"
		data-sap-ui-resourceroots='{
			"sap.ui5.walkthrough": "./"
		}'
		data-sap-ui-oninit="module:sap/ui5/walkthrough/index">
	</script>
</head>

<body>
	<div class="sapUiBody" id="content"> <!--//sapUiBody ui5框架标准特定类名-->
</body>
</html>

index.js

javascript 复制代码
sap.ui.define(["sap/m/Text", "sap/m/SliderTooltipBase"], function (Text) {
  //加载UI5 text 库文件
  "use strict"; //代码在严格模式下运行

  var text = new Text({
    text: "Hello World3",
  });

  text.placeAt("content");
});

运行结果:

相关推荐
哈哈~haha6 小时前
ui5_Walkthrough_Step 6:Modules
module·ui5·messagetoast
修电脑的猫2 年前
BTP连接cloud connector中配置的SAP
sap·abap·ui5
SAP峰※2 年前
[UI5 常用控件] 09.IconTabBar,IconTabHeader,TabContainer
sap·ui5
SAP峰※2 年前
[UI5 常用控件] 07.SplitApp,SplitContainer
sap·ui5
SAP峰※2 年前
[UI5 常用控件] 06.Splitter,ResponsiveSplitter
sap·ui5
SAP峰※2 年前
[UI5 常用控件] 02.Title,Link,Label
sap·ui5
SAP峰※2 年前
[UI5] ODATA V4中的CRUD
sap·ui5·fiori
SAP峰※2 年前
UI5与后端的文件交互(三)
sap·ui5·fiori·rap
SAP峰※2 年前
UI5与后端的文件交互(二)
sap·ui5·fiori·rap