Skip to content

Commit 203a5b3

Browse files
committed
fixed docs in Nuxt registeration
1 parent dd496e3 commit 203a5b3

File tree

8 files changed

+27
-20
lines changed

8 files changed

+27
-20
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,12 @@ Vue.use(VueFinalModal)
103103
```js
104104
// nuxt.config.js
105105
export default {
106-
plugins: ['~plugins/vue-final-modal.js']
106+
plugins: [
107+
{ src: '~plugins/vue-final-modal.js' }
108+
],
109+
build: {
110+
transpile: ['vue-final-modal']
111+
}
107112
}
108113
```
109114

docs/content/en/examples/recommended-use.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,11 @@ You can create a `higher-order component` easily and can customize `template`, `
2121
```vue
2222
<template>
2323
<vue-final-modal
24-
:value="value"
2524
v-bind="$attrs"
2625
classes="modal-container"
2726
content-class="modal-content"
2827
v-on="$listeners"
2928
>
30-
<button class="modal__close" @click="$emit('input', false)">
31-
<mdi-close></mdi-close>
32-
</button>
3329
<span class="modal__title">
3430
<slot name="title"></slot>
3531
</span>
@@ -40,15 +36,15 @@ You can create a `higher-order component` easily and can customize `template`, `
4036
<button class="vfm-btn" @click="$emit('confirm')">confirm</button>
4137
<button class="vfm-btn" @click="$emit('cancel')">cancel</button>
4238
</div>
39+
<button class="modal__close" @click="$emit('input', false)">
40+
<mdi-close></mdi-close>
41+
</button>
4342
</vue-final-modal>
4443
</template>
4544
4645
<script>
4746
export default {
48-
name: 'VModal',
49-
props: {
50-
value: { type: Boolean, default: false }
51-
}
47+
name: 'VModal'
5248
}
5349
</script>
5450

docs/content/en/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ export default {
120120
plugins: [
121121
'~plugins/vue-final-modal.js'
122122
],
123+
build: {
124+
transpile: ['vue-final-modal'],
125+
}
123126
}
124127
```
125128

docs/nuxt.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ export default theme({
2222
]
2323
],
2424
build: {
25-
extractCSS: true
25+
extractCSS: true,
26+
transpile: ['vue-final-modal']
2627
},
2728
css: ['../example/src/assets/css/button.css'],
2829
modules: ['@nuxtjs/sitemap'],

docs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
},
1111
"dependencies": {
1212
"@nuxt/content-theme-docs": "^0.6.1",
13-
"nuxt": "^2.14.1"
13+
"nuxt": "^2.14.1",
14+
"vue-final-modal": "^0.16.0"
1415
},
1516
"devDependencies": {
1617
"@nuxtjs/google-analytics": "^2.4.0",

docs/plugins/global.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Vue from 'vue'
22

3-
import VueFinalModal from '../../lib'
3+
import VueFinalModal from 'vue-final-modal/lib'
44

55
Vue.use(VueFinalModal)
66

docs/yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9899,6 +9899,11 @@ vue-client-only@^2.0.0:
98999899
resolved "https://registry.yarnpkg.com/vue-client-only/-/vue-client-only-2.0.0.tgz#ddad8d675ee02c761a14229f0e440e219de1da1c"
99009900
integrity sha512-arhk1wtWAfLsJyxGMoEYhoBowM87/i6HLSG2LH/03Yog6i2d9JEN1peMP0Ceis+/n9DxdenGYZZTxbPPJyHciA==
99019901

9902+
vue-final-modal@^0.16.0:
9903+
version "0.16.0"
9904+
resolved "https://registry.yarnpkg.com/vue-final-modal/-/vue-final-modal-0.16.0.tgz#9dc0a9246a8da25f6bceff6e5f78ff2a292d9a88"
9905+
integrity sha512-JJQQxo2b5xnqX5cqN239cUZZ+83AFrp1eM+rpw+DfmWX1UvxcIu83n8TK3//N8mGHNQiXVvWHSv4JeW9716EDA==
9906+
99029907
vue-hot-reload-api@^2.3.0:
99039908
version "2.3.4"
99049909
resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2"

example/src/components/hoc/VModal.vue

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
<template>
22
<vue-final-modal
3-
:value="value"
43
v-bind="$attrs"
54
classes="modal-container"
65
content-class="modal-content"
76
v-on="$listeners"
87
>
9-
<button class="modal__close" @click="$emit('input', false)">
10-
<mdi-close></mdi-close>
11-
</button>
128
<span class="modal__title">
139
<slot name="title"></slot>
1410
</span>
@@ -19,15 +15,15 @@
1915
<button class="vfm-btn" @click="$emit('confirm')">confirm</button>
2016
<button class="vfm-btn" @click="$emit('cancel')">cancel</button>
2117
</div>
18+
<button class="modal__close" @click="$emit('input', false)">
19+
<mdi-close></mdi-close>
20+
</button>
2221
</vue-final-modal>
2322
</template>
2423

2524
<script>
2625
export default {
27-
name: 'VModal',
28-
props: {
29-
value: { type: Boolean, default: false }
30-
}
26+
name: 'VModal'
3127
}
3228
</script>
3329

0 commit comments

Comments
 (0)