如何在SAP Fiori应用里使用React component
生活随笔
收集整理的這篇文章主要介紹了
如何在SAP Fiori应用里使用React component
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
在MyApp.jsx里引入U(xiǎn)I5針對React框架的開發(fā)的Card web Component:
代碼如下:
import React from 'react' import { Card } from "@ui5/webcomponents-react";export function MyApp() {return (<div><Card heading="Card"></Card></div>); }然后和正常的React應(yīng)用一樣,在App.js里引入我們自定義的Component:
代碼如下:
import React from "react"; import { MyApp } from "./MyApp"; import { ThemeProvider } from "@ui5/webcomponents-react/lib/ThemeProvider";function App() {return (<ThemeProvider withToastContainer><MyApp /></ThemeProvider>); }export default App;這個Card Component是SAP發(fā)布的針對React框架的標(biāo)準(zhǔn)組件。
可以在這個鏈接里看到明細(xì):
https://sap.github.io/ui5-webcomponents-react/?path=/story/welcome-getting-started–page
開發(fā)完畢后,npm start可以看到效果了:
要獲取更多Jerry的原創(chuàng)文章,請關(guān)注公眾號"汪子熙":
總結(jié)
以上是生活随笔為你收集整理的如何在SAP Fiori应用里使用React component的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: amoled和oled的区别(oled屏
- 下一篇: SAP CRM WebClient UI