zoukankan      html  css  js  c++  java
  • SAP OPEN UI5 Step2 Bootstrap

    转载请联系vx:xiaoshitou5854

    引入sap ui5的js库文件

    webapp/index.html:

    <!DOCTYPE html>
    <html>
    
    <head>
        <meta charset="utf-8">
        <title>SAPUI5 Walkthrogh</title>
        <script
    		id="sap-ui-bootstrap"
    		src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
    		data-sap-ui-theme="sap_belize"
    		data-sap-ui-libs="sap.m"
    		data-sap-ui-compatVersion="edge"
    		data-sap-ui-async="true"
    		data-sap-ui-onInit="module:sap/ui/demo/walkthrough/index"
    		data-sap-ui-resourceroots='{
    			"sap.ui.demo.walkthrough": "./"
    		}'>
    	</script>
    </head>
    
    <body>
        <dir>Hello Word</dir>
    </body>
    
    </html>
    

    src:库js所在的server

    data-sap-ui-them:主题样式

    data-sap-ui-libs:使用的库

    data-sap-ui-async:异步

    data-sap-ui-onInit:初始化js文件的名字,例子里的index,就是index.js

    data-sap-ui-resourceroots:初始化js文件所在的路径,例子里的【./】的意思是,和index.html在同一个目录。

    webapp/index.js (New)

    sap.ui.define([
    
    ], function () {
    	"use strict";
    
    	alert("UI5 is ready");
    });
    

    这样写js的话,就不能直接调用此js,但能被index.html调用

    执行效果,会弹出一个警告框,显示UI5 is ready

    本人微信:xiaoshitou5854

  • 相关阅读:
    洛谷 题解 P5595 【【XR-4】歌唱比赛】
    洛谷 题解 CF1151D 【Stas and the Queue at the Buffet】
    洛谷 题解 CF299A 【Ksusha and Array】
    仙人掌找环
    2-SAT
    带花树
    帮我背单词
    csp2019退役祭
    P5284 [十二省联考2019]字符串问题 题解
    【网络流24题】魔术球问题
  • 原文地址:https://www.cnblogs.com/xiaoshiwang/p/14909111.html
Copyright © 2011-2022 走看看