Skip to content

Commit 21836fb

Browse files
xr0masterulivz
authored andcommitted
docs($plugin-pwa): fixed example for the custom component (#1977)
1 parent 6f9e478 commit 21836fb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/docs/docs/plugin/official/plugin-pwa.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ First, you need to create a global component (e.g. `MySWUpdatePopup`) at `.vuepr
214214

215215
```vue
216216
<template>
217-
<SWUpdatePopup>
217+
<SWUpdatePopup v-slot="{ enabled, reload, message, buttonText }">
218218
<div
219-
v-slot="{ enabled, reload, message, buttonText }"
219+
v-if="enabled"
220220
class="my-sw-update-popup">
221221
{{ message }}<br>
222222
<button @click="reload">{{ buttonText }}</button>

packages/docs/docs/zh/plugin/official/plugin-pwa.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ module.exports = {
214214

215215
```vue
216216
<template>
217-
<SWUpdatePopup>
217+
<SWUpdatePopup v-slot="{ enabled, reload, message, buttonText }">
218218
<div
219-
v-slot="{ enabled, reload, message, buttonText }"
219+
v-if="enabled"
220220
class="my-sw-update-popup">
221221
{{ message }}<br>
222222
<button @click="reload">{{ buttonText }}</button>

0 commit comments

Comments
 (0)