Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed deprecated slot syntax #360

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions app-starter/WguAppTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@

<wgu-app-header>
<!-- forward the slots of AppHeader -->
<slot name="wgu-tb-start" slot="wgu-tb-start" />
<slot name="wgu-tb-after-title" slot="wgu-tb-after-title" />
<slot name="wgu-tb-before-auto-buttons" slot="wgu-tb-before-auto-buttons" />
<slot name="wgu-tb-after-auto-buttons" slot="wgu-tb-after-auto-buttons" />
<slot name="wgu-tb-end" slot="wgu-tb-end" />
<template v-slot:wgu-tb-start>
<slot name="wgu-tb-start" />
</template>
<template v-slot:wgu-tb-after-title>
<slot name="wgu-tb-after-title" />
</template>
<template v-slot:wgu-tb-before-auto-buttons>
<slot name="wgu-tb-before-auto-buttons" />
</template>
<template v-slot:wgu-tb-after-auto-buttons>
<slot name="wgu-tb-after-auto-buttons" />
</template>
<template v-slot:wgu-tb-end>
<slot name="wgu-tb-end" />
</template>
</wgu-app-header>

<slot name="wgu-after-header" />
Expand All @@ -29,8 +39,7 @@
<wgu-map />
<!-- layer loading indicator -->
<wgu-maploading-status />
<slot name="wgu-after-map">
</slot>
<slot name="wgu-after-map" />
<!-- Portal to overlay the map content from an application module -->
<portal-target name="map-overlay" />
<wgu-app-logo />
Expand Down
3 changes: 2 additions & 1 deletion docs/reusable-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ The following example implements a customized tooltip to render an attribute of
<wgu-map-overlay
overlayId="my-custom-tooltip"
:visible=false
v-slot="{feature}"
>
<v-sheet slot-scope="{feature}" v-if="feature">
<v-sheet v-if="feature">
{{ feature.get('name') }}
</v-sheet>
</wgu-map-overlay>
Expand Down
47 changes: 24 additions & 23 deletions docs/workshop.md
Original file line number Diff line number Diff line change
Expand Up @@ -565,29 +565,30 @@ As you probably notice, there is currently no way to deactivate the drawing beha
<template>
<wgu-app-tpl>

<v-card
class="myCard"
slot="wgu-before-content"
>
<v-card-title>
Point Tool
</v-card-title>

<v-card-text>
This tool can add points to the map.
</v-card-text>

<v-card-actions>
<v-btn-toggle v-model="buttonValue">
<v-btn>
<v-icon dark>
mdi-star
</v-icon>
</v-btn>
</v-btn-toggle>
</v-card-actions>

</v-card>
<template v-slot:wgu-before-content>
<v-card
class="myCard"
>
<v-card-title>
Point Tool
</v-card-title>

<v-card-text>
This tool can add points to the map.
</v-card-text>

<v-card-actions>
<v-btn-toggle v-model="buttonValue">
<v-btn>
<v-icon dark>
mdi-star
</v-icon>
</v-btn>
</v-btn-toggle>
</v-card-actions>

</v-card>
</template>
</wgu-app-tpl>
</template>

Expand Down
3 changes: 2 additions & 1 deletion src/components/ol/HoverTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
:autoPanDuration="250"
positioning="top-center"
:offset="[0, 20]"
v-slot="{feature, hoverAttribute}"
>
<v-sheet slot-scope="{feature, hoverAttribute}" v-if="feature"
<v-sheet v-if="feature"
class="pa-2 text-center" max-width=200 >
{{ feature.get(hoverAttribute) }}
</v-sheet>
Expand Down
Loading