With more than 233K stars on Github combined, Vue.js is currently the trendiest Javascript front-end framework, beating its largest competitor React and Angular in Github star count.
The model-view-view model (MVVM) Javascript framework, was built to be lightweight and provides great flexibility. Vue.js’s single-file components are loosely coupled, which improves code reuse and decreases development time.
Vue.js is used by many enterprises such as Facebook, Netflix, Adobe, Xiaomi and many more. This bring us to wonder how easy can we start developing in Vuejs with SAP provided pacakges and follow the SAP Fiori design guidelines.
I had tried to create the fiori launchpad page with Vue.js together with Fundamental-Vue (Vue implementation of Fundamental Library Styles).
npm install -g @vue/cli
vue --version
@vue/cli 5.0.8
vue create <project_name>
cd <project_name>
npm run serve
npm install --save fundamental-vue
npm install --save fiori-fundamentals
npm install sass-loader node-sass --save-dev
// If you are targeting IE 11 uncomment the following line.
// $fd-support-css-var-fallback: true;
// should be declared before the scss import
$fd-icons-path : "../node_modules/fiori-fundamentals/scss/icons/";
$fd-scss-font-path : "../node_modules/fiori-fundamentals/scss/fonts/";
@import "../node_modules/fiori-fundamentals/scss/all.scss";
import FundamentalVue from 'fundamental-vue';
import "./scss/main.scss";
Vue.use(FundamentalVue)
<template>
<div id="app">
<fd-alert dismissible> Happy building! </fd-alert>
...
</div>
</template>
<template>
<div id="app">
<ShellBar />
<NavTab />
<br />
<PanelGrid />
</div>
</template>
<script>
import ShellBar from "./components/ShellBar.vue";
import NavTab from "./components/NavTab";
import PanelGrid from "./components/PanelGrid.vue";
export default {
name: "App",
components: { ShellBar, PanelGrid, NavTab },
};
</script>
<template>
<fd-shell-bar>
<fd-shell-bar-group position="start">
<fd-shell-bar-logo
alt="SAP"
src="https://unpkg.com/fiori-fundamentals@1.7.9/dist/images/sap-logo.png"
width="48"
height="24"
/>
<fd-shell-bar-product productTitle="Fiori LaunchPad Demo" />
</fd-shell-bar-group>
<fd-shell-bar-group position="end">
<fd-shell-bar-actions>
<fd-shell-bar-action>
<fd-search-input placeholder="Search" />
</fd-shell-bar-action>
<fd-shell-bar-action>
<fd-shell-bar-action-button icon="sys-help" />
</fd-shell-bar-action>
<fd-shell-bar-action>
<fd-shell-bar-action-button icon="settings" />
</fd-shell-bar-action>
<fd-shell-bar-action>
<fd-shell-bar-user-menu>
<fd-menu>
<fd-menu-list>
<fd-menu-item> Settings </fd-menu-item>
<fd-menu-item> Sign out </fd-menu-item>
</fd-menu-list>
</fd-menu>
</fd-shell-bar-user-menu>
</fd-shell-bar-action>
</fd-shell-bar-actions>
</fd-shell-bar-group>
</fd-shell-bar>
</template>
<template>
<fd-tabs>
<fd-tab-item label="Me@SAP" name="a" />
<fd-tab-item label="My Productivity Tools" name="b" />
<fd-tab-item label="Human Resources" name="c" />
<fd-tab-item label="IT Services" name="d" />
</fd-tabs>
</template>
<template>
<fd-panel-grid :col="6">
<fd-panel>Ticketing</fd-panel>
<fd-panel>My Equipment</fd-panel>
<fd-panel>Panel Body 3</fd-panel>
<fd-panel>Panel Body 4</fd-panel>
<fd-panel>Panel Body 5</fd-panel>
<fd-panel>Panel Body 6</fd-panel>
<fd-panel>Panel Body 7</fd-panel>
<fd-panel>Panel Body 8</fd-panel>
<fd-panel>Panel Body 9</fd-panel>
<fd-panel>Panel Body 10</fd-panel>
<fd-panel>Panel Body 11</fd-panel>
<fd-panel>Panel Body 12</fd-panel>
</fd-panel-grid>
</template>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
26 | |
25 | |
21 | |
12 | |
9 | |
8 | |
8 | |
8 | |
8 | |
8 |