Skip to content
This repository was archived by the owner on Aug 2, 2024. It is now read-only.

Commit 44d9790

Browse files
fix: Fixes babel config and removes only usage of async
1 parent 6c3b827 commit 44d9790

File tree

5 files changed

+29
-27
lines changed

5 files changed

+29
-27
lines changed

README.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,18 @@ Paste the following snippet in your `<head>`-tag:
4242
Then you can use Fundamental Vue like this:
4343

4444
```html
45-
<body>
46-
<div id="app" />
47-
<script>
48-
new Vue({
49-
el: '#app',
50-
template: `
51-
<FdPopover v-fd-margin:large>
52-
<h1 v-fd-margin:large slot="body">
53-
🚀 Hello Fundamental Vue 🚀
54-
</h1>
55-
</FdPopover>`
56-
});
57-
</script>
58-
</body>
45+
<div id="app">
46+
<fd-popover v-fd-margin:large placement="bottom-start" with-arrow>
47+
<h1 v-fd-margin:large>
48+
🚀 Hello Fundamental Vue 🚀
49+
</h1>
50+
<template #control="{toggle}">
51+
<fd-button @click="toggle">Show Popover</fd-button>
52+
</template>
53+
</fd-popover>
54+
</div>
55+
56+
<script>new Vue({ el: '#app' })</script>
5957
```
6058

6159
When using *Fundamental Vue* via a `<script>`-tag you don't have to install it manually by calling `Vue.use(FundamentalVue)`. This is done for you automatically. You can disable the automatic installation by setting `window.__FD_AUTO_INSTALL_DISABLED_KEY__` to true early on.

babel.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ const mode =
55
const appPresets = ["@vue/app"];
66

77
if(process.env.VUE_CLI_BUILD_TARGET === "app") {
8-
return {
8+
module.exports = {
99
presets: ["@vue/app"]
10-
}
10+
};
11+
return;
1112
};
1213

1314
const uiPresets = [

public/auto-install-demo.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
href="https://unpkg.com/fiori-fundamentals@latest/dist/fiori-fundamentals.min.css"
1111
/>
1212
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
13-
<script src="./FundamentalVue.umd.js"></script>
13+
<script src="./../dist/FundamentalVue.umd.js"></script>
1414

1515
<title>Fundamental Vue</title>
1616
</head>
@@ -26,8 +26,11 @@
2626
new Vue({
2727
el: '#app',
2828
template: `
29-
<FdPopover v-fd-margin:large>
30-
<h1 v-fd-margin:large slot="body">
29+
<FdPopover with-arrow v-fd-margin:large placement="bottom-start">
30+
<template #control="{toggle}">
31+
<FdButton @click="toggle">Show Popover</FdButton>
32+
</template>
33+
<h1 v-fd-margin:large>
3134
🚀 Hello Fundamental Vue 🚀
3235
</h1>
3336
</FdPopover>`

public/auto-install-disabled-demo.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@
1010
href="https://unpkg.com/fiori-fundamentals@latest/dist/fiori-fundamentals.min.css"
1111
/>
1212
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
13-
1413
<script>
1514
// This is how you disable auto install if you don't like it for any reason.
1615
window.__FD_AUTO_INSTALL_DISABLED_KEY__ = true;
17-
</script>
18-
19-
<script src="./FundamentalVue.umd.js"></script>
16+
</script>
17+
<script src="./../dist/FundamentalVue.umd.js"></script>
2018

2119
<title>Fundamental Vue</title>
2220
</head>
@@ -32,8 +30,11 @@
3230
new Vue({
3331
el: '#app',
3432
template: `
35-
<FdPopover v-fd-margin:large>
36-
<h1 v-fd-margin:large slot="body">
33+
<FdPopover with-arrow v-fd-margin:large placement="bottom-start">
34+
<template #control="{toggle}">
35+
<FdButton @click="toggle">Show Popover</FdButton>
36+
</template>
37+
<h1 v-fd-margin:large>
3738
🚀 Hello Fundamental Vue 🚀
3839
</h1>
3940
</FdPopover>`

src/components/Popper/Popper.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,7 @@ export default {
217217
beforeDestroy() {
218218
document.querySelector("body").removeChild(this.elements().body);
219219
},
220-
async mounted() {
221-
await this.$nextTick();
220+
mounted() {
222221
const popoverBody = this.elements().body;
223222
popoverBody.parentNode.removeChild(popoverBody);
224223
const body = document.querySelector("body");

0 commit comments

Comments
 (0)