5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-17 01:19:29 +08:00

Start Events. List styling moved to global scope.

This commit is contained in:
Lea Anthony 2020-10-08 21:03:45 +11:00
parent 256e84c4d4
commit 8a2acacc37
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
6 changed files with 39 additions and 41 deletions

View File

@ -173,4 +173,14 @@
user-select: initial; /* Non-prefixed version, currently
supported by Chrome, Edge, Opera and Firefox */
}
.list {
margin-top: 2rem;
margin-left: 2rem;
}
.list li {
margin-bottom: 0.5rem;
}
</style>

View File

@ -3,7 +3,7 @@
import {selectedPage} from './Store';
import TitlePage from './pages/TitlePage.svelte';
import Logging from './pages/logging/Logging.svelte';
import Events from './pages/Events.svelte';
import Events from './pages/events/Events.svelte';
</script>

View File

@ -154,7 +154,7 @@
border-top: 1px solid #5555;
margin-top: 10px;
padding-top: 5px;
/* margin-bottom: 15px; */
width: 100%;
}
</style>

View File

@ -1,26 +0,0 @@
<script>
import CodeBlock from '../components/CodeBlock.svelte';
</script>
<div>
<h4>Events</h4>
Wails includes a unified events system which allows you to do the following in either Go or Javascript:
<ul>
<li>On</li>
<li>Once</li>
<li>OnMultiple</li>
<li>Emit</li>
</ul>
<CodeBlock title="Events.On(eventName, callback)" description="etc etc etc "></CodeBlock>
</div>
<style>
h5 {
margin-top: 3rem;
}
</style>

View File

@ -0,0 +1,27 @@
<script>
import CodeBlock from '../../components/CodeBlock.svelte';
</script>
<div>
<h4>Events</h4>
Wails includes a unified events system which allows you to send events in either Go or Javascript and receive them in either Go or Javascript. The events methods may be accessed through the <code>runtime.Events</code> object. Available methods are:
<ul class="list">
<li>On</li>
<li>Once</li>
<li>OnMultiple</li>
<li>Emit</li>
</ul>
Events are intraoperable and data sent in events is translated between Go and Javascript automatically.
<div style="padding: 15px"></div>
<CodeBlock title="Events.On(eventName, callback)" description="etc etc etc "></CodeBlock>
</div>
<style>
</style>

View File

@ -67,16 +67,3 @@
</div>
</CodeBlock>
</div>
<style>
.list {
margin-top: 2rem;
margin-left: 2rem;
}
.list li {
margin-bottom: 0.5rem;
}
</style>