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");
});

运行结果:

相关推荐
哈哈~haha17 天前
UI5_Walkthrough_Step 16: 对话框(Dialogs)和片段(Fragments)
dialog·ui5·fragment
哈哈~haha17 天前
UI5_Walkthrough_Step 17: Fragment Callbacks 对话框按钮事件处理 && Step 18: Icons图标使用
dialog·icon·ui5·callback
哈哈~haha17 天前
Step 14: Custom CSS and Theme Colors 自定义CSS类
前端·css·ui5
哈哈~haha17 天前
UI5_Walkthrough_Step 11: Pages and Panels
page·panel·ui5
哈哈~haha18 天前
Step 12: Shell Control as Container && Step 13:Margins and Paddings 使用CSS类对页面美化
shell·margin·ui5·paddings
哈哈~haha18 天前
UI5_Walkthrough_Step 9: Component Configuration
component·walkthrough
哈哈~haha19 天前
ui5_Walkthrough_Step 8:Translatable Texts
i18n·ui5·walkthrough
哈哈~haha19 天前
ui5_Walkthrough_Step 1: Hello World! (vs code 版)
ui5·walkthrough
哈哈~haha20 天前
ui5_Walkthrough_Step 5: 视图控制器Controller
controller·walkthrough
哈哈~haha20 天前
ui5_Walkthrough_Step 7:JSON Model
json·mvc·module·ui5