Skip to content

Commit

Permalink
WIP: Fix a few things before rewrite (#145)
Browse files Browse the repository at this point in the history
* fix: #98

* fix: #131

* make tests run again
  • Loading branch information
LinusBorg authored Sep 2, 2018
1 parent 7cd2953 commit 650fe01
Show file tree
Hide file tree
Showing 13 changed files with 151 additions and 13,962 deletions.
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// Verwendet IntelliSense zum Ermitteln möglicher Attribute.
// Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen.
// Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["--config", "test/unit/jest.conf.js", "--runInBand", "--watch"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"stopOnEntry": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
}
]
}
14 changes: 11 additions & 3 deletions example/components/default-content-on-target/index.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
<template>
<portal-target name="empty-destination">
<p>This is default content for the Target</p>
<ul class="controls">
<li class="controls--item">
<a href="#" class="controls--link" @click.prevent="count++">Increase counter</a>
</li>
</ul>
<p>This is default content for the Target <br> It has a counter: {{ count }} </p>
<p>It gets rendered whenever there is no content from a sourc Portal available</p>
</portal-target>
</template>

<script>
export default {}
export default {
data: () => ({
count: 0,
}),
}
</script>

<style>
</style>
54 changes: 36 additions & 18 deletions example/index.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>VuePortal Examples</title>
</head>
<body>
<div id="app">

<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>VuePortal Examples</title>
</head>

<body>
<div id="app">

</div>
<hr>
<h4>The following content is outside of the control of the Vue main instance</h4>
<p>But we can render stuff here nonetheless with the
<i>mountTarget</i> Prop</p>
<div class="wrapper">
<div class="item destination">
<div id="external-target" class="test-external-target" style="border: 1px solid grey;">
</div>
</div>
<hr>
<h4>The following content is outside of the control of the Vue main instance</h4>
<p>But we can render stuff here nonetheless with the <i>mountTarget</i> Prop</p>
<div class="wrapper">
<div class="item destination">
<div id="external-target" class="test-external-target" style="border: 1px solid grey;">
</div>
</div>
<script src="vendor.build.js"></script>
<script src="example.build.js"></script>
<div>
<div id="from">
<div class="v-portal" style="display: none;">

</div>
</div>
<script src="vendor.build.js"></script>
<script src="example.build.js"></script>
</body>
</html>
<div id="to">
<div class="vue-portal-target">
<p>Test1</p>
<p>Test2</p>
<!---->
</div>
</div>
</div>"
</body>

</html>
Loading

0 comments on commit 650fe01

Please sign in to comment.